@bastani/atomic 0.5.11 → 0.5.12-1
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/.agents/skills/adapt/SKILL.md +199 -0
- package/.agents/skills/advanced-evaluation/SKILL.md +402 -0
- package/.agents/skills/advanced-evaluation/references/bias-mitigation.md +288 -0
- package/.agents/skills/advanced-evaluation/references/evaluation-pipeline.md +43 -0
- package/.agents/skills/advanced-evaluation/references/implementation-patterns.md +315 -0
- package/.agents/skills/advanced-evaluation/references/metrics-guide.md +331 -0
- package/.agents/skills/advanced-evaluation/scripts/evaluation_example.py +392 -0
- package/.agents/skills/animate/SKILL.md +175 -0
- package/.agents/skills/arrange/SKILL.md +124 -0
- package/.agents/skills/audit/SKILL.md +148 -0
- package/.agents/skills/bdi-mental-states/SKILL.md +311 -0
- package/.agents/skills/bdi-mental-states/references/bdi-ontology-core.md +207 -0
- package/.agents/skills/bdi-mental-states/references/framework-integration.md +582 -0
- package/.agents/skills/bdi-mental-states/references/rdf-examples.md +315 -0
- package/.agents/skills/bdi-mental-states/references/sparql-competency.md +420 -0
- package/.agents/skills/bolder/SKILL.md +117 -0
- package/.agents/skills/bun/SKILL.md +199 -0
- package/.agents/skills/clarify/SKILL.md +183 -0
- package/.agents/skills/colorize/SKILL.md +143 -0
- package/.agents/skills/context-compression/SKILL.md +272 -0
- package/.agents/skills/context-compression/references/evaluation-framework.md +213 -0
- package/.agents/skills/context-compression/scripts/compression_evaluator.py +862 -0
- package/.agents/skills/context-compression/tests/test_compression_evaluator.py +56 -0
- package/.agents/skills/context-degradation/SKILL.md +206 -0
- package/.agents/skills/context-degradation/references/patterns.md +314 -0
- package/.agents/skills/context-degradation/scripts/degradation_detector.py +614 -0
- package/.agents/skills/context-fundamentals/SKILL.md +201 -0
- package/.agents/skills/context-fundamentals/references/context-components.md +283 -0
- package/.agents/skills/context-fundamentals/scripts/context_manager.py +533 -0
- package/.agents/skills/context-optimization/SKILL.md +195 -0
- package/.agents/skills/context-optimization/references/optimization_techniques.md +272 -0
- package/.agents/skills/context-optimization/scripts/compaction.py +562 -0
- package/.agents/skills/create-spec/SKILL.md +244 -0
- package/.agents/skills/critique/SKILL.md +225 -0
- package/.agents/skills/critique/reference/cognitive-load.md +106 -0
- package/.agents/skills/critique/reference/heuristics-scoring.md +234 -0
- package/.agents/skills/critique/reference/personas.md +178 -0
- package/.agents/skills/delight/SKILL.md +304 -0
- package/.agents/skills/distill/SKILL.md +122 -0
- package/.agents/skills/docx/LICENSE.txt +30 -0
- package/.agents/skills/docx/SKILL.md +590 -0
- package/.agents/skills/docx/scripts/__init__.py +1 -0
- package/.agents/skills/docx/scripts/accept_changes.py +135 -0
- package/.agents/skills/docx/scripts/comment.py +318 -0
- package/.agents/skills/docx/scripts/office/helpers/__init__.py +0 -0
- package/.agents/skills/docx/scripts/office/helpers/merge_runs.py +199 -0
- package/.agents/skills/docx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/.agents/skills/docx/scripts/office/pack.py +159 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.agents/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.agents/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.agents/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.agents/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.agents/skills/docx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.agents/skills/docx/scripts/office/soffice.py +183 -0
- package/.agents/skills/docx/scripts/office/unpack.py +132 -0
- package/.agents/skills/docx/scripts/office/validate.py +111 -0
- package/.agents/skills/docx/scripts/office/validators/__init__.py +15 -0
- package/.agents/skills/docx/scripts/office/validators/base.py +847 -0
- package/.agents/skills/docx/scripts/office/validators/docx.py +446 -0
- package/.agents/skills/docx/scripts/office/validators/pptx.py +275 -0
- package/.agents/skills/docx/scripts/office/validators/redlining.py +247 -0
- package/.agents/skills/docx/scripts/templates/comments.xml +3 -0
- package/.agents/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/.agents/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/.agents/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/.agents/skills/docx/scripts/templates/people.xml +3 -0
- package/.agents/skills/evaluation/SKILL.md +251 -0
- package/.agents/skills/evaluation/references/metrics.md +339 -0
- package/.agents/skills/evaluation/scripts/evaluator.py +627 -0
- package/.agents/skills/explain-code/SKILL.md +230 -0
- package/.agents/skills/extract/SKILL.md +91 -0
- package/.agents/skills/filesystem-context/SKILL.md +287 -0
- package/.agents/skills/filesystem-context/references/implementation-patterns.md +549 -0
- package/.agents/skills/filesystem-context/scripts/filesystem_context.py +425 -0
- package/.agents/skills/find-skills/SKILL.md +142 -0
- package/.agents/skills/frontend-design/SKILL.md +147 -0
- package/.agents/skills/frontend-design/reference/color-and-contrast.md +132 -0
- package/.agents/skills/frontend-design/reference/interaction-design.md +195 -0
- package/.agents/skills/frontend-design/reference/motion-design.md +99 -0
- package/.agents/skills/frontend-design/reference/responsive-design.md +114 -0
- package/.agents/skills/frontend-design/reference/spatial-design.md +100 -0
- package/.agents/skills/frontend-design/reference/typography.md +133 -0
- package/.agents/skills/frontend-design/reference/ux-writing.md +107 -0
- package/.agents/skills/gh-commit/SKILL.md +243 -0
- package/.agents/skills/gh-create-pr/SKILL.md +93 -0
- package/.agents/skills/harden/SKILL.md +354 -0
- package/.agents/skills/hosted-agents/SKILL.md +260 -0
- package/.agents/skills/hosted-agents/references/infrastructure-patterns.md +700 -0
- package/.agents/skills/hosted-agents/scripts/sandbox_manager.py +590 -0
- package/.agents/skills/impeccable/SKILL.md +365 -0
- package/.agents/skills/impeccable/reference/color-and-contrast.md +105 -0
- package/.agents/skills/impeccable/reference/craft.md +70 -0
- package/.agents/skills/impeccable/reference/extract.md +70 -0
- package/.agents/skills/impeccable/reference/interaction-design.md +195 -0
- package/.agents/skills/impeccable/reference/motion-design.md +99 -0
- package/.agents/skills/impeccable/reference/responsive-design.md +114 -0
- package/.agents/skills/impeccable/reference/spatial-design.md +100 -0
- package/.agents/skills/impeccable/reference/typography.md +142 -0
- package/.agents/skills/impeccable/reference/ux-writing.md +107 -0
- package/.agents/skills/impeccable/scripts/cleanup-deprecated.mjs +214 -0
- package/.agents/skills/init/SKILL.md +138 -0
- package/.agents/skills/layout/SKILL.md +125 -0
- package/.agents/skills/liteparse/SKILL.md +222 -0
- package/.agents/skills/memory-systems/SKILL.md +219 -0
- package/.agents/skills/memory-systems/references/implementation.md +551 -0
- package/.agents/skills/memory-systems/scripts/memory_store.py +616 -0
- package/.agents/skills/multi-agent-patterns/SKILL.md +257 -0
- package/.agents/skills/multi-agent-patterns/references/frameworks.md +433 -0
- package/.agents/skills/multi-agent-patterns/scripts/coordination.py +613 -0
- package/.agents/skills/normalize/SKILL.md +70 -0
- package/.agents/skills/onboard/SKILL.md +245 -0
- package/.agents/skills/opentui/SKILL.md +201 -0
- package/.agents/skills/opentui/references/animation/REFERENCE.md +431 -0
- package/.agents/skills/opentui/references/components/REFERENCE.md +144 -0
- package/.agents/skills/opentui/references/components/code-diff.md +672 -0
- package/.agents/skills/opentui/references/components/containers.md +417 -0
- package/.agents/skills/opentui/references/components/inputs.md +531 -0
- package/.agents/skills/opentui/references/components/text-display.md +386 -0
- package/.agents/skills/opentui/references/core/REFERENCE.md +145 -0
- package/.agents/skills/opentui/references/core/api.md +543 -0
- package/.agents/skills/opentui/references/core/configuration.md +168 -0
- package/.agents/skills/opentui/references/core/gotchas.md +393 -0
- package/.agents/skills/opentui/references/core/patterns.md +449 -0
- package/.agents/skills/opentui/references/keyboard/REFERENCE.md +617 -0
- package/.agents/skills/opentui/references/layout/REFERENCE.md +337 -0
- package/.agents/skills/opentui/references/layout/patterns.md +444 -0
- package/.agents/skills/opentui/references/react/REFERENCE.md +174 -0
- package/.agents/skills/opentui/references/react/api.md +436 -0
- package/.agents/skills/opentui/references/react/configuration.md +302 -0
- package/.agents/skills/opentui/references/react/gotchas.md +443 -0
- package/.agents/skills/opentui/references/react/patterns.md +501 -0
- package/.agents/skills/opentui/references/solid/REFERENCE.md +201 -0
- package/.agents/skills/opentui/references/solid/api.md +564 -0
- package/.agents/skills/opentui/references/solid/configuration.md +316 -0
- package/.agents/skills/opentui/references/solid/gotchas.md +427 -0
- package/.agents/skills/opentui/references/solid/patterns.md +560 -0
- package/.agents/skills/opentui/references/testing/REFERENCE.md +614 -0
- package/.agents/skills/optimize/SKILL.md +266 -0
- package/.agents/skills/overdrive/SKILL.md +142 -0
- package/.agents/skills/pdf/LICENSE.txt +30 -0
- package/.agents/skills/pdf/SKILL.md +314 -0
- package/.agents/skills/pdf/forms.md +294 -0
- package/.agents/skills/pdf/reference.md +612 -0
- package/.agents/skills/pdf/scripts/check_bounding_boxes.py +65 -0
- package/.agents/skills/pdf/scripts/check_fillable_fields.py +11 -0
- package/.agents/skills/pdf/scripts/convert_pdf_to_images.py +33 -0
- package/.agents/skills/pdf/scripts/create_validation_image.py +37 -0
- package/.agents/skills/pdf/scripts/extract_form_field_info.py +122 -0
- package/.agents/skills/pdf/scripts/extract_form_structure.py +115 -0
- package/.agents/skills/pdf/scripts/fill_fillable_fields.py +98 -0
- package/.agents/skills/pdf/scripts/fill_pdf_form_with_annotations.py +107 -0
- package/.agents/skills/playwright-cli/SKILL.md +344 -0
- package/.agents/skills/playwright-cli/references/element-attributes.md +23 -0
- package/.agents/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/.agents/skills/playwright-cli/references/request-mocking.md +87 -0
- package/.agents/skills/playwright-cli/references/running-code.md +231 -0
- package/.agents/skills/playwright-cli/references/session-management.md +169 -0
- package/.agents/skills/playwright-cli/references/storage-state.md +275 -0
- package/.agents/skills/playwright-cli/references/test-generation.md +88 -0
- package/.agents/skills/playwright-cli/references/tracing.md +139 -0
- package/.agents/skills/playwright-cli/references/video-recording.md +143 -0
- package/.agents/skills/polish/SKILL.md +224 -0
- package/.agents/skills/pptx/LICENSE.txt +30 -0
- package/.agents/skills/pptx/SKILL.md +232 -0
- package/.agents/skills/pptx/editing.md +205 -0
- package/.agents/skills/pptx/pptxgenjs.md +420 -0
- package/.agents/skills/pptx/scripts/__init__.py +0 -0
- package/.agents/skills/pptx/scripts/add_slide.py +195 -0
- package/.agents/skills/pptx/scripts/clean.py +286 -0
- package/.agents/skills/pptx/scripts/office/helpers/__init__.py +0 -0
- package/.agents/skills/pptx/scripts/office/helpers/merge_runs.py +199 -0
- package/.agents/skills/pptx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/.agents/skills/pptx/scripts/office/pack.py +159 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.agents/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.agents/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.agents/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.agents/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.agents/skills/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.agents/skills/pptx/scripts/office/soffice.py +183 -0
- package/.agents/skills/pptx/scripts/office/unpack.py +132 -0
- package/.agents/skills/pptx/scripts/office/validate.py +111 -0
- package/.agents/skills/pptx/scripts/office/validators/__init__.py +15 -0
- package/.agents/skills/pptx/scripts/office/validators/base.py +847 -0
- package/.agents/skills/pptx/scripts/office/validators/docx.py +446 -0
- package/.agents/skills/pptx/scripts/office/validators/pptx.py +275 -0
- package/.agents/skills/pptx/scripts/office/validators/redlining.py +247 -0
- package/.agents/skills/pptx/scripts/thumbnail.py +289 -0
- package/.agents/skills/project-development/SKILL.md +291 -0
- package/.agents/skills/project-development/references/case-studies.md +388 -0
- package/.agents/skills/project-development/references/pipeline-patterns.md +610 -0
- package/.agents/skills/project-development/scripts/pipeline_template.py +796 -0
- package/.agents/skills/prompt-engineer/SKILL.md +263 -0
- package/.agents/skills/prompt-engineer/references/advanced_patterns.md +271 -0
- package/.agents/skills/prompt-engineer/references/core_prompting.md +137 -0
- package/.agents/skills/prompt-engineer/references/quality_improvement.md +193 -0
- package/.agents/skills/quieter/SKILL.md +103 -0
- package/.agents/skills/research-codebase/SKILL.md +227 -0
- package/.agents/skills/shape/SKILL.md +96 -0
- package/.agents/skills/skill-creator/LICENSE.txt +202 -0
- package/.agents/skills/skill-creator/SKILL.md +485 -0
- package/.agents/skills/skill-creator/agents/analyzer.md +274 -0
- package/.agents/skills/skill-creator/agents/comparator.md +202 -0
- package/.agents/skills/skill-creator/agents/grader.md +223 -0
- package/.agents/skills/skill-creator/assets/eval_review.html +146 -0
- package/.agents/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/.agents/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/.agents/skills/skill-creator/references/schemas.md +430 -0
- package/.agents/skills/skill-creator/scripts/__init__.py +0 -0
- package/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/.agents/skills/skill-creator/scripts/generate_report.py +326 -0
- package/.agents/skills/skill-creator/scripts/improve_description.py +247 -0
- package/.agents/skills/skill-creator/scripts/package_skill.py +136 -0
- package/.agents/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/.agents/skills/skill-creator/scripts/run_eval.py +310 -0
- package/.agents/skills/skill-creator/scripts/run_loop.py +328 -0
- package/.agents/skills/skill-creator/scripts/utils.py +47 -0
- package/.agents/skills/sl-commit/SKILL.md +51 -0
- package/.agents/skills/sl-submit-diff/SKILL.md +55 -0
- package/.agents/skills/teach-impeccable/SKILL.md +71 -0
- package/.agents/skills/test-driven-development/SKILL.md +371 -0
- package/.agents/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/.agents/skills/tool-design/SKILL.md +271 -0
- package/.agents/skills/tool-design/references/architectural_reduction.md +210 -0
- package/.agents/skills/tool-design/references/best_practices.md +176 -0
- package/.agents/skills/tool-design/scripts/description_generator.py +528 -0
- package/.agents/skills/typescript-advanced-types/SKILL.md +719 -0
- package/.agents/skills/typescript-expert/SKILL.md +428 -0
- package/.agents/skills/typescript-expert/references/tsconfig-strict.json +92 -0
- package/.agents/skills/typescript-expert/references/typescript-cheatsheet.md +383 -0
- package/.agents/skills/typescript-expert/references/utility-types.ts +335 -0
- package/.agents/skills/typescript-expert/scripts/ts_diagnostic.py +203 -0
- package/.agents/skills/typescript-react-reviewer/SKILL.md +200 -0
- package/.agents/skills/typescript-react-reviewer/references/antipatterns.md +510 -0
- package/.agents/skills/typescript-react-reviewer/references/checklist.md +267 -0
- package/.agents/skills/typescript-react-reviewer/references/react19-patterns.md +305 -0
- package/.agents/skills/typeset/SKILL.md +116 -0
- package/.agents/skills/workflow-creator/SKILL.md +337 -0
- package/.agents/skills/workflow-creator/references/agent-sessions.md +789 -0
- package/.agents/skills/workflow-creator/references/computation-and-validation.md +224 -0
- package/.agents/skills/workflow-creator/references/control-flow.md +450 -0
- package/.agents/skills/workflow-creator/references/discovery-and-verification.md +156 -0
- package/.agents/skills/workflow-creator/references/failure-modes.md +732 -0
- package/.agents/skills/workflow-creator/references/getting-started.md +289 -0
- package/.agents/skills/workflow-creator/references/session-config.md +355 -0
- package/.agents/skills/workflow-creator/references/state-and-data-flow.md +374 -0
- package/.agents/skills/workflow-creator/references/user-input.md +206 -0
- package/.agents/skills/workflow-creator/references/workflow-inputs.md +274 -0
- package/.agents/skills/xlsx/LICENSE.txt +30 -0
- package/.agents/skills/xlsx/SKILL.md +292 -0
- package/.agents/skills/xlsx/scripts/office/helpers/__init__.py +0 -0
- package/.agents/skills/xlsx/scripts/office/helpers/merge_runs.py +199 -0
- package/.agents/skills/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/.agents/skills/xlsx/scripts/office/pack.py +159 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.agents/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.agents/skills/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.agents/skills/xlsx/scripts/office/soffice.py +183 -0
- package/.agents/skills/xlsx/scripts/office/unpack.py +132 -0
- package/.agents/skills/xlsx/scripts/office/validate.py +111 -0
- package/.agents/skills/xlsx/scripts/office/validators/__init__.py +15 -0
- package/.agents/skills/xlsx/scripts/office/validators/base.py +847 -0
- package/.agents/skills/xlsx/scripts/office/validators/docx.py +446 -0
- package/.agents/skills/xlsx/scripts/office/validators/pptx.py +275 -0
- package/.agents/skills/xlsx/scripts/office/validators/redlining.py +247 -0
- package/.agents/skills/xlsx/scripts/recalc.py +184 -0
- package/.claude/agents/reviewer.md +1 -0
- package/.github/agents/reviewer.md +1 -0
- package/.opencode/agents/reviewer.md +1 -0
- package/README.md +274 -169
- package/package.json +6 -7
- package/src/commands/cli/init/index.ts +2 -2
- package/src/commands/cli/init/scm.ts +7 -8
- package/src/commands/cli/workflow-command.test.ts +74 -0
- package/src/commands/cli/workflow.ts +7 -2
- package/src/scripts/bundle-configs.ts +128 -0
- package/src/sdk/components/compact-switcher.tsx +1 -1
- package/src/sdk/components/orchestrator-panel-store.ts +13 -0
- package/src/sdk/components/orchestrator-panel.tsx +10 -0
- package/src/sdk/components/statusline.tsx +13 -1
- package/src/sdk/components/workflow-picker-panel.tsx +407 -296
- package/src/sdk/providers/claude.ts +50 -0
- package/src/sdk/runtime/executor.ts +111 -32
- package/src/sdk/types.ts +7 -0
- package/src/sdk/workflows/builtin/ralph/claude/index.ts +132 -76
- package/src/sdk/workflows/builtin/ralph/copilot/index.ts +129 -71
- package/src/sdk/workflows/builtin/ralph/helpers/git.ts +184 -17
- package/src/sdk/workflows/builtin/ralph/helpers/prompts.ts +463 -79
- package/src/sdk/workflows/builtin/ralph/opencode/index.ts +124 -80
- package/src/services/system/auto-sync.ts +31 -51
- package/src/services/system/skills.ts +56 -60
- package/dist/lib/path-root-guard.d.ts +0 -4
- package/dist/lib/path-root-guard.d.ts.map +0 -1
- package/dist/sdk/components/color-utils.d.ts +0 -4
- package/dist/sdk/components/color-utils.d.ts.map +0 -1
- package/dist/sdk/components/compact-switcher.d.ts +0 -10
- package/dist/sdk/components/compact-switcher.d.ts.map +0 -1
- package/dist/sdk/components/connectors.d.ts +0 -15
- package/dist/sdk/components/connectors.d.ts.map +0 -1
- package/dist/sdk/components/connectors.test.d.ts +0 -2
- package/dist/sdk/components/connectors.test.d.ts.map +0 -1
- package/dist/sdk/components/edge.d.ts +0 -4
- package/dist/sdk/components/edge.d.ts.map +0 -1
- package/dist/sdk/components/error-boundary.d.ts +0 -23
- package/dist/sdk/components/error-boundary.d.ts.map +0 -1
- package/dist/sdk/components/graph-theme.d.ts +0 -17
- package/dist/sdk/components/graph-theme.d.ts.map +0 -1
- package/dist/sdk/components/header.d.ts +0 -3
- package/dist/sdk/components/header.d.ts.map +0 -1
- package/dist/sdk/components/hooks.d.ts +0 -15
- package/dist/sdk/components/hooks.d.ts.map +0 -1
- package/dist/sdk/components/layout.d.ts +0 -27
- package/dist/sdk/components/layout.d.ts.map +0 -1
- package/dist/sdk/components/layout.test.d.ts +0 -2
- package/dist/sdk/components/layout.test.d.ts.map +0 -1
- package/dist/sdk/components/node-card.d.ts +0 -10
- package/dist/sdk/components/node-card.d.ts.map +0 -1
- package/dist/sdk/components/orchestrator-panel-contexts.d.ts +0 -16
- package/dist/sdk/components/orchestrator-panel-contexts.d.ts.map +0 -1
- package/dist/sdk/components/orchestrator-panel-store.d.ts +0 -46
- package/dist/sdk/components/orchestrator-panel-store.d.ts.map +0 -1
- package/dist/sdk/components/orchestrator-panel-store.test.d.ts +0 -2
- package/dist/sdk/components/orchestrator-panel-store.test.d.ts.map +0 -1
- package/dist/sdk/components/orchestrator-panel-types.d.ts +0 -18
- package/dist/sdk/components/orchestrator-panel-types.d.ts.map +0 -1
- package/dist/sdk/components/orchestrator-panel.d.ts +0 -52
- package/dist/sdk/components/orchestrator-panel.d.ts.map +0 -1
- package/dist/sdk/components/session-graph-panel.d.ts +0 -7
- package/dist/sdk/components/session-graph-panel.d.ts.map +0 -1
- package/dist/sdk/components/status-helpers.d.ts +0 -6
- package/dist/sdk/components/status-helpers.d.ts.map +0 -1
- package/dist/sdk/components/statusline.d.ts +0 -7
- package/dist/sdk/components/statusline.d.ts.map +0 -1
- package/dist/sdk/components/workflow-picker-panel.d.ts +0 -123
- package/dist/sdk/components/workflow-picker-panel.d.ts.map +0 -1
- package/dist/sdk/define-workflow.d.ts +0 -78
- package/dist/sdk/define-workflow.d.ts.map +0 -1
- package/dist/sdk/define-workflow.test.d.ts +0 -2
- package/dist/sdk/define-workflow.test.d.ts.map +0 -1
- package/dist/sdk/errors.d.ts +0 -24
- package/dist/sdk/errors.d.ts.map +0 -1
- package/dist/sdk/errors.test.d.ts +0 -2
- package/dist/sdk/errors.test.d.ts.map +0 -1
- package/dist/sdk/index.d.ts +0 -13
- package/dist/sdk/index.d.ts.map +0 -1
- package/dist/sdk/providers/claude.d.ts +0 -170
- package/dist/sdk/providers/claude.d.ts.map +0 -1
- package/dist/sdk/providers/copilot.d.ts +0 -11
- package/dist/sdk/providers/copilot.d.ts.map +0 -1
- package/dist/sdk/providers/opencode.d.ts +0 -11
- package/dist/sdk/providers/opencode.d.ts.map +0 -1
- package/dist/sdk/runtime/discovery.d.ts +0 -86
- package/dist/sdk/runtime/discovery.d.ts.map +0 -1
- package/dist/sdk/runtime/executor-entry.d.ts +0 -11
- package/dist/sdk/runtime/executor-entry.d.ts.map +0 -1
- package/dist/sdk/runtime/executor.d.ts +0 -72
- package/dist/sdk/runtime/executor.d.ts.map +0 -1
- package/dist/sdk/runtime/executor.test.d.ts +0 -2
- package/dist/sdk/runtime/executor.test.d.ts.map +0 -1
- package/dist/sdk/runtime/graph-inference.d.ts +0 -35
- package/dist/sdk/runtime/graph-inference.d.ts.map +0 -1
- package/dist/sdk/runtime/loader.d.ts +0 -70
- package/dist/sdk/runtime/loader.d.ts.map +0 -1
- package/dist/sdk/runtime/panel.d.ts +0 -9
- package/dist/sdk/runtime/panel.d.ts.map +0 -1
- package/dist/sdk/runtime/theme.d.ts +0 -28
- package/dist/sdk/runtime/theme.d.ts.map +0 -1
- package/dist/sdk/runtime/tmux.d.ts +0 -297
- package/dist/sdk/runtime/tmux.d.ts.map +0 -1
- package/dist/sdk/types.d.ts +0 -295
- package/dist/sdk/types.d.ts.map +0 -1
- package/dist/sdk/workflows/builtin/deep-research-codebase/claude/index.d.ts +0 -62
- package/dist/sdk/workflows/builtin/deep-research-codebase/claude/index.d.ts.map +0 -1
- package/dist/sdk/workflows/builtin/deep-research-codebase/copilot/index.d.ts +0 -46
- package/dist/sdk/workflows/builtin/deep-research-codebase/copilot/index.d.ts.map +0 -1
- package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/heuristic.d.ts +0 -26
- package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/heuristic.d.ts.map +0 -1
- package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/prompts.d.ts +0 -92
- package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/prompts.d.ts.map +0 -1
- package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/scout.d.ts +0 -57
- package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/scout.d.ts.map +0 -1
- package/dist/sdk/workflows/builtin/deep-research-codebase/opencode/index.d.ts +0 -49
- package/dist/sdk/workflows/builtin/deep-research-codebase/opencode/index.d.ts.map +0 -1
- package/dist/sdk/workflows/builtin/ralph/claude/index.d.ts +0 -14
- package/dist/sdk/workflows/builtin/ralph/claude/index.d.ts.map +0 -1
- package/dist/sdk/workflows/builtin/ralph/copilot/index.d.ts +0 -14
- package/dist/sdk/workflows/builtin/ralph/copilot/index.d.ts.map +0 -1
- package/dist/sdk/workflows/builtin/ralph/helpers/git.d.ts +0 -17
- package/dist/sdk/workflows/builtin/ralph/helpers/git.d.ts.map +0 -1
- package/dist/sdk/workflows/builtin/ralph/helpers/prompts.d.ts +0 -119
- package/dist/sdk/workflows/builtin/ralph/helpers/prompts.d.ts.map +0 -1
- package/dist/sdk/workflows/builtin/ralph/helpers/review.d.ts +0 -20
- package/dist/sdk/workflows/builtin/ralph/helpers/review.d.ts.map +0 -1
- package/dist/sdk/workflows/builtin/ralph/opencode/index.d.ts +0 -14
- package/dist/sdk/workflows/builtin/ralph/opencode/index.d.ts.map +0 -1
- package/dist/sdk/workflows/index.d.ts +0 -24
- package/dist/sdk/workflows/index.d.ts.map +0 -1
- package/dist/services/config/definitions.d.ts +0 -85
- package/dist/services/config/definitions.d.ts.map +0 -1
- package/dist/services/system/copy.d.ts +0 -77
- package/dist/services/system/copy.d.ts.map +0 -1
- package/dist/services/system/detect.d.ts +0 -75
- package/dist/services/system/detect.d.ts.map +0 -1
- package/tsconfig.json +0 -33
|
@@ -2,16 +2,108 @@
|
|
|
2
2
|
* Ralph Prompt Utilities
|
|
3
3
|
*
|
|
4
4
|
* Prompts used by the Ralph plan → orchestrate → review → debug loop:
|
|
5
|
-
* - buildPlannerPrompt:
|
|
6
|
-
* - buildOrchestratorPrompt:
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
5
|
+
* - buildPlannerPrompt: initial planning OR re-planning from a debugger report
|
|
6
|
+
* - buildOrchestratorPrompt: spawn workers to execute the task list
|
|
7
|
+
* - buildInfraDiscoveryPrompts: prompts for parallel sub-agent infrastructure discovery
|
|
8
|
+
* - buildReviewPrompt: structured code review with injected changeset + discovery context
|
|
9
|
+
* - buildDebuggerReportPrompt: diagnose review findings, produce a re-plan brief
|
|
9
10
|
*
|
|
10
|
-
* Plus
|
|
11
|
-
* report.
|
|
11
|
+
* Plus Zod schemas for structured output, parsing helpers for the reviewer
|
|
12
|
+
* JSON output, and the debugger markdown report.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { z } from "zod";
|
|
16
|
+
|
|
17
|
+
// ============================================================================
|
|
18
|
+
// STRUCTURED OUTPUT SCHEMAS
|
|
19
|
+
// ============================================================================
|
|
20
|
+
|
|
21
|
+
/** Zod schema for a single review finding. */
|
|
22
|
+
export const ReviewFindingSchema = z.object({
|
|
23
|
+
title: z.string().describe("Brief title prefixed with priority, e.g. '[P0] Missing null check'"),
|
|
24
|
+
body: z.string().describe("Detailed explanation of the issue, its impact, and a suggested fix"),
|
|
25
|
+
confidence_score: z.number().min(0).max(1).optional().describe("Confidence in the finding (0.0–1.0)"),
|
|
26
|
+
priority: z.number().int().min(0).max(3).optional().describe("Severity: 0=P0 critical, 1=P1 important, 2=P2 moderate, 3=P3 minor"),
|
|
27
|
+
code_location: z.object({
|
|
28
|
+
absolute_file_path: z.string().describe("Absolute path to the file containing the issue"),
|
|
29
|
+
line_range: z.object({
|
|
30
|
+
start: z.number().int().describe("Start line number"),
|
|
31
|
+
end: z.number().int().describe("End line number"),
|
|
32
|
+
}),
|
|
33
|
+
}).optional().describe("Location of the issue in the codebase"),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
/** Zod schema for the full structured review output. */
|
|
37
|
+
export const ReviewResultSchema = z.object({
|
|
38
|
+
findings: z.array(ReviewFindingSchema).describe("List of review findings, ordered by priority"),
|
|
39
|
+
overall_correctness: z.string().describe("'patch is correct' or 'patch is incorrect'"),
|
|
40
|
+
overall_explanation: z.string().describe("Summary of overall quality and correctness"),
|
|
41
|
+
overall_confidence_score: z.number().min(0).max(1).optional().describe("Overall confidence in the review (0.0–1.0)"),
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/** JSON Schema derived from the Zod schema — used by Claude and OpenCode SDKs. */
|
|
45
|
+
export const REVIEW_RESULT_JSON_SCHEMA = z.toJSONSchema(ReviewResultSchema);
|
|
46
|
+
|
|
47
|
+
/** Result from a reviewer stage with structured output support. */
|
|
48
|
+
export interface StructuredReviewResult {
|
|
49
|
+
/** Parsed and filtered review from SDK structured output, or null if unavailable */
|
|
50
|
+
structured: ReviewResult | null;
|
|
51
|
+
/** Raw text output for fallback parsing and debugger input */
|
|
52
|
+
raw: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Merge two parallel reviewer results into one.
|
|
12
57
|
*
|
|
13
|
-
*
|
|
58
|
+
* Two independent reviewers run the same prompt simultaneously. This function
|
|
59
|
+
* unions their findings and picks the more conservative overall_correctness.
|
|
60
|
+
* When either reviewer's structured output is unavailable, it falls back to
|
|
61
|
+
* text parsing ({@link parseReviewResult}) before merging.
|
|
14
62
|
*/
|
|
63
|
+
export function mergeReviewResults(
|
|
64
|
+
a: StructuredReviewResult,
|
|
65
|
+
b: StructuredReviewResult,
|
|
66
|
+
): StructuredReviewResult {
|
|
67
|
+
const rawCombined = [a.raw, b.raw].filter(Boolean).join("\n\n---\n\n");
|
|
68
|
+
|
|
69
|
+
// Resolve: prefer structured output, fall back to text parsing
|
|
70
|
+
const parsedA = a.structured ?? (a.raw.trim() ? parseReviewResult(a.raw) : null);
|
|
71
|
+
const parsedB = b.structured ?? (b.raw.trim() ? parseReviewResult(b.raw) : null);
|
|
72
|
+
|
|
73
|
+
if (!parsedA && !parsedB) {
|
|
74
|
+
return { structured: null, raw: rawCombined };
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const findingsA = parsedA?.findings ?? [];
|
|
78
|
+
const findingsB = parsedB?.findings ?? [];
|
|
79
|
+
|
|
80
|
+
const correctnessA = parsedA?.overall_correctness ?? "patch is correct";
|
|
81
|
+
const correctnessB = parsedB?.overall_correctness ?? "patch is correct";
|
|
82
|
+
const isIncorrect =
|
|
83
|
+
correctnessA === "patch is incorrect" ||
|
|
84
|
+
correctnessB === "patch is incorrect";
|
|
85
|
+
|
|
86
|
+
const explanations = [
|
|
87
|
+
parsedA?.overall_explanation,
|
|
88
|
+
parsedB?.overall_explanation,
|
|
89
|
+
].filter(Boolean) as string[];
|
|
90
|
+
|
|
91
|
+
const confidences = [
|
|
92
|
+
parsedA?.overall_confidence_score,
|
|
93
|
+
parsedB?.overall_confidence_score,
|
|
94
|
+
].filter((c): c is number => c !== undefined);
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
structured: {
|
|
98
|
+
findings: [...findingsA, ...findingsB],
|
|
99
|
+
overall_correctness: isIncorrect ? "patch is incorrect" : "patch is correct",
|
|
100
|
+
overall_explanation: explanations.join(" | "),
|
|
101
|
+
overall_confidence_score:
|
|
102
|
+
confidences.length > 0 ? Math.max(...confidences) : undefined,
|
|
103
|
+
},
|
|
104
|
+
raw: rawCombined,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
15
107
|
|
|
16
108
|
// ============================================================================
|
|
17
109
|
// PLANNER
|
|
@@ -239,6 +331,135 @@ Update task statuses **immediately** at every transition via TaskUpdate.
|
|
|
239
331
|
- Mark previous tasks "completed" before marking new ones "in_progress".`;
|
|
240
332
|
}
|
|
241
333
|
|
|
334
|
+
// ============================================================================
|
|
335
|
+
// INFRASTRUCTURE DISCOVERY
|
|
336
|
+
// ============================================================================
|
|
337
|
+
|
|
338
|
+
/** Prompts for the three parallel infrastructure-discovery sub-agents. */
|
|
339
|
+
export interface InfraDiscoveryPrompts {
|
|
340
|
+
/** Prompt for the codebase-locator sub-agent. */
|
|
341
|
+
locator: string;
|
|
342
|
+
/** Prompt for the codebase-analyzer sub-agent. */
|
|
343
|
+
analyzer: string;
|
|
344
|
+
/** Prompt for the codebase-pattern-finder sub-agent. */
|
|
345
|
+
patternFinder: string;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Build prompts for three parallel sub-agent stages that discover the
|
|
350
|
+
* repository's build, test, lint, and CI infrastructure. Each sub-agent
|
|
351
|
+
* explores the codebase dynamically — no hard-coded file lists or patterns.
|
|
352
|
+
*
|
|
353
|
+
* Inspired by the deep-research-codebase workflow which dispatches
|
|
354
|
+
* codebase-locator, codebase-analyzer, and codebase-pattern-finder
|
|
355
|
+
* sub-agents in parallel for exploratory research.
|
|
356
|
+
*/
|
|
357
|
+
export function buildInfraDiscoveryPrompts(): InfraDiscoveryPrompts {
|
|
358
|
+
return {
|
|
359
|
+
locator: `# Locate Build & Test Infrastructure Files
|
|
360
|
+
|
|
361
|
+
Find ALL files in this repository that define or configure the build, test,
|
|
362
|
+
lint, type-check, and CI/CD infrastructure. Report their paths and a
|
|
363
|
+
one-line description of each.
|
|
364
|
+
|
|
365
|
+
## What to look for
|
|
366
|
+
|
|
367
|
+
- **Package manifest**: package.json, Cargo.toml, go.mod, pyproject.toml, etc.
|
|
368
|
+
- **Lockfiles**: bun.lockb, bun.lock, package-lock.json, yarn.lock, pnpm-lock.yaml, etc.
|
|
369
|
+
- **Build config**: tsconfig.json, webpack.config.*, vite.config.*, esbuild.*, rollup.config.*, Makefile, etc.
|
|
370
|
+
- **Test config**: jest.config.*, vitest.config.*, playwright.config.*, .mocharc.*, pytest.ini, etc.
|
|
371
|
+
- **Lint / format config**: .eslintrc.*, eslint.config.*, biome.json, .prettierrc.*, oxlint.json, etc.
|
|
372
|
+
- **CI/CD workflows**: .github/workflows/*.yml, .gitlab-ci.yml, Jenkinsfile, .circleci/config.yml, etc.
|
|
373
|
+
- **Agent config files**: CLAUDE.md, AGENTS.md, .claude/*, .github/copilot-instructions.md (these often document project commands)
|
|
374
|
+
|
|
375
|
+
## Output format
|
|
376
|
+
|
|
377
|
+
Respond with a flat list:
|
|
378
|
+
|
|
379
|
+
\`\`\`
|
|
380
|
+
<path> — <one-line description>
|
|
381
|
+
\`\`\`
|
|
382
|
+
|
|
383
|
+
Be exhaustive. Do NOT skip files just because they seem minor — CI configs
|
|
384
|
+
and agent instruction files often contain the authoritative command list.
|
|
385
|
+
End with a brief trailing summary (1-2 sentences) of what you found.`,
|
|
386
|
+
|
|
387
|
+
analyzer: `# Analyze Build & Test Infrastructure
|
|
388
|
+
|
|
389
|
+
Examine this repository's build, test, lint, and type-check infrastructure.
|
|
390
|
+
Your goal is to produce a concise reference that tells a reviewer exactly
|
|
391
|
+
which commands to run to verify an implementation.
|
|
392
|
+
|
|
393
|
+
## Investigation steps
|
|
394
|
+
|
|
395
|
+
1. Read the package manifest (package.json, Cargo.toml, go.mod, etc.) and
|
|
396
|
+
list every script/target related to building, testing, linting,
|
|
397
|
+
type-checking, or formatting.
|
|
398
|
+
2. Identify the package manager (bun, npm, yarn, pnpm, cargo, go, make)
|
|
399
|
+
from lockfiles or config.
|
|
400
|
+
3. Read CI workflow files (.github/workflows/*.yml, etc.) and extract the
|
|
401
|
+
key \`run:\` commands — these are the authoritative "what CI actually
|
|
402
|
+
executes" list.
|
|
403
|
+
4. Read CLAUDE.md / AGENTS.md if present — they often document the
|
|
404
|
+
canonical commands for contributors.
|
|
405
|
+
5. Identify the test framework(s) in use and how to invoke them.
|
|
406
|
+
|
|
407
|
+
## Output format
|
|
408
|
+
|
|
409
|
+
\`\`\`
|
|
410
|
+
## Package Manager
|
|
411
|
+
<name>
|
|
412
|
+
|
|
413
|
+
## Build Commands
|
|
414
|
+
- \`<command>\` — <what it does>
|
|
415
|
+
|
|
416
|
+
## Test Commands
|
|
417
|
+
- \`<command>\` — <what it does>
|
|
418
|
+
|
|
419
|
+
## Lint / Type-check Commands
|
|
420
|
+
- \`<command>\` — <what it does>
|
|
421
|
+
|
|
422
|
+
## CI Commands (from workflow files)
|
|
423
|
+
- \`<command>\` — <source file and context>
|
|
424
|
+
\`\`\`
|
|
425
|
+
|
|
426
|
+
Be specific — include the exact invocation string (e.g. \`bun test\`, not
|
|
427
|
+
just "run tests"). If a command has variants (e.g. test:unit, test:e2e),
|
|
428
|
+
list each separately. End with a brief trailing summary.`,
|
|
429
|
+
|
|
430
|
+
patternFinder: `# Find Build & Test Patterns
|
|
431
|
+
|
|
432
|
+
Search this repository for existing patterns that show how code is built,
|
|
433
|
+
tested, and validated. A reviewer needs to know not just WHAT commands exist,
|
|
434
|
+
but HOW they are used in practice.
|
|
435
|
+
|
|
436
|
+
## What to find
|
|
437
|
+
|
|
438
|
+
1. **Test file patterns**: Where do tests live? What naming convention
|
|
439
|
+
(*.test.ts, *.spec.ts, *_test.go, etc.)? Show 2-3 example paths.
|
|
440
|
+
2. **Test execution patterns**: How are tests actually run? Find examples in
|
|
441
|
+
CI configs, scripts, or documentation. Note any environment variables or
|
|
442
|
+
flags that are standard (e.g. CLAUDECODE=1, --coverage).
|
|
443
|
+
3. **Build patterns**: How is the project built? Is there a multi-step build
|
|
444
|
+
(e.g. codegen → compile → bundle)? What order matters?
|
|
445
|
+
4. **Quality gate patterns**: What checks gate a merge? Look at CI workflows,
|
|
446
|
+
pre-commit hooks, and PR check configurations. List the commands in the
|
|
447
|
+
order CI runs them.
|
|
448
|
+
5. **Dependency install pattern**: How are dependencies installed before
|
|
449
|
+
build/test (e.g. \`bun install\`, \`npm ci\`)?
|
|
450
|
+
|
|
451
|
+
## Output format
|
|
452
|
+
|
|
453
|
+
For each pattern found, report:
|
|
454
|
+
- The pattern name
|
|
455
|
+
- The concrete command or file path
|
|
456
|
+
- A brief explanation of when/how it's used
|
|
457
|
+
|
|
458
|
+
End with a brief trailing summary of the overall build/test workflow order
|
|
459
|
+
(e.g. "install → typecheck → lint → test → build").`,
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
|
|
242
463
|
// ============================================================================
|
|
243
464
|
// REVIEWER
|
|
244
465
|
// ============================================================================
|
|
@@ -264,52 +485,164 @@ export interface ReviewResult {
|
|
|
264
485
|
}
|
|
265
486
|
|
|
266
487
|
export interface ReviewContext {
|
|
267
|
-
/**
|
|
268
|
-
|
|
488
|
+
/**
|
|
489
|
+
* Full branch changeset captured by {@link captureBranchChangeset}.
|
|
490
|
+
* Contains diff stat, name-status, and uncommitted changes relative to
|
|
491
|
+
* the parent branch — giving the reviewer complete visibility into every
|
|
492
|
+
* change this branch introduces.
|
|
493
|
+
*/
|
|
494
|
+
changeset: {
|
|
495
|
+
baseBranch: string;
|
|
496
|
+
diffStat: string;
|
|
497
|
+
uncommitted: string;
|
|
498
|
+
nameStatus: string;
|
|
499
|
+
errors: string[];
|
|
500
|
+
};
|
|
269
501
|
/** 1-indexed loop iteration, used in the prompt header. */
|
|
270
502
|
iteration?: number;
|
|
271
503
|
/**
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
504
|
+
* When true, instructs the reviewer to call the `submit_review` tool
|
|
505
|
+
* instead of outputting JSON directly. Used by the Copilot SDK which
|
|
506
|
+
* achieves structured output through tool definitions.
|
|
275
507
|
*/
|
|
276
|
-
|
|
508
|
+
useSubmitTool?: boolean;
|
|
509
|
+
/**
|
|
510
|
+
* Raw output from the parallel infrastructure-discovery sub-agents
|
|
511
|
+
* (codebase-locator, codebase-analyzer, codebase-pattern-finder).
|
|
512
|
+
* When present, the reviewer uses this to identify and run the
|
|
513
|
+
* repository's build/test/lint commands as part of verification.
|
|
514
|
+
*/
|
|
515
|
+
discoveryContext?: string;
|
|
277
516
|
}
|
|
278
517
|
|
|
279
518
|
/**
|
|
280
|
-
* Build the reviewer prompt. Injects deterministic
|
|
281
|
-
* reviewer
|
|
519
|
+
* Build the reviewer prompt. Injects a deterministic branch-relative
|
|
520
|
+
* changeset so the reviewer sees every file this branch has touched —
|
|
521
|
+
* both committed and uncommitted — without expensive tool calls.
|
|
282
522
|
*/
|
|
283
523
|
export function buildReviewPrompt(
|
|
284
524
|
spec: string,
|
|
285
525
|
context: ReviewContext,
|
|
286
526
|
): string {
|
|
287
|
-
const
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
|
|
527
|
+
const { changeset } = context;
|
|
528
|
+
const hasChanges =
|
|
529
|
+
changeset.diffStat.length > 0 ||
|
|
530
|
+
changeset.uncommitted.length > 0;
|
|
531
|
+
const hasErrors = changeset.errors.length > 0;
|
|
291
532
|
|
|
292
|
-
|
|
293
|
-
this iteration. Use them to focus your review:
|
|
533
|
+
// ── Changeset section ──────────────────────────────────────────────────
|
|
294
534
|
|
|
295
|
-
|
|
296
|
-
${gitStatus}
|
|
297
|
-
\`\`\``
|
|
298
|
-
: `## Working Tree (\`git status -s\`)
|
|
535
|
+
let changesetSection: string;
|
|
299
536
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
537
|
+
if (hasChanges || hasErrors) {
|
|
538
|
+
const parts: string[] = [];
|
|
539
|
+
|
|
540
|
+
parts.push(
|
|
541
|
+
`## Branch Changeset (relative to \`${changeset.baseBranch}\`)`,
|
|
542
|
+
);
|
|
543
|
+
|
|
544
|
+
// Surface git errors first — the agent needs to know the data is partial
|
|
545
|
+
if (hasErrors) {
|
|
546
|
+
parts.push(
|
|
547
|
+
"",
|
|
548
|
+
"### Git Errors",
|
|
549
|
+
"",
|
|
550
|
+
"The following git commands failed during changeset capture. The data",
|
|
551
|
+
"below may be **incomplete**. You should re-run the failed commands",
|
|
552
|
+
"yourself to get the full picture, or flag the gap as a finding.",
|
|
553
|
+
"",
|
|
554
|
+
...changeset.errors.map((e) => `- ${e}`),
|
|
555
|
+
);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
if (hasChanges) {
|
|
559
|
+
parts.push(
|
|
560
|
+
"",
|
|
561
|
+
"The following shows every change this branch introduces — both committed",
|
|
562
|
+
"and uncommitted. Use this to scope your review. Read the actual file",
|
|
563
|
+
"contents for any file that warrants closer inspection.",
|
|
564
|
+
);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
if (changeset.nameStatus.length > 0) {
|
|
568
|
+
parts.push(
|
|
569
|
+
"",
|
|
570
|
+
"### Changed Files",
|
|
571
|
+
"",
|
|
572
|
+
"```",
|
|
573
|
+
changeset.nameStatus,
|
|
574
|
+
"```",
|
|
575
|
+
);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
if (changeset.diffStat.length > 0) {
|
|
579
|
+
parts.push(
|
|
580
|
+
"",
|
|
581
|
+
"### Diff Summary",
|
|
582
|
+
"",
|
|
583
|
+
"```",
|
|
584
|
+
changeset.diffStat,
|
|
585
|
+
"```",
|
|
586
|
+
);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
if (changeset.uncommitted.length > 0) {
|
|
590
|
+
parts.push(
|
|
591
|
+
"",
|
|
592
|
+
"### Uncommitted Changes (`git status -s`)",
|
|
593
|
+
"",
|
|
594
|
+
"These changes are in the working tree but not yet committed:",
|
|
595
|
+
"",
|
|
596
|
+
"```",
|
|
597
|
+
changeset.uncommitted,
|
|
598
|
+
"```",
|
|
599
|
+
);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
changesetSection = parts.join("\n");
|
|
603
|
+
} else {
|
|
604
|
+
changesetSection = `## Branch Changeset (relative to \`${changeset.baseBranch}\`)
|
|
605
|
+
|
|
606
|
+
No changes detected relative to \`${changeset.baseBranch}\`. Either nothing
|
|
607
|
+
was implemented, all changes were reverted, or you are already on the base
|
|
608
|
+
branch. Cross-check the task list to verify whether the implementation ran.`;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
// ── Header ─────────────────────────────────────────────────────────────
|
|
303
612
|
|
|
304
613
|
const header = context.iteration
|
|
305
|
-
? `# Code Review Request (Iteration ${context.iteration}
|
|
614
|
+
? `# Code Review Request (Iteration ${context.iteration})`
|
|
306
615
|
: "# Code Review Request";
|
|
307
616
|
|
|
308
|
-
|
|
309
|
-
|
|
617
|
+
// ── Output instructions ────────────────────────────────────────────────
|
|
618
|
+
|
|
619
|
+
const outputSection = context.useSubmitTool
|
|
620
|
+
? `## Output
|
|
621
|
+
|
|
622
|
+
You MUST submit your review by calling the \`submit_review\` tool exactly
|
|
623
|
+
once with your complete structured review. Do NOT output the review as
|
|
624
|
+
plain text — the tool enforces the required schema.`
|
|
625
|
+
: `## Output
|
|
626
|
+
|
|
627
|
+
Your review output is captured via structured output. The schema is enforced
|
|
628
|
+
by the SDK — focus on providing accurate, well-reasoned data for each field.`;
|
|
629
|
+
|
|
630
|
+
// ── Discovery context section ────────────────────────────────────────────
|
|
631
|
+
|
|
632
|
+
const discoverySection = context.discoveryContext
|
|
633
|
+
? `## Build & Test Infrastructure Discovery
|
|
634
|
+
|
|
635
|
+
Three sub-agents explored this repository's build, test, lint, and CI
|
|
636
|
+
infrastructure. Their findings are below. Use them to identify the exact
|
|
637
|
+
commands you must run to verify the implementation.
|
|
638
|
+
|
|
639
|
+
${context.discoveryContext}
|
|
640
|
+
`
|
|
310
641
|
: "";
|
|
311
642
|
|
|
312
|
-
|
|
643
|
+
// ── Full prompt ────────────────────────────────────────────────────────
|
|
644
|
+
|
|
645
|
+
return `${header}
|
|
313
646
|
|
|
314
647
|
## Original Specification
|
|
315
648
|
|
|
@@ -317,7 +650,15 @@ whether the implementation actually ran.`;
|
|
|
317
650
|
${spec}
|
|
318
651
|
</user_request>
|
|
319
652
|
|
|
320
|
-
${
|
|
653
|
+
${changesetSection}
|
|
654
|
+
|
|
655
|
+
${discoverySection}## Project Conventions
|
|
656
|
+
|
|
657
|
+
Use the repository's \`AGENTS.md\` and/or \`CLAUDE.md\` files (if present) for
|
|
658
|
+
guidance on style, conventions, testing expectations, and architectural
|
|
659
|
+
patterns. Your review should respect these project-level norms — flag
|
|
660
|
+
deviations only when they conflict with correctness or security, not personal
|
|
661
|
+
preference.
|
|
321
662
|
|
|
322
663
|
## Retrieve Task List
|
|
323
664
|
|
|
@@ -326,46 +667,62 @@ Call \`TaskList\` to fetch the current task plan and statuses. Use it to:
|
|
|
326
667
|
2. Cross-reference the plan against the specification.
|
|
327
668
|
3. Calculate completion metrics.
|
|
328
669
|
|
|
670
|
+
## Verification Step
|
|
671
|
+
|
|
672
|
+
**Before writing any findings**, run the build, test, lint, and type-check
|
|
673
|
+
commands identified in the "Build & Test Infrastructure Discovery" section
|
|
674
|
+
above. Execute them via Bash from the repository root. Run ALL commands even
|
|
675
|
+
if earlier ones fail — the goal is a complete picture.
|
|
676
|
+
|
|
677
|
+
- Build failures and type errors → P0 finding.
|
|
678
|
+
- Test failures → P1 finding.
|
|
679
|
+
- Lint violations → P1 finding.
|
|
680
|
+
|
|
681
|
+
Include the exact command, exit status, and relevant error output in each
|
|
682
|
+
finding's body. If no discovery section is present, attempt to discover
|
|
683
|
+
commands yourself by reading package.json, CI configs, or CLAUDE.md.
|
|
684
|
+
|
|
329
685
|
## Review Focus Areas (priority order)
|
|
330
686
|
|
|
331
687
|
1. **Task Completion & Specification Gap Analysis** — HIGHEST priority. Every
|
|
332
688
|
task in PENDING / IN_PROGRESS / ERROR status MUST become a P0 finding.
|
|
333
689
|
Every spec requirement not covered by any task is a P0 finding. Do NOT
|
|
334
690
|
mark the patch correct if any task is incomplete.
|
|
335
|
-
2. **
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
691
|
+
2. **Verification Failures** — Any build, test, lint, or type-check command
|
|
692
|
+
that failed during the verification step above is a P0 or P1 finding.
|
|
693
|
+
Reference the specific command and error output.
|
|
694
|
+
3. **Correctness of Logic** — does the code implement the requirements?
|
|
695
|
+
4. **Error Handling & Edge Cases** — boundary, empty/null, error paths.
|
|
696
|
+
5. **Security** — injection, secret leakage, auth bypasses.
|
|
697
|
+
6. **Performance** — obvious resource leaks, N+1, hot loops.
|
|
698
|
+
7. **Test Coverage** — critical paths and edge cases tested.
|
|
699
|
+
|
|
700
|
+
## Review Guidelines
|
|
701
|
+
|
|
702
|
+
- Be **constructive and helpful** in your feedback. Every finding should
|
|
703
|
+
include a clear explanation of the impact and a concrete suggested fix.
|
|
704
|
+
- Avoid nitpicks (P3) unless they affect readability or maintainability in
|
|
705
|
+
a significant way. The review loop filters out P3 findings.
|
|
706
|
+
- When in doubt, give the implementation the benefit of the doubt — flag
|
|
707
|
+
genuine issues, not stylistic preferences.
|
|
708
|
+
|
|
709
|
+
${outputSection}
|
|
710
|
+
|
|
711
|
+
### Field Guidance
|
|
712
|
+
|
|
713
|
+
- **findings**: Each finding should have:
|
|
714
|
+
- \`title\`: Prefix with priority level, e.g. "[P0] Missing null check"
|
|
715
|
+
- \`body\`: What's wrong, why it matters, and how to fix it
|
|
716
|
+
- \`priority\`: 0 = P0 critical, 1 = P1 important, 2 = P2 moderate, 3 = P3 minor
|
|
717
|
+
- \`confidence_score\`: 0.0 – 1.0, how confident you are this is a real issue
|
|
718
|
+
- \`code_location\`: absolute file path and line range (when applicable)
|
|
719
|
+
|
|
720
|
+
- **overall_correctness**: Set to \`"patch is incorrect"\` whenever there is at
|
|
721
|
+
least one P0 or P1 finding (including incomplete tasks). Use
|
|
722
|
+
\`"patch is correct"\` only when findings are empty or strictly P2/P3.
|
|
723
|
+
|
|
724
|
+
- **overall_explanation**: Summary of overall quality, correctness, and any
|
|
725
|
+
patterns observed.
|
|
369
726
|
|
|
370
727
|
Begin your review now.`;
|
|
371
728
|
}
|
|
@@ -377,8 +734,17 @@ Begin your review now.`;
|
|
|
377
734
|
export interface DebuggerContext {
|
|
378
735
|
/** 1-indexed loop iteration the debugger is investigating. */
|
|
379
736
|
iteration: number;
|
|
380
|
-
/**
|
|
381
|
-
|
|
737
|
+
/**
|
|
738
|
+
* Branch changeset captured immediately before the review. Provides the
|
|
739
|
+
* debugger with the same file-level context as the reviewer.
|
|
740
|
+
*/
|
|
741
|
+
changeset: {
|
|
742
|
+
baseBranch: string;
|
|
743
|
+
diffStat: string;
|
|
744
|
+
uncommitted: string;
|
|
745
|
+
nameStatus: string;
|
|
746
|
+
errors: string[];
|
|
747
|
+
};
|
|
382
748
|
}
|
|
383
749
|
|
|
384
750
|
/**
|
|
@@ -420,13 +786,31 @@ ${trimmed}
|
|
|
420
786
|
: `(no reviewer output captured)`;
|
|
421
787
|
}
|
|
422
788
|
|
|
423
|
-
const
|
|
424
|
-
const
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
789
|
+
const { changeset } = context;
|
|
790
|
+
const hasChanges =
|
|
791
|
+
changeset.nameStatus.length > 0 || changeset.uncommitted.length > 0;
|
|
792
|
+
const hasErrors = changeset.errors.length > 0;
|
|
793
|
+
|
|
794
|
+
let changesetSection: string;
|
|
795
|
+
if (hasChanges || hasErrors) {
|
|
796
|
+
const parts: string[] = [];
|
|
797
|
+
if (hasErrors) {
|
|
798
|
+
parts.push(
|
|
799
|
+
"**Git errors** (changeset may be incomplete — re-run these yourself):",
|
|
800
|
+
...changeset.errors.map((e) => `- ${e}`),
|
|
801
|
+
"",
|
|
802
|
+
);
|
|
803
|
+
}
|
|
804
|
+
if (changeset.nameStatus.length > 0) {
|
|
805
|
+
parts.push(`Changed files (relative to \`${changeset.baseBranch}\`):`, "```", changeset.nameStatus, "```");
|
|
806
|
+
}
|
|
807
|
+
if (changeset.uncommitted.length > 0) {
|
|
808
|
+
parts.push(`Uncommitted (\`git status -s\`):`, "```", changeset.uncommitted, "```");
|
|
809
|
+
}
|
|
810
|
+
changesetSection = parts.join("\n");
|
|
811
|
+
} else {
|
|
812
|
+
changesetSection = "(no changes detected)";
|
|
813
|
+
}
|
|
430
814
|
|
|
431
815
|
return `# Debugging Report Request (Iteration ${context.iteration})
|
|
432
816
|
|
|
@@ -442,9 +826,9 @@ read-only mode) are fine; mutations are not.
|
|
|
442
826
|
|
|
443
827
|
${findingsSection}
|
|
444
828
|
|
|
445
|
-
##
|
|
829
|
+
## Branch Changeset
|
|
446
830
|
|
|
447
|
-
${
|
|
831
|
+
${changesetSection}
|
|
448
832
|
|
|
449
833
|
## Investigation Steps
|
|
450
834
|
|
|
@@ -544,7 +928,7 @@ export function parseReviewResult(content: string): ReviewResult | null {
|
|
|
544
928
|
return null;
|
|
545
929
|
}
|
|
546
930
|
|
|
547
|
-
function filterActionable(parsed: {
|
|
931
|
+
export function filterActionable(parsed: {
|
|
548
932
|
findings: ReviewFinding[];
|
|
549
933
|
overall_correctness: string;
|
|
550
934
|
overall_explanation?: string;
|