@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,80 @@
|
|
|
1
|
+
# ML Engineer
|
|
2
|
+
|
|
3
|
+
> Intense, infrastructure-focused. The shard for production ML systems.
|
|
4
|
+
|
|
5
|
+
Specializes in production machine learning — recommenders, ranking, classification, regression, and end-to-end ML pipelines. Considers infrastructure constraints (memory, CPU, latency) alongside model quality.
|
|
6
|
+
|
|
7
|
+
## Activation menu
|
|
8
|
+
|
|
9
|
+
- `[T]` Triage — Scope a new project, classify greenfield vs. iteration.
|
|
10
|
+
- `[B]` Build — Full phased ML engineering workflow.
|
|
11
|
+
- `[R]` Review — Evaluate an existing ML model or pipeline.
|
|
12
|
+
- `[ADV]` Advisory — Discuss options, trade-offs, methodology.
|
|
13
|
+
- `[EX]` Experiment — Targeted experiments on an existing model.
|
|
14
|
+
- `[AR]` Autonomous Research — Self-steering loop against a metric.
|
|
15
|
+
|
|
16
|
+
## Modes
|
|
17
|
+
|
|
18
|
+
| Mode | File | Purpose |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| Phases (Build) | `specific_instructions/ml_engineer/phases/` | Full phased workflow — one file per phase, progressively loaded. |
|
|
21
|
+
| Review | `specific_instructions/ml_engineer/review.md` | Review-only. |
|
|
22
|
+
| Advisory | `specific_instructions/ml_engineer/advise.md` | Advisor mode. |
|
|
23
|
+
| Experiment | `specific_instructions/ml_engineer/experiment.md` | Fixed-N experimentation. |
|
|
24
|
+
| Experiment UI | `specific_instructions/ml_engineer/experiment_ui_mode.md` | Experiment with UI dashboard. |
|
|
25
|
+
| Research | `specific_instructions/ml_engineer/research.md` | Autonomous Research loop. |
|
|
26
|
+
| Research UI | `specific_instructions/ml_engineer/research_ui_mode.md` | AR with UI dashboard. |
|
|
27
|
+
| BI handoff | `specific_instructions/ml_engineer/bi_engineer_handoff.md` | Monitoring dashboard handoff. |
|
|
28
|
+
|
|
29
|
+
## Phases (Build mode)
|
|
30
|
+
|
|
31
|
+
1. **Business Requirements** — problem, decision, users, cost of error.
|
|
32
|
+
2. **Scope and Constraints** — serving mode, latency, throughput, fallback.
|
|
33
|
+
3. **Data and Feature Discovery** — Data Modeller consult; label definition; feature candidates.
|
|
34
|
+
4. **Model Design** — baseline/candidates, evaluation strategy; optional cross-specialist review.
|
|
35
|
+
5. **Infrastructure Design** — training pipeline, serving, monitoring, rollback.
|
|
36
|
+
6. **Execute** — build feature queries, training notebook, `eval-results.json`.
|
|
37
|
+
7. **Review and Handoff** — Backend Engineer code review, MLOps Engineer infrastructure review, Syn final review, model card, report.
|
|
38
|
+
|
|
39
|
+
## Consultants
|
|
40
|
+
|
|
41
|
+
- **Data Engineer** — Phase 2, Phase 5.
|
|
42
|
+
- **Data Modeller** — Phase 3, Phase 5, Phase 6.
|
|
43
|
+
- **Data Scientist** — Phase 4 when productionizing a study.
|
|
44
|
+
- **Applied ML Scientist** — Phase 4 when non-standard methodology is needed.
|
|
45
|
+
- **Deep Learning Engineer** — Phase 4 when a DL approach is warranted.
|
|
46
|
+
- **Data Analyst** — Phase 4 when high interpretability is required.
|
|
47
|
+
- **Researcher** — Phase 4 when statistical inference matters.
|
|
48
|
+
- **Backend Engineer** — Phase 7 code review.
|
|
49
|
+
- **MLOps Engineer** — Phase 7 serving/infrastructure review.
|
|
50
|
+
- **Academic** — Phase 7 model card ethics review.
|
|
51
|
+
- **Syn** — Phase 7 final review.
|
|
52
|
+
|
|
53
|
+
## Output directory
|
|
54
|
+
|
|
55
|
+
`models/<project_name>/` (greenfield) or the existing service directory (iteration).
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
models/<project>/
|
|
59
|
+
├── project-specs.md
|
|
60
|
+
├── queries/
|
|
61
|
+
├── notebooks/
|
|
62
|
+
├── eval-results.json
|
|
63
|
+
├── model-card.json
|
|
64
|
+
├── report.md
|
|
65
|
+
└── bi_engineer_handoff.md (optional)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Entry points
|
|
69
|
+
|
|
70
|
+
- Slash command: `/ml-engineer`
|
|
71
|
+
- Skill: `ml-engineer`
|
|
72
|
+
- Through Syn triage (`/shards`)
|
|
73
|
+
|
|
74
|
+
## See also
|
|
75
|
+
|
|
76
|
+
- [MLOps Engineer](mlops-engineer.md)
|
|
77
|
+
- [Applied ML Scientist](applied-ml-scientist.md)
|
|
78
|
+
- [Deep Learning Engineer](deep-learning-engineer.md)
|
|
79
|
+
- [Autonomous Research](../03-protocols/autonomous-research.md)
|
|
80
|
+
- Source: `src/agents/ml-engineer.md`
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# MLOps Engineer
|
|
2
|
+
|
|
3
|
+
> Perpetually stressed. Cares about reliability, observability, and scalability.
|
|
4
|
+
|
|
5
|
+
Specializes in deploying, monitoring, and maintaining ML systems in production. Handles model serving (BentoML, TorchServe, Triton), training pipeline orchestration (Kubeflow, Vertex AI Pipelines, SageMaker Pipelines, Airflow), model registries, feature stores, drift detection, and retraining automation. Deep expertise in AWS SageMaker and GCP Vertex AI.
|
|
6
|
+
|
|
7
|
+
## Activation menu
|
|
8
|
+
|
|
9
|
+
- `[T]` Triage — Greenfield, iteration, or model handoff?
|
|
10
|
+
- `[B]` Build — Full operationalization workflow.
|
|
11
|
+
- `[R]` Review — Evaluate an existing ML deployment or training pipeline.
|
|
12
|
+
- `[ADV]` Advisory — Discuss MLOps design options.
|
|
13
|
+
|
|
14
|
+
## Modes
|
|
15
|
+
|
|
16
|
+
| Mode | File | Purpose |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| Phases (Build) | `specific_instructions/mlops_engineer/phases/` | Full operationalization workflow — one file per phase, progressively loaded. |
|
|
19
|
+
| Review | `specific_instructions/mlops_engineer/review.md` | Deployment review. |
|
|
20
|
+
| Advisory | `specific_instructions/mlops_engineer/advise.md` | Advisor mode. |
|
|
21
|
+
| Service Mode | `specific_instructions/mlops_engineer/service_mode.md` | Service consultation mode (invoked by ML Engineer or AI Engineer for deployment review). |
|
|
22
|
+
|
|
23
|
+
## Phases
|
|
24
|
+
|
|
25
|
+
1. **Requirements** — serving pattern (batch/real-time/streaming), SLOs, scale.
|
|
26
|
+
2. **Platform Selection** — AWS/GCP/on-prem, model serving framework, orchestrator.
|
|
27
|
+
3. **Serving Design** — endpoint contract, autoscaling, fallback, versioning.
|
|
28
|
+
4. **Training Pipeline** — orchestration, data validation, retraining triggers.
|
|
29
|
+
5. **Monitoring** — metrics, drift detection, alerting.
|
|
30
|
+
6. **Build** — terraform/helm/config files, CI/CD.
|
|
31
|
+
7. **Review** — Syn final review.
|
|
32
|
+
|
|
33
|
+
## Consultants
|
|
34
|
+
|
|
35
|
+
- **ML Engineer** — model architecture constraints and infrastructure design review.
|
|
36
|
+
- **AI Engineer** — LLM-specific deployment requirements.
|
|
37
|
+
- **Syn** — final review.
|
|
38
|
+
|
|
39
|
+
## Consulted by
|
|
40
|
+
|
|
41
|
+
- **ML Engineer** — Phase 7 serving/infrastructure review.
|
|
42
|
+
- **AI Engineer** — Phase 7 deployment review.
|
|
43
|
+
|
|
44
|
+
## Output directory
|
|
45
|
+
|
|
46
|
+
`services/<project_name>/` — terraform, helm charts, pipeline configs, serving configs.
|
|
47
|
+
|
|
48
|
+
## Entry points
|
|
49
|
+
|
|
50
|
+
- Slash command: `/mlops-engineer`
|
|
51
|
+
- Skill: `mlops-engineer`
|
|
52
|
+
- Through Syn triage (`/shards`)
|
|
53
|
+
- Via Task from ML Engineer or AI Engineer
|
|
54
|
+
|
|
55
|
+
## See also
|
|
56
|
+
|
|
57
|
+
- [ML Engineer](ml-engineer.md)
|
|
58
|
+
- [AI Engineer](ai-engineer.md)
|
|
59
|
+
- Source: `src/agents/mlops-engineer.md`
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Agent Taxonomy
|
|
2
|
+
|
|
3
|
+
Shards ships 15 agents: one orchestrator (Syn), 12 specialists with phased workflows, and 2 review-only advisors.
|
|
4
|
+
|
|
5
|
+
## By type
|
|
6
|
+
|
|
7
|
+
| Type | Agents | Characteristics |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| **Orchestrator** | Syn | Triage, delegation, final review. No phased workflow of its own. |
|
|
10
|
+
| **Specialist — analysis** | Data Analyst, Data Scientist | Produce analysis artifacts (SQL, notebooks, reports). |
|
|
11
|
+
| **Specialist — data** | Data Engineer, Data Modeller, Analytics Engineer | Build pipelines, model entities, design transformation layers. |
|
|
12
|
+
| **Specialist — ML/AI** | ML Engineer, AI Engineer, Applied ML Scientist, Deep Learning Engineer, MLOps Engineer | Design, build, and deploy ML and AI systems. |
|
|
13
|
+
| **Specialist — visualization** | BI Engineer | Dashboards and data visualization. |
|
|
14
|
+
| **Specialist — code** | Backend Engineer | Python code review and cleanup. |
|
|
15
|
+
| **Review-only** | Researcher, Academic | Consulted by other specialists; no projects of their own. |
|
|
16
|
+
|
|
17
|
+
## By "quick vs. deep"
|
|
18
|
+
|
|
19
|
+
Some specialists support two tracks:
|
|
20
|
+
|
|
21
|
+
- **Quick Track** — 2-3 phases for tactical work (a bug fix, a single query, a mart iteration).
|
|
22
|
+
- **Deep Track** — 6-8 phases for greenfield or multi-week projects.
|
|
23
|
+
|
|
24
|
+
Quick/Deep agents: Data Engineer, Data Modeller, Analytics Engineer.
|
|
25
|
+
|
|
26
|
+
The Data Analyst is quick-only by design (escalates to Data Scientist for deep work).
|
|
27
|
+
|
|
28
|
+
## Picking the right shard
|
|
29
|
+
|
|
30
|
+
| If you want to... | Use |
|
|
31
|
+
|---|---|
|
|
32
|
+
| Answer a quick business question with SQL | [Data Analyst](data-analyst.md) |
|
|
33
|
+
| Investigate causally, model, or build a study | [Data Scientist](data-scientist.md) |
|
|
34
|
+
| Build a production ranking/classification model | [ML Engineer](ml-engineer.md) |
|
|
35
|
+
| Build an LLM, RAG, or agent system | [AI Engineer](ai-engineer.md) |
|
|
36
|
+
| Design or debug a neural architecture | [Deep Learning Engineer](deep-learning-engineer.md) |
|
|
37
|
+
| Propose a novel ML method | [Applied ML Scientist](applied-ml-scientist.md) |
|
|
38
|
+
| Deploy/monitor/retrain a model | [MLOps Engineer](mlops-engineer.md) |
|
|
39
|
+
| Build a data pipeline or dbt model | [Data Engineer](data-engineer.md) |
|
|
40
|
+
| Design a schema or resolve grain issues | [Data Modeller](data-modeller.md) |
|
|
41
|
+
| Build a mart or transformation layer | [Analytics Engineer](analytics-engineer.md) |
|
|
42
|
+
| Build a dashboard | [BI Engineer](bi-engineer.md) |
|
|
43
|
+
| Review Python code for quality | [Backend Engineer](backend-engineer.md) |
|
|
44
|
+
| Validate statistical methodology | [Researcher](researcher.md) |
|
|
45
|
+
| Assess safety, ethics, or behavioral efficacy | [Academic](academic.md) |
|
|
46
|
+
| Not sure? | [Syn](syn.md) — run `/shards` and it'll triage |
|
|
47
|
+
|
|
48
|
+
## How shards talk to each other
|
|
49
|
+
|
|
50
|
+
Shards consult each other via the Claude Code **Task tool** at defined points in their phased workflows. Common patterns:
|
|
51
|
+
|
|
52
|
+
- The Data Scientist consults the **Researcher** for statistical methodology review.
|
|
53
|
+
- The ML Engineer consults the **Data Modeller** for feature source understanding.
|
|
54
|
+
- The AI Engineer consults the **Academic** for safety and ethics assessment.
|
|
55
|
+
- Every specialist's final phase invokes **Syn** for sign-off.
|
|
56
|
+
|
|
57
|
+
Consultations happen in-phase and do not transfer context permanently — the consulted shard returns a verdict and exits.
|
|
58
|
+
|
|
59
|
+
## See also
|
|
60
|
+
|
|
61
|
+
- One page per agent in this section (see left sidebar).
|
|
62
|
+
- [Example Workflows](../07-workflows/quick-analysis.md) — real projects showing how shards chain together.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Researcher
|
|
2
|
+
|
|
3
|
+
> Nerdy. Asks hard questions about assumptions and validity.
|
|
4
|
+
|
|
5
|
+
Specializes in reviewing statistical methodology, distribution assumptions, outlier detection, and analytical rigor. A consultative agent — does not produce project files or documentation, with a single narrowly-scoped exception: the `[CR]` Critical Review mode lets the user opt into a written review file.
|
|
6
|
+
|
|
7
|
+
## Activation menu
|
|
8
|
+
|
|
9
|
+
- `[R]` Review — Review an analysis plan or methodology.
|
|
10
|
+
- `[D]` Distributions — Help assess what distribution your data follows.
|
|
11
|
+
- `[O]` Outliers — Advise on outlier detection and handling.
|
|
12
|
+
- `[A]` Assumptions — Check statistical assumptions for a method.
|
|
13
|
+
- `[S]` Sample Size — Power analysis and sample adequacy.
|
|
14
|
+
- `[M]` Method Pick — Help choose the right statistical method.
|
|
15
|
+
- `[E]` Explain — Explain a statistical concept in plain language.
|
|
16
|
+
- `[CR]` Critical Review — Critically audit a written report for accuracy, thoroughness, fairness.
|
|
17
|
+
|
|
18
|
+
## Modes
|
|
19
|
+
|
|
20
|
+
| Mode | File | Purpose |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| Service Mode | `specific_instructions/researcher/service_mode.md` | Service consultation mode invoked by other specialists for methodology review. Includes a `SERVICE MODE — REPORT REVIEW` branch for Task-based dispatch of `[CR]` critiques. |
|
|
23
|
+
| Review Checklist | `specific_instructions/researcher/review_checklist.md` | Review checklist by problem type. Includes Report-Specific Checks for `[CR]` mode. |
|
|
24
|
+
| Critical Review | `specific_instructions/researcher/critical_review.md` | Audit a finished `.md` report against three lenses: Accuracy, Thoroughness, Fairness (5-phase workflow). |
|
|
25
|
+
|
|
26
|
+
## Phases
|
|
27
|
+
|
|
28
|
+
Most modes are service-only. When invoked, the Researcher returns a verdict:
|
|
29
|
+
|
|
30
|
+
- `SOUND` — Methodology is appropriate.
|
|
31
|
+
- `CONSIDER ALTERNATIVES` — Valid but alternatives might serve better.
|
|
32
|
+
- `REVISE` — Methodological issues that must be addressed.
|
|
33
|
+
|
|
34
|
+
### Phases (Critical Review mode)
|
|
35
|
+
|
|
36
|
+
The `[CR]` mode points the Researcher at a finished `.md` report (study writeup, analysis, A/B test report, model evaluation report) and produces a structured critique against three lenses:
|
|
37
|
+
|
|
38
|
+
- **Accuracy** — methods appropriate to the data and question; reported quantities follow from the methodology used.
|
|
39
|
+
- **Thoroughness** — assumption checks, sensitivity analyses, multiple-testing correction, uncertainty reporting.
|
|
40
|
+
- **Fairness** — statistical vs. practical significance; causal language vs. correlational design; proportional acknowledgement of limitations.
|
|
41
|
+
|
|
42
|
+
1. **Scope (GATE)** — report path, lens, referenced artifacts to spot-read, output preference (inline-in-chat or file), output dir override.
|
|
43
|
+
2. **Read & Extract Methodological Claims** — inventory methodology, sample, assumptions, outlier handling, reported quantities, and interpretive language.
|
|
44
|
+
3. **Apply Statistical Checklist** — every section of `review_checklist.md`, including the Report-Specific Checks.
|
|
45
|
+
4. **Three-Lens Critical Assessment** — Accuracy / Thoroughness / Fairness; severity-tag each finding.
|
|
46
|
+
5. **Deliver Review (GATE)** — inline or file (default location: same directory as the reviewed report).
|
|
47
|
+
|
|
48
|
+
Also exposed as `SERVICE MODE — REPORT REVIEW` for Task-based dispatch from Syn or other specialists (always inline, no file write).
|
|
49
|
+
|
|
50
|
+
## Consulted by
|
|
51
|
+
|
|
52
|
+
- **Data Analyst** — Phase 2 methodology review.
|
|
53
|
+
- **Data Scientist** — Phase 3 and Phase 6 methodology / build review.
|
|
54
|
+
- **ML Engineer** — Phase 4 when statistical inference matters.
|
|
55
|
+
- **AI Engineer** — Phase 4 and Phase 7 evaluation framework review.
|
|
56
|
+
- **Applied ML Scientist** — methodology review.
|
|
57
|
+
- **Deep Learning Engineer** — statistical evaluation of benchmark results.
|
|
58
|
+
|
|
59
|
+
## Output directory
|
|
60
|
+
|
|
61
|
+
- **All modes except `[CR]`** — none. The Researcher produces conversational findings, not files.
|
|
62
|
+
- **`[CR]` Critical Review (file output, opt-in only)** — same directory as the reviewed report, named `researcher-critical-review-of-<report-slug>.md` (user can override during Phase 1). This is the single exception to the "review, don't produce" invariant; the user must explicitly opt into a file in Phase 1, otherwise output stays inline.
|
|
63
|
+
|
|
64
|
+
## Entry points
|
|
65
|
+
|
|
66
|
+
- Slash command: `/researcher`
|
|
67
|
+
- Skill: `researcher`
|
|
68
|
+
- Via Task from other specialists
|
|
69
|
+
|
|
70
|
+
## See also
|
|
71
|
+
|
|
72
|
+
- [Reviewer Verdicts](../03-protocols/reviewer-verdicts.md)
|
|
73
|
+
- Source: `src/agents/researcher.md`
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Syn — Orchestrator
|
|
2
|
+
|
|
3
|
+
> Friendly, structured. The entry point to everything.
|
|
4
|
+
|
|
5
|
+
Syn is the orchestrator of the Shards suite. Its job is to triage incoming requests, decide which specialist should handle the work, initialize the project directory and `project-specs.md`, and hand off. Syn also serves as the universal final reviewer — every specialist invokes Syn for sign-off before execution.
|
|
6
|
+
|
|
7
|
+
## Activation menu
|
|
8
|
+
|
|
9
|
+
- `[T]` **Triage** — Tell me what you need and I'll figure out who handles it.
|
|
10
|
+
- `[F]` **Fix** — Quick fix or minor update on something that exists. Syn applies the fix directly, suspending the "facilitate don't generate" rule.
|
|
11
|
+
- `[P]` **Project** — Multi-specialist project. Syn plans, coordinates, and reviews the whole thing.
|
|
12
|
+
- `[S]` **Status** — Check on a current project.
|
|
13
|
+
- `[R]` **Review** — Review a specialist's plan before execution.
|
|
14
|
+
- `[B]` **Brainstorm** — Bring a problem (or nothing) and let the shards ideate.
|
|
15
|
+
- `[D]` **Diff** — Compare two projects side by side.
|
|
16
|
+
- `[K]` **Knowledge** — Seed, browse, or manage the Knowledge Ledger.
|
|
17
|
+
- `[G]` **GitHub PR** — Walk through PR review comments and apply fixes with approval.
|
|
18
|
+
- `[NW]` **Notebook** — Live cell-by-cell walkthrough of a Jupyter notebook (run, explain, ask, edit).
|
|
19
|
+
- `[PR]` **Panel Review** — Convene a panel of specialists to review a directory, coalesce findings, and plan sequenced fixes.
|
|
20
|
+
- `[SL]` **Slides** — Build a Google Slides deck with specialist gut-checks at outline + post-build.
|
|
21
|
+
- `[FF]` **Free Form** — General assistant mode: chat or work directly, spawning shards or any installed agents/skills as subagents.
|
|
22
|
+
|
|
23
|
+
## Modes
|
|
24
|
+
|
|
25
|
+
Syn's mode files live at `.claude/agents/specific_instructions/syn/`:
|
|
26
|
+
|
|
27
|
+
| Mode | File | Purpose |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| Brainstorm | `brainstorm.md` | Multi-agent ideation with parallel specialist fan-out. Pushes a live UI panel via `brainstorm/brainstorm_<project>.state.json`. Also has the `/brainstorm` command entry point. |
|
|
30
|
+
| Fixer | `fixer.md` | `[F]` Direct fix mode. Syn implements minor fixes without specialist handoff. |
|
|
31
|
+
| PM | `pm.md` | `[P]` Project Manager. Orchestrates a multi-specialist project from a `project-plan.md`; workstreams run via Task. |
|
|
32
|
+
| Free Form | `free_form.md` | `[FF]` General assistant mode: no phases or gates, direct work plus spawning shards or any installed agents/skills as subagents. |
|
|
33
|
+
| Panel Review | `panel_review.md` | `[PR]` Multi-specialist review of any directory, coalesced into a prioritized report + sequencing plan. |
|
|
34
|
+
| Slides | `slides.md` | `[SL]` Google Slides deck drafting (via MCP) with specialist polls at outline + post-build. |
|
|
35
|
+
| Notebook Walkthrough | `notebook_walkthrough.md` | `[NW]` Live cell-by-cell notebook walkthrough via the `notebook-kernel.py` helper. |
|
|
36
|
+
| Code Review | `code_review.md` | Triggered when a specialist calls Task with `CODE REVIEW MODE`. Partitions Python vs. non-Python and dispatches to Backend Engineer / Analytics Engineer. |
|
|
37
|
+
| Final Review | `final_review.md` | Read when specialists invoke Syn for sign-off. Returns `APPROVED` / `NEEDS REVISION` / `BLOCKED`. |
|
|
38
|
+
| Arbiter | `arbiter.md` | Time-Travel branch comparison. Reads all branch reports, builds leaderboard, recommends a winner. |
|
|
39
|
+
| Diff | `diff.md` | `[D]` Cross-project comparison. Produces structured diff report. |
|
|
40
|
+
| Knowledge | `knowledge.md` | `[K]` and `/knowledge` command. Seed, browse, and manage the Knowledge Ledger. |
|
|
41
|
+
| PR Review | `pr_review.md` | `[G]` and `/review-pr` command. Walks through GitHub PR comments with guided fixes. |
|
|
42
|
+
|
|
43
|
+
**Swarm protocol.** For genuinely large tasks, Syn defaults to **decompose-and-
|
|
44
|
+
swarm**: split the work into bounded slices and run multiple same-type
|
|
45
|
+
subagents in parallel, then merge the results. See
|
|
46
|
+
[Decompose & Swarm](../03-protocols/swarm.md) and
|
|
47
|
+
`specific_instructions/shared/swarm_protocol.md`. Applies in PM Mode, Free
|
|
48
|
+
Form, and general orchestration; small work stays on a single agent.
|
|
49
|
+
|
|
50
|
+
## Phases
|
|
51
|
+
|
|
52
|
+
Syn does not have phases of its own. It runs a **Phase 0 Triage** that selects a specialist, creates the project directory and `project-specs.md` scaffold, then performs an **in-session persona transfer** (Syn becomes the specialist). All subsequent phases belong to that specialist.
|
|
53
|
+
|
|
54
|
+
## Consulted by
|
|
55
|
+
|
|
56
|
+
Every specialist invokes Syn for final review via Task. Syn returns a three-tier verdict — see [Reviewer Verdicts](../03-protocols/reviewer-verdicts.md).
|
|
57
|
+
|
|
58
|
+
## Output directory
|
|
59
|
+
|
|
60
|
+
Syn doesn't have a dedicated output directory. It writes to:
|
|
61
|
+
|
|
62
|
+
- `brainstorm/` for brainstorm sessions.
|
|
63
|
+
- `fixes/` for the Fixer mode.
|
|
64
|
+
- `projects/` for PM Mode (`project-plan.md` + `workstreams.json`).
|
|
65
|
+
- `presentations/<deck_slug>/` for Slides mode.
|
|
66
|
+
- `panels/<dirname>/` for Panel Review.
|
|
67
|
+
- `.shards/branches/` for DIVERGE branches.
|
|
68
|
+
- The target project directory when acting as final reviewer.
|
|
69
|
+
- Free Form writes where the user asks (no default). Swarmed workstreams nest
|
|
70
|
+
slices under the specialist's own convention (e.g. `studies/<name>/slice-<n>/`).
|
|
71
|
+
|
|
72
|
+
## Entry points
|
|
73
|
+
|
|
74
|
+
| From | How |
|
|
75
|
+
|---|---|
|
|
76
|
+
| Slash command | `/shards` |
|
|
77
|
+
| Brainstorm | `/brainstorm` |
|
|
78
|
+
| Knowledge Ledger | `/knowledge` |
|
|
79
|
+
| PR review | `/review-pr` |
|
|
80
|
+
| UI | Any agent card labeled "Syn" in the agent picker |
|
|
81
|
+
|
|
82
|
+
## See also
|
|
83
|
+
|
|
84
|
+
- [The Gate Pattern](../03-protocols/gate-pattern.md)
|
|
85
|
+
- [Reviewer Verdicts](../03-protocols/reviewer-verdicts.md)
|
|
86
|
+
- [DIVERGE](../03-protocols/diverge.md) — Syn Arbiter mode
|
|
87
|
+
- [Decompose & Swarm](../03-protocols/swarm.md) — parallel slices for large work
|
|
88
|
+
- Source: `src/agents/syn.md`
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Auto-Verify Mode
|
|
2
|
+
|
|
3
|
+
A scope-bounded auto-approval mechanism for the bulk read-only verification work that specialists do at predictable points in their phases. Brackets a stretch of safe, repetitive tool calls inside a marker pair so the gate hook auto-approves them — without weakening gates, deny rules, or the user's ability to halt.
|
|
4
|
+
|
|
5
|
+
Referenced by Data Modeller, Analytics Engineer, Data Engineer, Data Analyst, ML Engineer (consultation side), Data Scientist (consultation side), and the join-path protocol.
|
|
6
|
+
|
|
7
|
+
## The problem it solves
|
|
8
|
+
|
|
9
|
+
Specialists run the same shape of read-only query over and over during validation:
|
|
10
|
+
|
|
11
|
+
- Per-model grain checks (`count(*) vs count(distinct pk)`)
|
|
12
|
+
- Join fan-out (count before / count after) at every join
|
|
13
|
+
- PK/FK null checks per column
|
|
14
|
+
- Sample inspections (`dbt show --select <model> --limit 5`)
|
|
15
|
+
- Freshness checks per upstream table
|
|
16
|
+
- Read-only dbt subcommands (`dbt show`, `dbt ls`, `dbt parse`, `dbt compile`)
|
|
17
|
+
|
|
18
|
+
Each one fires its own permission prompt. A typical Data Modeller post-build sweep across five models with joins issues 15–25 prompts, all near-identical SELECTs. Users click "always allow" on the first one and lose the ability to spot the one prompt that actually matters; or they get tired of clicking and disengage.
|
|
19
|
+
|
|
20
|
+
Auto-verify gives specialists a way to bracket those stretches with a marker pair. While the block is open, the gate hook auto-approves tool calls that match a hardcoded read-only allowlist. Everything outside the allowlist still prompts. Phase and checkpoint gates always win.
|
|
21
|
+
|
|
22
|
+
## The marker pair
|
|
23
|
+
|
|
24
|
+
Open at the start of the verification stretch:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
::AUTO-VERIFY:: agent=<your-name> phase=<N> tool_budget=<N> ttl_minutes=<N>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Close at the end:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
::ENDAUTO::
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`agent` and `phase` are required (used in the audit log). `tool_budget` defaults to 20 and is clamped to 50; `ttl_minutes` defaults to 10 and is clamped to 30. Both bound how much can happen inside one block.
|
|
37
|
+
|
|
38
|
+
## What gets auto-approved
|
|
39
|
+
|
|
40
|
+
| Category | Examples |
|
|
41
|
+
|---|---|
|
|
42
|
+
| Always-safe tools | `Read`, `Glob`, `Grep`, `WebSearch` |
|
|
43
|
+
| Read-only Bash prefixes | `git status`, `git log`, `git diff`, `ls`, `cat`, `head`, `tail`, `wc`, `pip list`, `npm ls` |
|
|
44
|
+
| Read-only dbt subcommands | `dbt show`, `dbt ls`, `dbt list`, `dbt parse`, `dbt compile`, `dbt deps`, `dbt debug`, `dbt source freshness` |
|
|
45
|
+
| Read-only BigQuery CLI | `bq show`, `bq ls`, `bq head`, `bq query --dry_run` |
|
|
46
|
+
| SELECT-only warehouse-CLI SQL | `bq query "SELECT …"`, `psql -c "SELECT …"`, `snowsql -q "SELECT …"`, `clickhouse-client --query "SELECT …"`, `duckdb -c "SELECT …"`, `mysql -e "SELECT …"` |
|
|
47
|
+
|
|
48
|
+
The SQL guard parses the SQL string, strips comments, splits on `;`, and approves only if every statement starts with `SELECT` or `WITH` and contains no DDL/DML keyword (INSERT, UPDATE, DELETE, MERGE, CREATE, DROP, ALTER, TRUNCATE, GRANT, REVOKE, COPY, etc.). Comment-smuggled DDL is rejected.
|
|
49
|
+
|
|
50
|
+
## What never gets auto-approved
|
|
51
|
+
|
|
52
|
+
`Write`, `Edit`, `NotebookEdit`. `dbt run`, `dbt build`, `dbt seed`, `dbt snapshot` (writes — even with `--select`). `git push`, `git commit`. `INSERT`/`UPDATE`/`DELETE`/`MERGE` via warehouse CLI. Compound shell commands joined with `&&`/`||`/`;`/`|`. Commands with shell redirects (`>`, `>>`), command substitution (`$(...)`, backticks), or pipe-to-shell (`| sh`). MCP tools. Anything matching the user's `permissions.deny[]` list (Claude Code enforces that ahead of the hook).
|
|
53
|
+
|
|
54
|
+
If a tool call falls outside the allowlist, the prompt fires normally. The block stays open — a single prompt is not a signal to abandon it.
|
|
55
|
+
|
|
56
|
+
## How a block closes
|
|
57
|
+
|
|
58
|
+
1. The agent emits `::ENDAUTO::` in a later message
|
|
59
|
+
2. The tool budget hits zero (every auto-approval decrements it)
|
|
60
|
+
3. The TTL elapses
|
|
61
|
+
4. The user submits a prompt containing "stop", "halt", "pause", "cancel", "abort", "wait", "hold on", "no thanks", "nope", or "don't"
|
|
62
|
+
5. A real `::GATE::` opens — gates always win and suspend auto-verify
|
|
63
|
+
|
|
64
|
+
## How it composes with gates
|
|
65
|
+
|
|
66
|
+
Gates are unaffected by auto-verify. When a `kind=phase` or `kind=checkpoint` gate is open, the gate's allowlist (`Read`/`Glob`/`Grep`) takes over. Auto-verify state may still exist but it is suspended — no auto-approvals fire while a gate is open. After the gate closes, auto-verify resumes if its own budget/TTL haven't been exhausted (in practice, agents tend to `::ENDAUTO::` before emitting a phase gate).
|
|
67
|
+
|
|
68
|
+
## Audit trail
|
|
69
|
+
|
|
70
|
+
Every auto-approval is logged to `.shards/auto/history.jsonl` with timestamp, agent, phase, tool, command, and remaining budget. `tail -f` it during a session to see exactly what's being approved. The log is append-only and never auto-rotated by shards.
|
|
71
|
+
|
|
72
|
+
## Escape hatch
|
|
73
|
+
|
|
74
|
+
`SHARDS_AUTO_VERIFY=0` disables the auto-verify branch entirely. Markers are still parsed (so they don't appear as raw text) but no state is written and no tool calls are auto-approved.
|
|
75
|
+
|
|
76
|
+
`SHARDS_GATE_ENFORCE=0` continues to disable all gate enforcement, which also disables auto-verify (auto-verify lives inside the same hook).
|
|
77
|
+
|
|
78
|
+
## What this is not
|
|
79
|
+
|
|
80
|
+
- Not `--dangerously-skip-permissions`. The allowlist is hardcoded; the budget is bounded; the user can halt with one word.
|
|
81
|
+
- Not a replacement for the gate pattern. Gates always win.
|
|
82
|
+
- Not Claude Code's native `auto` mode (which is a separate Anthropic-side feature with its own gating and falls back to manual after classifier blocks). Auto-verify is hook-driven and works orthogonally to the user's selected permission mode.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Autonomous Research (AR)
|
|
2
|
+
|
|
3
|
+
A budget-bounded, self-steering research loop. The specialist proposes a change, evaluates it against a metric, auto-keeps or auto-reverts based on the result, and continues until the budget is exhausted or the metric converges.
|
|
4
|
+
|
|
5
|
+
Available on: Data Scientist, ML Engineer, AI Engineer, Applied ML Scientist, Deep Learning Engineer. Activated via `[AR]` on each agent's menu.
|
|
6
|
+
|
|
7
|
+
## The core loop
|
|
8
|
+
|
|
9
|
+
1. **Setup** — user defines the metric, the budget (iterations or wall clock), and the starting point.
|
|
10
|
+
2. **Hypothesis** — the specialist adapts a hypothesis based on prior iterations and the steering document.
|
|
11
|
+
3. **Implement** — small, reversible change to the current candidate.
|
|
12
|
+
4. **Evaluate** — run the eval, record the metric.
|
|
13
|
+
5. **Auto-keep / auto-revert** — if the metric improved, keep the change; if not, revert.
|
|
14
|
+
6. **Log** — append to `history.jsonl` and `results.json`.
|
|
15
|
+
7. **Check** — budget exhausted? Converged? Steering document updated? If not, go back to step 2.
|
|
16
|
+
|
|
17
|
+
## Key artifacts
|
|
18
|
+
|
|
19
|
+
| File | Purpose |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `research_brief.md` | The steering document. The user can edit it mid-loop; the specialist reads it each iteration. |
|
|
22
|
+
| `history.jsonl` | Iteration-by-iteration log: hypothesis, change, metric, decision. |
|
|
23
|
+
| `results.json` | Summary state — best candidate so far, convergence estimate, budget remaining. |
|
|
24
|
+
| `report.md` | Phase 3 research summary written after the loop exits. |
|
|
25
|
+
|
|
26
|
+
## Steering mid-loop
|
|
27
|
+
|
|
28
|
+
The user can edit `.shards/research_brief.md` while the loop is running. The next iteration reads the updated brief and adjusts hypothesis generation accordingly. This is Shards' answer to "I want to let it run but keep a hand on the wheel."
|
|
29
|
+
|
|
30
|
+
## Dual reviewer cadence
|
|
31
|
+
|
|
32
|
+
The AR loop invokes two review cadences:
|
|
33
|
+
|
|
34
|
+
- **Every iteration** — the specialist's own self-assessment (metric direction, cost).
|
|
35
|
+
- **Periodic** — a reviewer (Researcher, ML Engineer, etc.) reviews convergence evidence and methodology. Cadence varies per agent.
|
|
36
|
+
|
|
37
|
+
## Convergence detection
|
|
38
|
+
|
|
39
|
+
The loop auto-stops if:
|
|
40
|
+
|
|
41
|
+
- Budget exhausted.
|
|
42
|
+
- Metric has plateaued for N iterations.
|
|
43
|
+
- Specialist has produced N consecutive auto-reverts.
|
|
44
|
+
- User explicitly pauses via the steering document.
|
|
45
|
+
|
|
46
|
+
## AR fan-out (DIVERGE composition)
|
|
47
|
+
|
|
48
|
+
Section H of the protocol covers AR fan-out: multiple parallel approach families, each running its own AR loop. Used when the approach space itself is unclear — each DIVERGE branch runs AR, and Syn Arbiter compares the best candidates across branches at the end.
|
|
49
|
+
|
|
50
|
+
## UI integration
|
|
51
|
+
|
|
52
|
+
On Tier-1 agents (ML/AI/DS), AR mode pushes structured output to the UI's `experiment-dashboard` panel. The renderer detects `mode: "autonomous-research"` in `results.json` and renders AR enrichments: auto-decision color coding, cost strip, convergence badge.
|
|
53
|
+
|
|
54
|
+
## See also
|
|
55
|
+
|
|
56
|
+
- [DIVERGE](diverge.md)
|
|
57
|
+
- [Experiment Versioning](experiment-versioning.md)
|
|
58
|
+
- [UI Panels](../04-ui/panels.md) — experiment-dashboard
|
|
59
|
+
- Source: `src/agents/specific_instructions/shared/autonomous_research.md`
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Behavioral Rules
|
|
2
|
+
|
|
3
|
+
Four cross-cutting rules every specialist must follow. Codified in `src/agents/specific_instructions/shared/behavioral_rules.md` and referenced from each agent's Behavioral Rules section.
|
|
4
|
+
|
|
5
|
+
## 1. Document before advancing
|
|
6
|
+
|
|
7
|
+
No phase ends until its decisions are written to `project-specs.md` inside a `::GATE:: ... ::ENDGATE::` fence. See [The Gate Pattern](gate-pattern.md).
|
|
8
|
+
|
|
9
|
+
## 2. One phase at a time
|
|
10
|
+
|
|
11
|
+
Specialists advance one phase at a time and wait for your confirmation. They don't batch phases, even when the next phase is obvious. This keeps alignment tight and gives you cheap redirection points.
|
|
12
|
+
|
|
13
|
+
## 3. Announce cross-agent reviews
|
|
14
|
+
|
|
15
|
+
When a specialist invokes another specialist via Task (Researcher, Data Modeller, Backend Engineer, etc.), it announces the consultation to you before making the call. You see: who is being consulted, why, and what they'll return. You can veto.
|
|
16
|
+
|
|
17
|
+
## 4. Facilitate, don't generate
|
|
18
|
+
|
|
19
|
+
Specialists facilitate decisions — they ask, propose, and document — but they don't silently generate artifacts. Code, queries, reports are only written after the gate is closed.
|
|
20
|
+
|
|
21
|
+
**Exceptions:** Several Syn-native modes suspend this rule for scoped reasons:
|
|
22
|
+
- **`[F]` Fixer** — direct edit with no facilitation loop.
|
|
23
|
+
- **`[G]` PR Review** — Syn applies fixes directly during PR walkthrough.
|
|
24
|
+
- **`[NW]` Notebook Walkthrough** — Syn explains and executes cells.
|
|
25
|
+
- **`[SL]` Slides** — no specialist owns presentations; Syn drafts the outline and slide bodies and calls the Google Slides MCP directly. Polls specialists at two checkpoints (outline pre-build, post-build fidelity) for content gut-checks.
|
|
26
|
+
|
|
27
|
+
## Why this matters
|
|
28
|
+
|
|
29
|
+
These rules are the reason Shards projects produce auditable decision trails. Without them, agents would silently produce code you never agreed to, consult reviewers without your knowledge, and skip the documentation that makes the work auditable later.
|
|
30
|
+
|
|
31
|
+
## See also
|
|
32
|
+
|
|
33
|
+
- [The Gate Pattern](gate-pattern.md)
|
|
34
|
+
- [Reviewer Verdicts](reviewer-verdicts.md)
|
|
35
|
+
- Source: `src/agents/specific_instructions/shared/behavioral_rules.md`
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# DIVERGE — Time-Travel Branches
|
|
2
|
+
|
|
3
|
+
When 2-3 viable approaches exist in a planning phase, you can fork the project into parallel branches, execute them simultaneously, compare results, and promote the winner. This is Shards' answer to "I can't decide which approach will work best — let's just try all of them."
|
|
4
|
+
|
|
5
|
+
## When to use it
|
|
6
|
+
|
|
7
|
+
Good DIVERGE candidates:
|
|
8
|
+
|
|
9
|
+
- Multiple model architectures worth comparing (tree-based vs. gradient boosting vs. neural).
|
|
10
|
+
- Multiple prompt strategies (few-shot vs. chain-of-thought vs. tool use).
|
|
11
|
+
- Multiple join strategies for a query.
|
|
12
|
+
- Multiple transformation-layer designs.
|
|
13
|
+
|
|
14
|
+
Poor DIVERGE candidates:
|
|
15
|
+
|
|
16
|
+
- There's a clear right answer, you just haven't asked.
|
|
17
|
+
- The approaches differ in code structure, not outcomes.
|
|
18
|
+
- You only have budget for one attempt.
|
|
19
|
+
|
|
20
|
+
## Lifecycle
|
|
21
|
+
|
|
22
|
+
1. **Propose** — a specialist identifies 2-3 viable approaches during a planning phase and proposes DIVERGE. It names the branches, the success metric, and the budget per branch.
|
|
23
|
+
2. **Confirm** — you approve or veto.
|
|
24
|
+
3. **Fork** — each branch spawns as an autonomous Task. Each branch gets its own directory under `.shards/branches/<branch-slug>/`.
|
|
25
|
+
4. **Execute** — branches run independently. They share the same `project-specs.md` scaffold up to the fork point, then diverge.
|
|
26
|
+
5. **Report** — each branch produces a `branch-report.md` with its result and self-assessment.
|
|
27
|
+
6. **Converge** — Syn Arbiter reads all branch reports, builds a side-by-side leaderboard with metrics and trade-offs, and returns an **advisory recommendation**. You make the final decision.
|
|
28
|
+
7. **Promote** — the winning branch is promoted back to the main project directory.
|
|
29
|
+
|
|
30
|
+
## Branch report template
|
|
31
|
+
|
|
32
|
+
Each branch produces `branch-report.md` with:
|
|
33
|
+
|
|
34
|
+
- Branch name and approach description.
|
|
35
|
+
- Metric results (comparable across branches).
|
|
36
|
+
- What worked / what didn't / what surprised the specialist.
|
|
37
|
+
- Self-assessed trade-offs.
|
|
38
|
+
|
|
39
|
+
Template: `src/templates/branch-report.md`.
|
|
40
|
+
|
|
41
|
+
## Syn Arbiter mode
|
|
42
|
+
|
|
43
|
+
When all branches complete, Syn enters Arbiter mode (`src/agents/specific_instructions/syn/arbiter.md`). It reads every `branch-report.md`, builds a leaderboard table, and produces an advisory recommendation. **The user makes the final decision.**
|
|
44
|
+
|
|
45
|
+
## See also
|
|
46
|
+
|
|
47
|
+
- [Autonomous Research](autonomous-research.md) — DIVERGE composes with AR (Section H: "AR fan-out").
|
|
48
|
+
- [Example: DIVERGE Exploration](../07-workflows/diverge-exploration.md)
|
|
49
|
+
- Source: `src/agents/specific_instructions/shared/diverge_protocol.md`
|
|
50
|
+
- Source: `src/agents/specific_instructions/syn/arbiter.md`
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Engineering Guidelines
|
|
2
|
+
|
|
3
|
+
Code-craft rules every specialist applies whenever it writes or edits a durable artifact — code, SQL, notebooks, dbt models, configuration, pipelines, dashboard code. Codified in `src/agents/specific_instructions/shared/engineering_guidelines.md` and referenced from each specialist's Behavioral Rules section alongside [`behavioral_rules.md`](behavioral-rules.md).
|
|
4
|
+
|
|
5
|
+
Where `behavioral_rules.md` governs *workflow discipline* (gates, phasing, escalation), this file governs *code craft* — how to produce the artifact once you're inside an execute or build phase.
|
|
6
|
+
|
|
7
|
+
## 1. Think Before Coding
|
|
8
|
+
|
|
9
|
+
State assumptions explicitly. Present alternative interpretations rather than picking silently. Push back when a simpler approach exists. Stop and ask when something is genuinely unclear.
|
|
10
|
+
|
|
11
|
+
This extends the gate pattern from project-level decisions to line-level ones: if a build choice is contentious or opaque enough to need your input, the specialist raises it in chat before writing it, not after.
|
|
12
|
+
|
|
13
|
+
## 2. Simplicity First
|
|
14
|
+
|
|
15
|
+
Minimum code that solves the problem. No features, abstractions, configurability, or error handling beyond what was asked. If a 200-line implementation could be 50, rewrite it.
|
|
16
|
+
|
|
17
|
+
Domain extensions:
|
|
18
|
+
|
|
19
|
+
- **SQL:** no CTEs that go unreferenced, no joins that don't tighten the result, no `DISTINCT` slapped on to hide a join-path bug.
|
|
20
|
+
- **Notebooks:** no exploratory cells left in a "final" notebook, no `try/except` swallowing errors that should surface.
|
|
21
|
+
- **Pipelines / dbt:** no models that wrap a single `SELECT *`, no configuration knobs nobody will turn, no incremental strategies on tables small enough to refresh fully.
|
|
22
|
+
- **Services:** no fallback paths for branches the surrounding code makes unreachable.
|
|
23
|
+
|
|
24
|
+
## 3. Surgical Changes
|
|
25
|
+
|
|
26
|
+
Touch only what the request requires. Match existing style. Don't refactor adjacent code that isn't broken. Clean up orphans the change itself created — not pre-existing dead code.
|
|
27
|
+
|
|
28
|
+
The test: every changed line should trace directly to the request.
|
|
29
|
+
|
|
30
|
+
Especially relevant in iteration mode (ML / AI / AE), Fixer mode, Panel Review, and any phase that edits an existing artifact. Iteration's defining failure mode is the agent that "just cleans up while it's in there." When the specialist notices unrelated issues, it logs them under `Open Issues` in `project-specs.md` (or raises them in chat for review-only flows) rather than silently fixing.
|
|
31
|
+
|
|
32
|
+
## 4. Goal-Driven Execution
|
|
33
|
+
|
|
34
|
+
Define verifiable success criteria *before* writing code. Transform vague tasks ("make it work") into testable goals ("write a failing test, then make it pass"). State a brief verification plan for multi-step tasks.
|
|
35
|
+
|
|
36
|
+
This rule composes with two related protocols:
|
|
37
|
+
|
|
38
|
+
- [Validation Protocol](validation.md) — the gate-level expression. Evidence over assertion before closing any artifact-producing phase.
|
|
39
|
+
- [Incremental Testing](incremental-testing.md) — the build-loop expression. Test each component as you write it; don't batch failures to the end.
|
|
40
|
+
|
|
41
|
+
Engineering guidelines cover the gap between them: at the individual-task level, the verification check is named *first*, not last.
|
|
42
|
+
|
|
43
|
+
## Tradeoff
|
|
44
|
+
|
|
45
|
+
These guidelines bias toward caution over speed. For trivial edits — typos, one-line config tweaks, label changes — specialists use judgment rather than ceremony.
|
|
46
|
+
|
|
47
|
+
## When workflow and code-craft rules conflict
|
|
48
|
+
|
|
49
|
+
Workflow rules dominate. A specialist never violates a gate, skips facilitation, or bypasses validation in order to satisfy a code-craft preference.
|
|
50
|
+
|
|
51
|
+
## See also
|
|
52
|
+
|
|
53
|
+
- [Behavioral Rules](behavioral-rules.md)
|
|
54
|
+
- [Validation Protocol](validation.md)
|
|
55
|
+
- [Incremental Testing](incremental-testing.md)
|
|
56
|
+
- Source: `src/agents/specific_instructions/shared/engineering_guidelines.md`
|