@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,38 @@
|
|
|
1
|
+
# Experiment Versioning
|
|
2
|
+
|
|
3
|
+
Experiment mode (`[EX]` or `[EXP]` on ML/AI/DS agents) runs fixed-N experiments with versioned checkpoints. Unlike Autonomous Research, experiment mode is human-planned: you decide what to try; the specialist runs each variant and records results.
|
|
4
|
+
|
|
5
|
+
## Checkpoint mechanism
|
|
6
|
+
|
|
7
|
+
After each experiment result, the protocol creates a checkpoint. Detection order:
|
|
8
|
+
|
|
9
|
+
1. **DVC** — if `dvc` is available and the project uses it, the checkpoint is a DVC-tracked snapshot.
|
|
10
|
+
2. **Git** — otherwise, the protocol creates a git commit tagged with the experiment name.
|
|
11
|
+
3. **None** — if neither is available, the protocol warns and skips checkpointing.
|
|
12
|
+
|
|
13
|
+
## Artifacts
|
|
14
|
+
|
|
15
|
+
| File | Purpose |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `experiments/<project>/runs.jsonl` | One line per experiment: config, metrics, checkpoint ref. |
|
|
18
|
+
| `experiments/<project>/<run-id>/` | Per-run directory: config, outputs, logs. |
|
|
19
|
+
| `project-specs.md` | Phase documentation as usual; experiment results summarized in the execute phase. |
|
|
20
|
+
|
|
21
|
+
## UI integration
|
|
22
|
+
|
|
23
|
+
On ML/AI agents, experiment mode pushes structured output to the UI's `experiment-dashboard` panel: runs table, metric trends, side-by-side config comparison. See [Panels](../04-ui/panels.md).
|
|
24
|
+
|
|
25
|
+
## Experiment vs. AR
|
|
26
|
+
|
|
27
|
+
| | Experiment mode | Autonomous Research |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| Planning | Human-planned (you list variants) | Specialist adapts hypotheses |
|
|
30
|
+
| Stop condition | N runs complete | Budget or convergence |
|
|
31
|
+
| Decision-making | Reported to user for decision | Auto-keep/revert |
|
|
32
|
+
| Steering | Per-run conversation | `research_brief.md` |
|
|
33
|
+
|
|
34
|
+
## See also
|
|
35
|
+
|
|
36
|
+
- [Autonomous Research](autonomous-research.md)
|
|
37
|
+
- [DIVERGE](diverge.md)
|
|
38
|
+
- Source: `src/agents/specific_instructions/shared/experiment_versioning.md`
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# The Gate Pattern
|
|
2
|
+
|
|
3
|
+
The single most important idea in Shards: **documentation is the gate**. Every specialist must write its decision to `project-specs.md` and get your confirmation before advancing to the next phase.
|
|
4
|
+
|
|
5
|
+
## Why
|
|
6
|
+
|
|
7
|
+
It's easy for an agent to rush ahead and produce code that was never aligned with what you actually wanted. The gate pattern forces alignment at every step — you see the decision in writing *before* the work is done, and you can redirect cheaply.
|
|
8
|
+
|
|
9
|
+
## How it works
|
|
10
|
+
|
|
11
|
+
Every phase ends with the same three-step sequence:
|
|
12
|
+
|
|
13
|
+
1. The specialist writes its decisions to the phase section of `project-specs.md`, wrapped in a `::GATE:: ... ::ENDGATE::` fence.
|
|
14
|
+
2. The specialist reads the section back to you.
|
|
15
|
+
3. The specialist waits for your confirmation before continuing.
|
|
16
|
+
|
|
17
|
+
Gates are **machine-enforced** by three Claude Code hooks installed at `.shards/hooks/gate-hook.js`:
|
|
18
|
+
|
|
19
|
+
| Hook | Trigger | Effect |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `Stop` | When the model stops generating | Checks for open gate fences; blocks closure until gate is resolved. |
|
|
22
|
+
| `PreToolUse` | Before any tool call | Rejects tool calls that would bypass the current gate. |
|
|
23
|
+
| `UserPromptSubmit` | When you submit a new prompt | Validates gate state transitions. |
|
|
24
|
+
|
|
25
|
+
State is tracked in `.shards/gates/state.json`.
|
|
26
|
+
|
|
27
|
+
## Gate fence syntax
|
|
28
|
+
|
|
29
|
+
Inside `project-specs.md`:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
## Phase 3: Analysis Methodology
|
|
33
|
+
|
|
34
|
+
::GATE::
|
|
35
|
+
**Method:** Propensity score matching.
|
|
36
|
+
**Reason:** Observational data, need to control for confounders.
|
|
37
|
+
**Reviewer verdict (Researcher):** SOUND.
|
|
38
|
+
::ENDGATE::
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Everything between the fences is the gate decision. The hooks parse these fences, identify which are open (no confirmation yet) vs. closed (confirmed), and enforce the flow.
|
|
42
|
+
|
|
43
|
+
## Diagnostics
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
shards-gates status # show current gate state
|
|
47
|
+
shards-gates force-close # unstick a session if enforcement is wedged
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Opting out
|
|
51
|
+
|
|
52
|
+
Set `SHARDS_GATE_ENFORCE=0` in the environment to disable enforcement entirely. Use sparingly — the gate pattern is what keeps projects honest.
|
|
53
|
+
|
|
54
|
+
## Exceptions
|
|
55
|
+
|
|
56
|
+
Two modes suspend the gate pattern:
|
|
57
|
+
|
|
58
|
+
- **Syn Fixer mode** (`[F]`) — direct fixes don't need phased gates.
|
|
59
|
+
- **Explore mode** (Data Modeller `[X]`) — pure exploration produces no files, no gates.
|
|
60
|
+
|
|
61
|
+
## See also
|
|
62
|
+
|
|
63
|
+
- [Behavioral Rules](behavioral-rules.md)
|
|
64
|
+
- [Reviewer Verdicts](reviewer-verdicts.md)
|
|
65
|
+
- Source: `src/agents/specific_instructions/shared/behavioral_rules.md`
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Incremental Testing
|
|
2
|
+
|
|
3
|
+
A mid-build contract for specialists that produce notebooks, pipelines, or long scripts. Instead of writing the full artifact and hitting *Run All*, the agent tests each component as it is written and emits a machine-enforced checkpoint gate before starting the next one.
|
|
4
|
+
|
|
5
|
+
Referenced by ML Engineer, Data Scientist, AI Engineer, Applied ML Scientist, Deep Learning Engineer, Data Engineer, Analytics Engineer, and MLOps Engineer during their build phases.
|
|
6
|
+
|
|
7
|
+
## The problem it solves
|
|
8
|
+
|
|
9
|
+
Agents that build Jupyter notebooks and multi-step pipelines used to write the whole artifact in one pass, then run it end-to-end. When cell 2 failed silently or a bad join stalled for minutes, the failure surfaced only at the end — often disguised as a "hang." There was no record of which components had passed before the failure point, and no way to narrow the blast radius.
|
|
10
|
+
|
|
11
|
+
The incremental testing protocol enforces a tighter loop: **component written → component executed in isolation → evidence recorded → checkpoint gate → user confirms → next component**.
|
|
12
|
+
|
|
13
|
+
## The check
|
|
14
|
+
|
|
15
|
+
Between each component, the specialist emits a `kind=checkpoint` gate fence:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
::GATE:: id=<agent-name>-phase-<N>-checkpoint-<component> phase=<N> kind=checkpoint
|
|
19
|
+
Component: <human-readable name>
|
|
20
|
+
Test command: <exact command that was run>
|
|
21
|
+
Evidence:
|
|
22
|
+
- <measured fact 1>
|
|
23
|
+
- <measured fact 2>
|
|
24
|
+
Status: PASS | FAIL — <one-line summary>
|
|
25
|
+
Next: <what will be built after confirmation>
|
|
26
|
+
Stop here — await explicit confirmation before writing the next component.
|
|
27
|
+
::ENDGATE::
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The `kind=checkpoint` attribute distinguishes these from phase-transition gates: a checkpoint closes without advancing the phase, and never carries `validates=<agent>` — validation evidence is a phase-gate concern that still runs at the end of the build.
|
|
31
|
+
|
|
32
|
+
While a checkpoint is open, the gate hook blocks all non-read tools (Read/Glob/Grep only). The user confirms with any affirmative ("ok", "yes", "proceed") or explicitly via `::GATE-CONFIRM:: <id>`.
|
|
33
|
+
|
|
34
|
+
## What counts as a component
|
|
35
|
+
|
|
36
|
+
One notebook cell or a tight group of cells with a shared purpose, one dbt model, one pipeline step, one endpoint handler — whatever is the smallest unit you could debug in isolation. Usually 2–5 checkpoints per build phase. Fewer and you rediscover run-all; more and you're checkpointing individual lines.
|
|
37
|
+
|
|
38
|
+
## Techniques per artifact type
|
|
39
|
+
|
|
40
|
+
- **Notebooks** — execute cells via `jupyter execute … --inplace` with a per-cell timeout; print shapes and heads after every load/transform; never add a cell that depends on an untested predecessor. Keep outputs clean: never print secrets/tokens, prefer `.head()`/`.shape`/summaries over full DataFrame dumps (they bloat the `.ipynb` and, in walkthrough mode, burn agent context), install with `%pip`/`%conda` not `!pip` so it targets the live kernel, and never overwrite raw data in place — write derived artifacts to a separate path.
|
|
41
|
+
- **SQL** — develop with `LIMIT 100`; run `EXPLAIN` on any 3+ table join; check count-before vs count-after at every join; time out dev queries at 60s.
|
|
42
|
+
- **ML training** — smoke-fit on ≤1% of data for 1–2 epochs before touching the full set; forward-pass a single batch before starting the training loop; overfit a tiny batch on purpose as a sanity check.
|
|
43
|
+
- **Transforms** — `assert` shape/dtype/non-null invariants after every transform.
|
|
44
|
+
- **Pipeline / service code** — dry-run each step in isolation before chaining; `curl` each new endpoint before wiring it up.
|
|
45
|
+
|
|
46
|
+
## Restart & Run All — the final reproducibility check
|
|
47
|
+
|
|
48
|
+
Incremental testing proves each component in isolation; it does not prove the notebook runs clean top-to-bottom on a fresh kernel. The closing check — run **once, after every component has passed** — is a fresh-kernel full run. In Notebook Walkthrough mode this is `notebook-kernel.py run-all <session_id>` (restarts the kernel, runs every cell in order, stops at the first failure, returns a per-cell roll-up with the first error); standalone it's `jupyter nbconvert --execute --to notebook --inplace`. Set seeds so the run is deterministic. This is the evidence the Data Scientist's DS-11 check records. Run-all is never a *development* technique — only the final step.
|
|
49
|
+
|
|
50
|
+
## Composition
|
|
51
|
+
|
|
52
|
+
- Still runs **with** the validation protocol — checkpoint evidence feeds the final phase-gate evidence table but does not replace it.
|
|
53
|
+
- Still runs **with** the join-path protocol — the checkpoint fires after a join has been executed and verified.
|
|
54
|
+
- Separate from **experiment versioning** — DVC/git checkpoints snapshot *results*; this protocol checkpoints *build steps*. In `[X]` and `[AR]` modes both apply.
|
|
55
|
+
|
|
56
|
+
## Escape hatches
|
|
57
|
+
|
|
58
|
+
- `SHARDS_CHECKPOINT_ENFORCE=0` — downgrades checkpoint gates to advisory. They're still logged; they don't block tools.
|
|
59
|
+
- `SHARDS_GATE_ENFORCE=0` — disables all gate enforcement (phase and checkpoint).
|
|
60
|
+
|
|
61
|
+
Neither should be a default. They exist for harness issues, not time pressure — skipping incremental testing is exactly how you end up debugging at 2am.
|
|
62
|
+
|
|
63
|
+
## See also
|
|
64
|
+
|
|
65
|
+
- [The Gate Pattern](gate-pattern.md)
|
|
66
|
+
- [Validation Protocol](validation.md)
|
|
67
|
+
- [Join-Path Protocol](join-path.md)
|
|
68
|
+
- Source: `src/agents/specific_instructions/shared/incremental_testing.md`
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Join-Path Protocol
|
|
2
|
+
|
|
3
|
+
A self-check protocol for tracing and validating multi-table joins before writing or executing SQL. Used by Data Analyst, Data Scientist, Data Engineer, Analytics Engineer, ML Engineer, and BI Engineer.
|
|
4
|
+
|
|
5
|
+
## The problem it solves
|
|
6
|
+
|
|
7
|
+
Multi-table joins are the single biggest source of silent data bugs. A forgotten one-to-many explodes rows; a missed left-join drops data; a grain mismatch produces double-counting. The join-path protocol catches these before execution.
|
|
8
|
+
|
|
9
|
+
## The check
|
|
10
|
+
|
|
11
|
+
Before writing a multi-table query, the specialist traces the join path:
|
|
12
|
+
|
|
13
|
+
1. **Enumerate tables** — list every table in the join.
|
|
14
|
+
2. **Identify grain** — for each table, state its grain (one row per X).
|
|
15
|
+
3. **Trace the join keys** — for each join, verify that the key enforces the intended cardinality.
|
|
16
|
+
4. **Document expected cardinality** — one-to-one, one-to-many, many-to-many, filtered.
|
|
17
|
+
5. **Check for grain changes** — does the join change the grain of the result? If yes, is aggregation applied?
|
|
18
|
+
6. **Check for null handling** — left joins, nullable keys, implicit inner-join behavior.
|
|
19
|
+
|
|
20
|
+
Output is a short block in `project-specs.md` before the query is written.
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
::GATE::
|
|
26
|
+
## Join Path (orders → customers → subscriptions)
|
|
27
|
+
|
|
28
|
+
Tables:
|
|
29
|
+
- orders: one row per order (order_id)
|
|
30
|
+
- customers: one row per customer (customer_id)
|
|
31
|
+
- subscriptions: one row per customer per active_from date (customer_id, active_from)
|
|
32
|
+
|
|
33
|
+
Joins:
|
|
34
|
+
- orders.customer_id = customers.customer_id (many-to-one)
|
|
35
|
+
- customers.customer_id = subscriptions.customer_id (one-to-many!)
|
|
36
|
+
|
|
37
|
+
Grain change: subscriptions join explodes rows.
|
|
38
|
+
Mitigation: filter to active subscription first via window function before join.
|
|
39
|
+
::ENDGATE::
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## See also
|
|
43
|
+
|
|
44
|
+
- [Data Modeller](../02-agents/data-modeller.md)
|
|
45
|
+
- [Data Engineer](../02-agents/data-engineer.md)
|
|
46
|
+
- Source: `src/agents/specific_instructions/shared/join_path_protocol.md`
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Knowledge Ledger
|
|
2
|
+
|
|
3
|
+
Persistent workspace-wide memory at `.shards/knowledge/`. Survives across projects, installs, and uninstalls. Shards uses it to remember non-obvious facts about your data, your infrastructure, and patterns that work.
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
.shards/knowledge/
|
|
9
|
+
├── INDEX.md # one-line-per-entry index (scanned for keyword matches)
|
|
10
|
+
├── entities/ # data table quirks, column semantics, grain surprises
|
|
11
|
+
├── infrastructure/ # warehouse/API/system behaviors
|
|
12
|
+
├── patterns/ # reusable SQL/Python snippets
|
|
13
|
+
└── features/ # verified ML features (Data Scientist + ML Engineer)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Entry format
|
|
17
|
+
|
|
18
|
+
Knowledge entries are markdown files with YAML frontmatter:
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
---
|
|
22
|
+
title: teacher_activity grain surprise
|
|
23
|
+
domain: education
|
|
24
|
+
type: entity
|
|
25
|
+
confidence: high
|
|
26
|
+
contributed_by: data-analyst
|
|
27
|
+
date: 2025-09-12
|
|
28
|
+
tags: [teacher_activity, grain, daily]
|
|
29
|
+
---
|
|
30
|
+
The teacher_activity table has one row per teacher per day per activity_type
|
|
31
|
+
— NOT one row per teacher per day as the name suggests. Joins to teacher_day
|
|
32
|
+
will explode rows if you don't aggregate first.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Type values: `entity`, `infrastructure`, `pattern`, `feature`.
|
|
36
|
+
|
|
37
|
+
## Three protocols
|
|
38
|
+
|
|
39
|
+
Three shared protocols govern the Knowledge Ledger:
|
|
40
|
+
|
|
41
|
+
### 1. Retrieval
|
|
42
|
+
|
|
43
|
+
Before Phase 1, specialists scan `INDEX.md` for entries relevant to the current project. Matching entries are documented in `project-specs.md` as context. See `knowledge_retrieval.md`.
|
|
44
|
+
|
|
45
|
+
### 2. Checkpoint
|
|
46
|
+
|
|
47
|
+
Mid-phase, specialists re-check the ledger against new findings. If a new finding contradicts an existing entry, the specialist flags the contradiction and asks the user to reconcile. See `knowledge_checkpoint.md`.
|
|
48
|
+
|
|
49
|
+
### 3. Harvest
|
|
50
|
+
|
|
51
|
+
After Syn's final review, specialists extract candidate knowledge from the just-completed project. Candidates are presented to the user for confirmation before writing to the ledger. See `knowledge_harvest.md`.
|
|
52
|
+
|
|
53
|
+
## Browsing the ledger
|
|
54
|
+
|
|
55
|
+
Three ways:
|
|
56
|
+
|
|
57
|
+
1. **`/knowledge` slash command** — Syn's Knowledge mode. Seed, browse, and manage entries.
|
|
58
|
+
2. **UI Knowledge Map panel** — click the brain icon in the activity bar. Card view, graph view, filters, inline edit. See [Knowledge Map](../04-ui/knowledge-map.md).
|
|
59
|
+
3. **Plain files** — open the `.md` files directly in your editor.
|
|
60
|
+
|
|
61
|
+
## Preservation
|
|
62
|
+
|
|
63
|
+
`.shards/knowledge/` is explicitly preserved on uninstall. Re-installing does not overwrite it.
|
|
64
|
+
|
|
65
|
+
## See also
|
|
66
|
+
|
|
67
|
+
- [Knowledge Map panel](../04-ui/knowledge-map.md)
|
|
68
|
+
- Source: `src/agents/specific_instructions/shared/knowledge_harvest.md`
|
|
69
|
+
- Source: `src/agents/specific_instructions/shared/knowledge_retrieval.md`
|
|
70
|
+
- Source: `src/agents/specific_instructions/shared/knowledge_checkpoint.md`
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Reviewer Verdicts
|
|
2
|
+
|
|
3
|
+
Every reviewer — Syn, Researcher, Data Modeller, Backend Engineer, MLOps Engineer, Applied ML Scientist — returns a verdict in one of three tiers. This is the universal vocabulary.
|
|
4
|
+
|
|
5
|
+
## The three tiers
|
|
6
|
+
|
|
7
|
+
| Tier | Meaning | Caller action |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| **APPROVED** / SOUND / CLEAN | No issues. | Proceed as planned. |
|
|
10
|
+
| **NEEDS REVISION** / CONSIDER ALTERNATIVES / MINOR ISSUES | Valid but improvable. Reviewer provides specific suggestions. | Caller decides: address suggestions or proceed with justification. |
|
|
11
|
+
| **BLOCKED** / REVISE / REFACTOR REQUIRED | Critical issues that must be fixed. | Caller must address before advancing. |
|
|
12
|
+
|
|
13
|
+
Different reviewers use different labels (the Researcher says SOUND / CONSIDER ALTERNATIVES / REVISE; Syn says APPROVED / NEEDS REVISION / BLOCKED; the Backend Engineer says CLEAN / MINOR ISSUES / REFACTOR REQUIRED / BLOCKED) but the semantics are the same.
|
|
14
|
+
|
|
15
|
+
## How verdicts are used
|
|
16
|
+
|
|
17
|
+
Specialists write the reviewer verdict into the relevant phase section of `project-specs.md`:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
## Phase 3: Analysis Methodology
|
|
21
|
+
|
|
22
|
+
::GATE::
|
|
23
|
+
**Method:** Propensity score matching.
|
|
24
|
+
**Reviewer verdict (Researcher):** SOUND.
|
|
25
|
+
**Reviewer notes:** Propensity overlap looks good; recommend sensitivity analysis.
|
|
26
|
+
::ENDGATE::
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The specialist then acts on the verdict per the table above.
|
|
30
|
+
|
|
31
|
+
## Escalation
|
|
32
|
+
|
|
33
|
+
When multiple reviewers are consulted in a phase (e.g., ML Engineer Phase 7 has Backend + MLOps + Syn), the specialist aggregates verdicts. Any `BLOCKED` blocks the phase. Any `NEEDS REVISION` is documented and addressed or justified.
|
|
34
|
+
|
|
35
|
+
## See also
|
|
36
|
+
|
|
37
|
+
- [The Gate Pattern](gate-pattern.md)
|
|
38
|
+
- [Behavioral Rules](behavioral-rules.md)
|
|
39
|
+
- Source: `src/agents/specific_instructions/shared/reviewer_verdict_protocol.md`
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Decompose & Swarm — Parallel Slices for Large Work
|
|
2
|
+
|
|
3
|
+
When Syn (PM Mode, Free Form, or general orchestration) faces a genuinely large
|
|
4
|
+
task, it defaults to decomposing the work into bounded slices and executing them
|
|
5
|
+
with **multiple same-type subagents running in parallel** — then Syn merges the
|
|
6
|
+
slice results into one deliverable. This is the default for large work, not an
|
|
7
|
+
opt-in mode.
|
|
8
|
+
|
|
9
|
+
## When to swarm
|
|
10
|
+
|
|
11
|
+
Good swarm candidates:
|
|
12
|
+
|
|
13
|
+
- A task with many independent files or modules.
|
|
14
|
+
- Several different sub-problems that can be worked in parallel.
|
|
15
|
+
- More work than one subagent should carry in a single spawned task.
|
|
16
|
+
|
|
17
|
+
Poor swarm candidates:
|
|
18
|
+
|
|
19
|
+
- A single SQL query, no matter how involved.
|
|
20
|
+
- A one-file change or small fix.
|
|
21
|
+
- Anything a single agent completes cleanly in one turn.
|
|
22
|
+
- Work where slices would write to the same paths and collide.
|
|
23
|
+
|
|
24
|
+
## Lifecycle
|
|
25
|
+
|
|
26
|
+
1. **Judge the scale.** Small → one agent. Genuinely large → swarm.
|
|
27
|
+
2. **Slice.** Break the task into bounded, independently verifiable units, each
|
|
28
|
+
with its own output paths and a definition of done.
|
|
29
|
+
3. **Spawn.** Issue parallel Task calls of the same `subagent_type`, one per
|
|
30
|
+
slice, each with a distinct brief and distinct output directory.
|
|
31
|
+
4. **Review.** Review each slice (APPROVED / NEEDS REVISION / BLOCKED).
|
|
32
|
+
5. **Merge.** Syn reads the slice artifacts from disk, reconciles interfaces,
|
|
33
|
+
and produces the coherent final deliverable.
|
|
34
|
+
|
|
35
|
+
Syn is never limited to one instance of an agent per project — multiple data
|
|
36
|
+
scientists, ML engineers, or any specialist type may run in parallel when the
|
|
37
|
+
work warrants it.
|
|
38
|
+
|
|
39
|
+
Supported by `specific_instructions/shared/swarm_protocol.md` (agent-facing
|
|
40
|
+
instructions).
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Validation Protocol
|
|
2
|
+
|
|
3
|
+
Every specialist that produces a durable artifact — a mart, a model, a notebook, a dashboard, a service, a data model, a pipeline — is required to validate that artifact before the gate closes on its build phase. The validation contract is the DNA; per-agent checklists are the flesh; a gate-hook extension is the enforcement.
|
|
4
|
+
|
|
5
|
+
## Why
|
|
6
|
+
|
|
7
|
+
Agents are good at producing work that *looks* correct. Validation forces evidence that the work *is* correct:
|
|
8
|
+
|
|
9
|
+
- Not "row counts look right" — `rows: 48,211 (source: 48,211)`.
|
|
10
|
+
- Not "tested the model" — `tests/test_model.py — 14 tests, 14 passed`.
|
|
11
|
+
- Not "shouldn't affect downstream" — `fct_revenue rebuilt OK, 0 schema diff`.
|
|
12
|
+
|
|
13
|
+
Numbers and file paths are harder to hallucinate than prose. The protocol's job is to keep agents honest, and the gate hook's job is to make sure the protocol actually runs.
|
|
14
|
+
|
|
15
|
+
## The three-layer contract
|
|
16
|
+
|
|
17
|
+
| Layer | Where it lives | What it does |
|
|
18
|
+
|------|----------------|--------------|
|
|
19
|
+
| **Shared protocol** | `shared/validation_protocol.md` | Defines what validation means, the specs-section schema, the evidence-vs-assertion rule, how validation composes with other protocols. Loaded by every specialist via Behavioral Rules. |
|
|
20
|
+
| **Domain checklist** | `<agent>/validation_checklist.md` | Defines *which* checks apply for this agent's work. Stable check IDs (AE-01, ML-03, DS-12, etc.). Track Calibration table picks the required subset per `(Track, Mode)`. |
|
|
21
|
+
| **Gate hook enforcement** | `tools/gate-hook/validation.js` | Parses the `## Validation` section, checks the schema is complete, blocks the gate if evidence is missing. Opt-in via `SHARDS_VALIDATION_ENFORCE=1`. |
|
|
22
|
+
|
|
23
|
+
Soft protocol defines the intent. Hard enforcement makes it stick.
|
|
24
|
+
|
|
25
|
+
## The specs section schema
|
|
26
|
+
|
|
27
|
+
Every validation-eligible phase writes this into `project-specs.md` before emitting its gate fence:
|
|
28
|
+
|
|
29
|
+
```markdown
|
|
30
|
+
## Validation
|
|
31
|
+
|
|
32
|
+
**Track:** quick | deep | fixer
|
|
33
|
+
**Mode:** <agent-specific — optional>
|
|
34
|
+
**Checklist:** <agent_name>/validation_checklist.md
|
|
35
|
+
**Applied at:** Phase <N> — <phase name>
|
|
36
|
+
|
|
37
|
+
### Evidence
|
|
38
|
+
|
|
39
|
+
| Check | Expected | Observed | Pass/Fail | Notes |
|
|
40
|
+
|-------|----------|----------|-----------|-------|
|
|
41
|
+
| <id> | <predicted> | <measured value> | ✓ / ✗ / n/a | <required if n/a> |
|
|
42
|
+
|
|
43
|
+
### Artifacts
|
|
44
|
+
- `<path/to/evidence-file>` — <what it shows>
|
|
45
|
+
|
|
46
|
+
### Downstream Impact
|
|
47
|
+
- `<consumer>` — verified intact | not applicable | broken → fixed in <ref>
|
|
48
|
+
|
|
49
|
+
### Open Issues
|
|
50
|
+
- <issue> | none
|
|
51
|
+
|
|
52
|
+
### Summary
|
|
53
|
+
<2-4 sentences: what was validated, what failed and was fixed, residual risk>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Track vs Mode
|
|
57
|
+
|
|
58
|
+
- **Track** (universal, strict vocabulary: `quick | deep | fixer`) controls depth. The hook validates this.
|
|
59
|
+
- **Mode** (agent-specific, free-form, optional) describes the flavor of work — `greenfield`, `iteration`, `experiment`, `adhoc`, `build`. The hook does not validate Mode values; it's an auditing aid. Omit the line entirely if not meaningful.
|
|
60
|
+
|
|
61
|
+
Examples:
|
|
62
|
+
- ML Engineer, new recommender → `Track: deep`, `Mode: greenfield`
|
|
63
|
+
- Analytics Engineer, small mart tweak → `Track: quick`, `Mode: adhoc` (or omit Mode)
|
|
64
|
+
- Any `[F]` Fixer fix → `Track: fixer`
|
|
65
|
+
|
|
66
|
+
### Pass/Fail values
|
|
67
|
+
|
|
68
|
+
- **✓** — check ran, result met expectation.
|
|
69
|
+
- **✗** — check ran, result failed. Document the fix in Notes or surface in Open Issues before closing the gate.
|
|
70
|
+
- **n/a** — genuinely inapplicable to this work (e.g., calibration on a regression model). Requires a non-empty Notes cell; `n/a` without justification is a gate-block.
|
|
71
|
+
|
|
72
|
+
Unresolved checks are not a valid state. Mark them `✗` and move the uncertainty to Open Issues.
|
|
73
|
+
|
|
74
|
+
### Multi-instance checks
|
|
75
|
+
|
|
76
|
+
Checks that measure many things (feature distributions across 47 features, per-slice model performance, per-column null rates) use a summary-row-plus-artifact pattern: one row captures the headline (`47/47 within tolerance | 2 flagged`), the full breakdown lives in an artifact file referenced under `### Artifacts`.
|
|
77
|
+
|
|
78
|
+
## Track depth
|
|
79
|
+
|
|
80
|
+
| Track | When | What's expected |
|
|
81
|
+
|-------|------|-----------------|
|
|
82
|
+
| `deep` | Full build phases — new mart, new model, new service, new pipeline, new dashboard | Full checklist per the agent's Track Calibration table |
|
|
83
|
+
| `quick` | Adhoc analyses, schema tweaks, experiment iterations, prompt-lab versions | Subset — usually 4-6 of the most impactful checks |
|
|
84
|
+
| `fixer` | `[F]` Fixer-mode fixes | Minimal — "what changed, what didn't break" + 1-2 smoke checks |
|
|
85
|
+
|
|
86
|
+
Each agent's checklist defines exactly which checks belong to which Track.
|
|
87
|
+
|
|
88
|
+
## How to enable enforcement
|
|
89
|
+
|
|
90
|
+
The hook ships with enforcement **off** by default — validation sections are parsed and logged, but gates are not blocked on missing validation. This soft-launch mode lets agents and users adjust to producing the section without friction.
|
|
91
|
+
|
|
92
|
+
To turn enforcement on:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
export SHARDS_VALIDATION_ENFORCE=1
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
With enforcement on, a gate fence carrying `validates=<checklist>` will be blocked if the specs file's `## Validation` section is missing, incomplete, or malformed. The error message names the specific problems and points to the protocol.
|
|
99
|
+
|
|
100
|
+
To disable all gate enforcement (including validation) for debugging:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
export SHARDS_GATE_ENFORCE=0
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
There is no validation-only escape hatch. If a particular phase should not require validation, remove the `validates=...` attribute from its gate fence (or set `validates=none`), rather than turning off enforcement globally.
|
|
107
|
+
|
|
108
|
+
## How the hook finds your specs file
|
|
109
|
+
|
|
110
|
+
The hook resolves `project-specs.md` in priority order:
|
|
111
|
+
|
|
112
|
+
1. `SHARDS_PROJECT_SPECS_PATH` env var if set — absolute path, overrides everything.
|
|
113
|
+
2. `project-specs.md` at the CWD if it exists.
|
|
114
|
+
3. The most recently modified `project-specs.md` under any conventional project directory: `analysis/<name>/`, `studies/<name>/`, `models/<name>/`, `data_models/<name>/`, `services/<name>/`, `research/<name>/`, `dashboards/<name>/`, `brainstorm/<name>/`, `fixes/<name>/`. Only immediate subdirectories are searched (one level deep).
|
|
115
|
+
|
|
116
|
+
If you work on multiple projects in the same session, the "most recently modified" rule keeps validation pointed at the active project. To pin the hook to a specific file (e.g. for testing), set `SHARDS_PROJECT_SPECS_PATH` explicitly.
|
|
117
|
+
|
|
118
|
+
## What the hook checks
|
|
119
|
+
|
|
120
|
+
Structural only — the hook does not (and cannot) judge whether your evidence is *real*. That's Syn's job during final review.
|
|
121
|
+
|
|
122
|
+
| Check | Error code |
|
|
123
|
+
|-------|------------|
|
|
124
|
+
| `## Validation` section exists | `MISSING_SECTION` |
|
|
125
|
+
| `**Track:**` is `quick`, `deep`, or `fixer` | `MISSING_TRACK` |
|
|
126
|
+
| `**Mode:**` line, if present, has a non-empty value | `EMPTY_MODE` |
|
|
127
|
+
| `**Checklist:**` line references a `validation_checklist.md` | `MISSING_CHECKLIST` |
|
|
128
|
+
| Evidence table has ≥1 data row | `NO_EVIDENCE_ROWS` |
|
|
129
|
+
| Every row has non-empty Check, Expected, Observed | `INCOMPLETE_EVIDENCE_ROW` |
|
|
130
|
+
| Every row's Pass/Fail is `✓`, `✗`, or `n/a` | `INVALID_PASS_FAIL` |
|
|
131
|
+
| `n/a` rows have non-empty Notes | `NA_WITHOUT_JUSTIFICATION` |
|
|
132
|
+
| Artifacts section has ≥1 bullet | `NO_ARTIFACTS` |
|
|
133
|
+
| Downstream Impact has ≥1 bullet | `NO_DOWNSTREAM` |
|
|
134
|
+
| Summary has ≥20 non-whitespace chars | `SUMMARY_TOO_SHORT` |
|
|
135
|
+
|
|
136
|
+
## How validation composes with final review
|
|
137
|
+
|
|
138
|
+
When a specialist invokes Syn for sign-off via `Task(subagent_type="syn", ...)`, Syn reads the `## Validation` section and checks the *semantic* quality the hook can't:
|
|
139
|
+
|
|
140
|
+
- Is the Observed value measurable, or prose that could be true of a broken implementation?
|
|
141
|
+
- Did the specialist run the checks its declared Track requires, or skip them with vague `n/a` justifications?
|
|
142
|
+
- Are failed checks hidden or surfaced in Open Issues?
|
|
143
|
+
- Does the Summary match the evidence?
|
|
144
|
+
|
|
145
|
+
A structurally-complete but semantically-empty validation section returns `NEEDS REVISION` from Syn. See `reviewer-verdicts.md` for the verdict flow.
|
|
146
|
+
|
|
147
|
+
## Common failure modes
|
|
148
|
+
|
|
149
|
+
- **Box-ticking theater.** Filling the evidence table with plausible prose rather than measured values. Defense: Syn's semantic review, plus your own review at the gate.
|
|
150
|
+
- **Code-runs conflation.** "The query executed" is not evidence. Execution is a precondition; correctness is the check.
|
|
151
|
+
- **Retroactive validation.** Validating after you've accepted the gate and moved on. Validation comes *before* the gate, not after.
|
|
152
|
+
- **Self-satisfying tests.** A test that asserts what the code does (rather than what the code should do) passes trivially. If the test would pass against a broken implementation, it's not validation.
|
|
153
|
+
- **Downstream blind spots.** Changes to a shared model without checking dependent consumers. The Downstream Impact line exists for exactly this.
|
|
154
|
+
|
|
155
|
+
## Writing your own checklist (for extending Shards)
|
|
156
|
+
|
|
157
|
+
To add a validation checklist for a new agent:
|
|
158
|
+
|
|
159
|
+
1. Create `src/agents/specific_instructions/<agent>/validation_checklist.md`.
|
|
160
|
+
2. Pick a stable prefix for check IDs (e.g., `XX-01`).
|
|
161
|
+
3. Define the checks, each with: name, purpose, `Observed format:` line.
|
|
162
|
+
4. Write a Track Calibration table indexed by `(Track, Mode)`.
|
|
163
|
+
5. List expected artifacts and downstream-impact concerns.
|
|
164
|
+
6. List escalation triggers.
|
|
165
|
+
7. Add `validates=<agent_name>` to the agent's final build-phase gate fence in the appropriate `phases/phase-<N>.md` file (or `phases_deep/phase-<N>.md` for dual-track agents).
|
|
166
|
+
|
|
167
|
+
Use `analytics_engineer/validation_checklist.md` or `ml_engineer/validation_checklist.md` as a reference shape.
|
|
168
|
+
|
|
169
|
+
## Related
|
|
170
|
+
|
|
171
|
+
- [Gate Pattern](gate-pattern.md) — the enforcement substrate validation builds on
|
|
172
|
+
- [Behavioral Rules](behavioral-rules.md) — where the validation reference lands in each agent
|
|
173
|
+
- [Reviewer Verdicts](reviewer-verdicts.md) — Syn's semantic check on the validation section
|
|
174
|
+
- [Knowledge Ledger](knowledge-ledger.md) — validation findings are a primary harvest source
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Activity Bar
|
|
2
|
+
|
|
3
|
+
The vertical strip of icons on the left edge of the UI. Switches what appears in the sidebar pane to its right.
|
|
4
|
+
|
|
5
|
+
## Buttons
|
|
6
|
+
|
|
7
|
+
| Icon | View | What it shows |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Folder | Explorer | Project file tree |
|
|
10
|
+
| Clock | Session Files | Files referenced or opened during this chat session |
|
|
11
|
+
| Bookmark | Bookmarks | Files, lines, and symbols you've pinned |
|
|
12
|
+
| Branch | Source Control | Git status, changes, diff and PR views |
|
|
13
|
+
| Brain | Knowledge Map | Knowledge Ledger entries, graph + card view |
|
|
14
|
+
| Book | Guide | This developer guide |
|
|
15
|
+
|
|
16
|
+
The active button is highlighted. Clicking a button when its view is already active toggles the sidebar collapsed state.
|
|
17
|
+
|
|
18
|
+
## Explorer
|
|
19
|
+
|
|
20
|
+
- File tree with lazy-loaded folders.
|
|
21
|
+
- Search filters the listing live.
|
|
22
|
+
- Switch between tree view and flat list (top-right toggle).
|
|
23
|
+
- Click a file to open in the right pane; Cmd+click (or middle-click) opens in a new tab.
|
|
24
|
+
- Right-click for context menu: reveal in Finder, copy path, bookmark.
|
|
25
|
+
|
|
26
|
+
## Session Files
|
|
27
|
+
|
|
28
|
+
- Populated as the chat agent references files.
|
|
29
|
+
- Fastest way to jump back to "the file we were just talking about".
|
|
30
|
+
- Shows file path and last-touched timestamp.
|
|
31
|
+
|
|
32
|
+
## Bookmarks
|
|
33
|
+
|
|
34
|
+
- Add bookmarks from the editor (star icon on gutter), from the command palette, or via `Cmd+D`.
|
|
35
|
+
- Supports file-level, line-level, and symbol-level bookmarks.
|
|
36
|
+
- Persists in `.shards/bookmarks.json`.
|
|
37
|
+
|
|
38
|
+
## Source Control
|
|
39
|
+
|
|
40
|
+
- Lists changed files with status badges (M / A / D / U).
|
|
41
|
+
- Branch name and remote status at the top.
|
|
42
|
+
- Click any file to open a diff view.
|
|
43
|
+
- PR review: when a PR is checked out, inline comment threads appear.
|
|
44
|
+
- See [Git](git.md).
|
|
45
|
+
|
|
46
|
+
## Knowledge Map
|
|
47
|
+
|
|
48
|
+
- Card view: one card per ledger entry.
|
|
49
|
+
- Graph view: entries clustered by tag and entity references.
|
|
50
|
+
- Click a card to open the raw markdown in the editor.
|
|
51
|
+
- See [Knowledge Map](knowledge-map.md).
|
|
52
|
+
|
|
53
|
+
## Guide
|
|
54
|
+
|
|
55
|
+
- TOC tree on the left of the panel, page content on the right.
|
|
56
|
+
- Live search across all guide pages.
|
|
57
|
+
- Remembers last-viewed page across browser reloads.
|
|
58
|
+
- Also browsable as plain markdown in `docs/shards-guide/`.
|
|
59
|
+
|
|
60
|
+
## Keybindings
|
|
61
|
+
|
|
62
|
+
- `Cmd+B` — toggle the sidebar (collapses activity bar view pane).
|
|
63
|
+
- `Cmd+Shift+E` — focus Explorer.
|
|
64
|
+
- `Cmd+Shift+G` — focus Source Control.
|
|
65
|
+
- `Cmd+Shift+B` — focus Bookmarks.
|
|
66
|
+
|
|
67
|
+
## See also
|
|
68
|
+
|
|
69
|
+
- [Overview](overview.md)
|
|
70
|
+
- [Keybindings](keybindings.md)
|