@bastani/atomic 0.5.11-0 → 0.5.12-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/.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/providers/claude.ts +42 -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
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
"""Advanced Evaluation Example
|
|
2
|
+
|
|
3
|
+
Use when: building LLM-as-judge evaluation pipelines, comparing model outputs
|
|
4
|
+
with position-bias mitigation, or generating domain-specific scoring rubrics.
|
|
5
|
+
|
|
6
|
+
This module demonstrates the three core evaluation patterns from the
|
|
7
|
+
advanced-evaluation skill: direct scoring, pairwise comparison with position
|
|
8
|
+
swapping, and rubric generation. All functions use pseudocode-style examples
|
|
9
|
+
that work across Python environments without specific dependencies.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
from typing import Any
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"direct_scoring_example",
|
|
18
|
+
"pairwise_comparison_example",
|
|
19
|
+
"rubric_generation_example",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# =============================================================================
|
|
24
|
+
# DIRECT SCORING EXAMPLE
|
|
25
|
+
# =============================================================================
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def direct_scoring_example() -> dict[str, Any]:
|
|
29
|
+
"""Rate a single response against defined criteria using direct scoring.
|
|
30
|
+
|
|
31
|
+
Use when: evaluating objective criteria like factual accuracy, instruction
|
|
32
|
+
following, or toxicity where a clear ground truth or rubric exists.
|
|
33
|
+
|
|
34
|
+
Returns:
|
|
35
|
+
Dictionary containing per-criterion scores, evidence, justifications,
|
|
36
|
+
and a weighted summary.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
# Input
|
|
40
|
+
prompt: str = "Explain quantum entanglement to a high school student"
|
|
41
|
+
response: str = (
|
|
42
|
+
"Quantum entanglement is like having two magical coins that are connected. "
|
|
43
|
+
"When you flip one and it lands on heads, the other instantly shows tails, "
|
|
44
|
+
'no matter how far apart they are. Scientists call this "spooky action at a distance."'
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
criteria: list[dict[str, Any]] = [
|
|
48
|
+
{"name": "Accuracy", "description": "Scientific correctness", "weight": 0.4},
|
|
49
|
+
{"name": "Clarity", "description": "Understandable for audience", "weight": 0.3},
|
|
50
|
+
{"name": "Engagement", "description": "Interesting and memorable", "weight": 0.3},
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
# System prompt for the evaluator
|
|
54
|
+
system_prompt: str = (
|
|
55
|
+
"You are an expert evaluator. Assess the response against each criterion.\n\n"
|
|
56
|
+
"For each criterion:\n"
|
|
57
|
+
"1. Find specific evidence in the response\n"
|
|
58
|
+
"2. Score according to the rubric (1-5 scale)\n"
|
|
59
|
+
"3. Justify your score with evidence\n"
|
|
60
|
+
"4. Suggest one specific improvement\n\n"
|
|
61
|
+
"Be objective and consistent. Base scores on explicit evidence."
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
# User prompt structure
|
|
65
|
+
user_prompt: str = f"""## Original Prompt
|
|
66
|
+
{prompt}
|
|
67
|
+
|
|
68
|
+
## Response to Evaluate
|
|
69
|
+
{response}
|
|
70
|
+
|
|
71
|
+
## Criteria
|
|
72
|
+
1. **Accuracy** (weight: 0.4): Scientific correctness
|
|
73
|
+
2. **Clarity** (weight: 0.3): Understandable for audience
|
|
74
|
+
3. **Engagement** (weight: 0.3): Interesting and memorable
|
|
75
|
+
|
|
76
|
+
## Output Format
|
|
77
|
+
Respond with valid JSON:
|
|
78
|
+
{{
|
|
79
|
+
"scores": [
|
|
80
|
+
{{
|
|
81
|
+
"criterion": "Accuracy",
|
|
82
|
+
"score": 4,
|
|
83
|
+
"evidence": ["quote or observation"],
|
|
84
|
+
"justification": "why this score",
|
|
85
|
+
"improvement": "specific suggestion"
|
|
86
|
+
}}
|
|
87
|
+
],
|
|
88
|
+
"summary": {{
|
|
89
|
+
"assessment": "overall quality summary",
|
|
90
|
+
"strengths": ["strength 1"],
|
|
91
|
+
"weaknesses": ["weakness 1"]
|
|
92
|
+
}}
|
|
93
|
+
}}"""
|
|
94
|
+
|
|
95
|
+
# Expected output structure
|
|
96
|
+
expected_output: dict[str, Any] = {
|
|
97
|
+
"scores": [
|
|
98
|
+
{
|
|
99
|
+
"criterion": "Accuracy",
|
|
100
|
+
"score": 4,
|
|
101
|
+
"evidence": ["Correctly uses analogy", "Mentions spooky action at a distance"],
|
|
102
|
+
"justification": "Core concept is correct, analogy is appropriate",
|
|
103
|
+
"improvement": "Could mention it's a quantum mechanical phenomenon",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"criterion": "Clarity",
|
|
107
|
+
"score": 5,
|
|
108
|
+
"evidence": ["Simple coin analogy", "No jargon"],
|
|
109
|
+
"justification": "Appropriate for high school level",
|
|
110
|
+
"improvement": "None needed",
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"criterion": "Engagement",
|
|
114
|
+
"score": 4,
|
|
115
|
+
"evidence": ["Magical coins", "Spooky action quote"],
|
|
116
|
+
"justification": "Memorable imagery and Einstein quote",
|
|
117
|
+
"improvement": "Could add a real-world application",
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
"summary": {
|
|
121
|
+
"assessment": "Good explanation suitable for the target audience",
|
|
122
|
+
"strengths": ["Clear analogy", "Age-appropriate language"],
|
|
123
|
+
"weaknesses": ["Could be more comprehensive"],
|
|
124
|
+
},
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
# Calculate weighted score
|
|
128
|
+
total_weight: float = sum(c["weight"] for c in criteria)
|
|
129
|
+
weighted_score: float = sum(
|
|
130
|
+
s["score"] * next(c["weight"] for c in criteria if c["name"] == s["criterion"])
|
|
131
|
+
for s in expected_output["scores"]
|
|
132
|
+
) / total_weight
|
|
133
|
+
|
|
134
|
+
print(f"Weighted Score: {weighted_score:.2f}/5")
|
|
135
|
+
return expected_output
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
# =============================================================================
|
|
139
|
+
# PAIRWISE COMPARISON WITH POSITION BIAS MITIGATION
|
|
140
|
+
# =============================================================================
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def pairwise_comparison_example() -> dict[str, Any]:
|
|
144
|
+
"""Compare two responses with position-swapped bias mitigation.
|
|
145
|
+
|
|
146
|
+
Use when: evaluating subjective preferences like tone, style, or
|
|
147
|
+
persuasiveness where pairwise comparison achieves higher human-judge
|
|
148
|
+
agreement than direct scoring.
|
|
149
|
+
|
|
150
|
+
Returns:
|
|
151
|
+
Dictionary containing the winner, confidence score, and whether
|
|
152
|
+
position consistency was achieved across both passes.
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
prompt: str = "Explain machine learning to a beginner"
|
|
156
|
+
|
|
157
|
+
response_a: str = (
|
|
158
|
+
"Machine learning is a subset of artificial intelligence that enables "
|
|
159
|
+
"systems to learn and improve from experience without being explicitly "
|
|
160
|
+
"programmed. It uses statistical techniques to give computers the ability "
|
|
161
|
+
"to identify patterns in data."
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
response_b: str = (
|
|
165
|
+
"Imagine teaching a dog a new trick. You show the dog what to do, give "
|
|
166
|
+
"treats when it's right, and eventually it learns. Machine learning works "
|
|
167
|
+
"similarly - we show computers lots of examples, tell them when they're "
|
|
168
|
+
"right, and they learn to recognize patterns on their own."
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
criteria: list[str] = ["clarity", "accessibility", "accuracy"]
|
|
172
|
+
|
|
173
|
+
# System prompt emphasizing bias awareness
|
|
174
|
+
system_prompt: str = (
|
|
175
|
+
"You are an expert evaluator comparing two AI responses.\n\n"
|
|
176
|
+
"CRITICAL INSTRUCTIONS:\n"
|
|
177
|
+
"- Do NOT prefer responses because they are longer\n"
|
|
178
|
+
"- Do NOT prefer responses based on position (first vs second)\n"
|
|
179
|
+
"- Focus ONLY on quality according to the specified criteria\n"
|
|
180
|
+
"- Ties are acceptable when responses are genuinely equivalent"
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
# Build evaluation prompt for a given ordering
|
|
184
|
+
def evaluate_pass(
|
|
185
|
+
first_response: str,
|
|
186
|
+
second_response: str,
|
|
187
|
+
first_label: str,
|
|
188
|
+
second_label: str,
|
|
189
|
+
) -> str:
|
|
190
|
+
"""Build evaluation prompt for one pass of position-swapped comparison.
|
|
191
|
+
|
|
192
|
+
Use when: constructing the prompt for a single evaluation pass before
|
|
193
|
+
swapping response positions for bias mitigation.
|
|
194
|
+
"""
|
|
195
|
+
return f"""## Original Prompt
|
|
196
|
+
{prompt}
|
|
197
|
+
|
|
198
|
+
## Response {first_label}
|
|
199
|
+
{first_response}
|
|
200
|
+
|
|
201
|
+
## Response {second_label}
|
|
202
|
+
{second_response}
|
|
203
|
+
|
|
204
|
+
## Comparison Criteria
|
|
205
|
+
{', '.join(criteria)}
|
|
206
|
+
|
|
207
|
+
## Output Format
|
|
208
|
+
{{
|
|
209
|
+
"comparison": [
|
|
210
|
+
{{"criterion": "clarity", "winner": "A|B|TIE", "reasoning": "..."}}
|
|
211
|
+
],
|
|
212
|
+
"result": {{
|
|
213
|
+
"winner": "A|B|TIE",
|
|
214
|
+
"confidence": 0.0-1.0,
|
|
215
|
+
"reasoning": "overall reasoning"
|
|
216
|
+
}}
|
|
217
|
+
}}"""
|
|
218
|
+
|
|
219
|
+
# Position bias mitigation protocol
|
|
220
|
+
print("Pass 1: A in first position")
|
|
221
|
+
pass1_result: dict[str, Any] = {"winner": "B", "confidence": 0.8}
|
|
222
|
+
|
|
223
|
+
print("Pass 2: B in first position (swapped)")
|
|
224
|
+
pass2_result: dict[str, Any] = {"winner": "A", "confidence": 0.75} # A because B was first
|
|
225
|
+
|
|
226
|
+
# Map pass2 result back (swap labels)
|
|
227
|
+
def map_winner(winner: str) -> str:
|
|
228
|
+
"""Map winner label after position swap."""
|
|
229
|
+
return {"A": "B", "B": "A", "TIE": "TIE"}[winner]
|
|
230
|
+
|
|
231
|
+
pass2_mapped: str = map_winner(pass2_result["winner"])
|
|
232
|
+
print(f"Pass 2 mapped winner: {pass2_mapped}")
|
|
233
|
+
|
|
234
|
+
# Check consistency
|
|
235
|
+
consistent: bool = pass1_result["winner"] == pass2_mapped
|
|
236
|
+
|
|
237
|
+
final_result: dict[str, Any]
|
|
238
|
+
if consistent:
|
|
239
|
+
final_result = {
|
|
240
|
+
"winner": pass1_result["winner"],
|
|
241
|
+
"confidence": (pass1_result["confidence"] + pass2_result["confidence"]) / 2,
|
|
242
|
+
"position_consistent": True,
|
|
243
|
+
}
|
|
244
|
+
else:
|
|
245
|
+
final_result = {
|
|
246
|
+
"winner": "TIE",
|
|
247
|
+
"confidence": 0.5,
|
|
248
|
+
"position_consistent": False,
|
|
249
|
+
"bias_detected": True,
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
print(f"\nFinal Result: {final_result}")
|
|
253
|
+
return final_result
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
# =============================================================================
|
|
257
|
+
# RUBRIC GENERATION
|
|
258
|
+
# =============================================================================
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def rubric_generation_example() -> dict[str, Any]:
|
|
262
|
+
"""Generate a domain-specific scoring rubric for consistent evaluation.
|
|
263
|
+
|
|
264
|
+
Use when: establishing evaluation standards for a new criterion, reducing
|
|
265
|
+
scoring variance (rubrics cut variance by 40-60%), or onboarding new
|
|
266
|
+
evaluators to an existing evaluation pipeline.
|
|
267
|
+
|
|
268
|
+
Returns:
|
|
269
|
+
Dictionary containing score levels, characteristics, examples,
|
|
270
|
+
scoring guidelines, and edge case handling.
|
|
271
|
+
"""
|
|
272
|
+
|
|
273
|
+
criterion_name: str = "Code Readability"
|
|
274
|
+
criterion_description: str = "How easy the code is to understand and maintain"
|
|
275
|
+
domain: str = "software engineering"
|
|
276
|
+
scale: str = "1-5"
|
|
277
|
+
strictness: str = "balanced"
|
|
278
|
+
|
|
279
|
+
system_prompt: str = (
|
|
280
|
+
f"You are an expert in creating evaluation rubrics.\n"
|
|
281
|
+
f"Create clear, actionable rubrics with distinct boundaries between levels.\n\n"
|
|
282
|
+
f"Strictness: {strictness}\n"
|
|
283
|
+
f"- lenient: Lower bar for passing scores\n"
|
|
284
|
+
f"- balanced: Fair, typical expectations\n"
|
|
285
|
+
f"- strict: High standards, critical evaluation"
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
user_prompt: str = f"""Create a scoring rubric for:
|
|
289
|
+
|
|
290
|
+
**Criterion**: {criterion_name}
|
|
291
|
+
**Description**: {criterion_description}
|
|
292
|
+
**Scale**: {scale}
|
|
293
|
+
**Domain**: {domain}
|
|
294
|
+
|
|
295
|
+
Generate:
|
|
296
|
+
1. Clear descriptions for each score level
|
|
297
|
+
2. Specific characteristics that define each level
|
|
298
|
+
3. Brief example text for each level
|
|
299
|
+
4. General scoring guidelines
|
|
300
|
+
5. Edge cases with guidance"""
|
|
301
|
+
|
|
302
|
+
# Expected rubric structure
|
|
303
|
+
rubric: dict[str, Any] = {
|
|
304
|
+
"criterion": criterion_name,
|
|
305
|
+
"scale": {"min": 1, "max": 5},
|
|
306
|
+
"levels": [
|
|
307
|
+
{
|
|
308
|
+
"score": 1,
|
|
309
|
+
"label": "Poor",
|
|
310
|
+
"description": "Code is difficult to understand without significant effort",
|
|
311
|
+
"characteristics": [
|
|
312
|
+
"No meaningful variable or function names",
|
|
313
|
+
"No comments or documentation",
|
|
314
|
+
"Deeply nested or convoluted logic",
|
|
315
|
+
],
|
|
316
|
+
"example": "def f(x): return x[0]*x[1]+x[2]",
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"score": 3,
|
|
320
|
+
"label": "Adequate",
|
|
321
|
+
"description": "Code is understandable with some effort",
|
|
322
|
+
"characteristics": [
|
|
323
|
+
"Most variables have meaningful names",
|
|
324
|
+
"Basic comments for complex sections",
|
|
325
|
+
"Logic is followable but could be cleaner",
|
|
326
|
+
],
|
|
327
|
+
"example": (
|
|
328
|
+
"def calc_total(items): # calculate sum\n"
|
|
329
|
+
" total = 0\n"
|
|
330
|
+
" for i in items: total += i\n"
|
|
331
|
+
" return total"
|
|
332
|
+
),
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"score": 5,
|
|
336
|
+
"label": "Excellent",
|
|
337
|
+
"description": "Code is immediately clear and maintainable",
|
|
338
|
+
"characteristics": [
|
|
339
|
+
"All names are descriptive and consistent",
|
|
340
|
+
"Comprehensive documentation",
|
|
341
|
+
"Clean, modular structure",
|
|
342
|
+
],
|
|
343
|
+
"example": (
|
|
344
|
+
"def calculate_total_price(items: List[Item]) -> Decimal:\n"
|
|
345
|
+
" '''Calculate the total price of all items.'''\n"
|
|
346
|
+
" return sum(item.price for item in items)"
|
|
347
|
+
),
|
|
348
|
+
},
|
|
349
|
+
],
|
|
350
|
+
"scoring_guidelines": [
|
|
351
|
+
"Focus on readability, not cleverness",
|
|
352
|
+
"Consider the intended audience (team skill level)",
|
|
353
|
+
"Consistency matters more than style preference",
|
|
354
|
+
],
|
|
355
|
+
"edge_cases": [
|
|
356
|
+
{
|
|
357
|
+
"situation": "Code uses domain-specific abbreviations",
|
|
358
|
+
"guidance": "Score based on readability for domain experts, not general audience",
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"situation": "Code is auto-generated",
|
|
362
|
+
"guidance": "Apply same standards but note in evaluation",
|
|
363
|
+
},
|
|
364
|
+
],
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
print("Generated Rubric:")
|
|
368
|
+
for level in rubric["levels"]:
|
|
369
|
+
print(f" {level['score']}: {level['label']} - {level['description']}")
|
|
370
|
+
|
|
371
|
+
return rubric
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
# =============================================================================
|
|
375
|
+
# MAIN
|
|
376
|
+
# =============================================================================
|
|
377
|
+
|
|
378
|
+
if __name__ == "__main__":
|
|
379
|
+
print("=" * 60)
|
|
380
|
+
print("DIRECT SCORING EXAMPLE")
|
|
381
|
+
print("=" * 60)
|
|
382
|
+
direct_scoring_example()
|
|
383
|
+
|
|
384
|
+
print("\n" + "=" * 60)
|
|
385
|
+
print("PAIRWISE COMPARISON EXAMPLE")
|
|
386
|
+
print("=" * 60)
|
|
387
|
+
pairwise_comparison_example()
|
|
388
|
+
|
|
389
|
+
print("\n" + "=" * 60)
|
|
390
|
+
print("RUBRIC GENERATION EXAMPLE")
|
|
391
|
+
print("=" * 60)
|
|
392
|
+
rubric_generation_example()
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: animate
|
|
3
|
+
description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.
|
|
4
|
+
version: 2.1.1
|
|
5
|
+
user-invocable: true
|
|
6
|
+
argument-hint: "[target]"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight.
|
|
10
|
+
|
|
11
|
+
## MANDATORY PREPARATION
|
|
12
|
+
|
|
13
|
+
Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: performance constraints.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Assess Animation Opportunities
|
|
18
|
+
|
|
19
|
+
Analyze where motion would improve the experience:
|
|
20
|
+
|
|
21
|
+
1. **Identify static areas**:
|
|
22
|
+
- **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.)
|
|
23
|
+
- **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes)
|
|
24
|
+
- **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious
|
|
25
|
+
- **Lack of delight**: Functional but joyless interactions
|
|
26
|
+
- **Missed guidance**: Opportunities to direct attention or explain behavior
|
|
27
|
+
|
|
28
|
+
2. **Understand the context**:
|
|
29
|
+
- What's the personality? (Playful vs serious, energetic vs calm)
|
|
30
|
+
- What's the performance budget? (Mobile-first? Complex page?)
|
|
31
|
+
- Who's the audience? (Motion-sensitive users? Power users who want speed?)
|
|
32
|
+
- What matters most? (One hero animation vs many micro-interactions?)
|
|
33
|
+
|
|
34
|
+
If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
|
|
35
|
+
|
|
36
|
+
**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them.
|
|
37
|
+
|
|
38
|
+
## Plan Animation Strategy
|
|
39
|
+
|
|
40
|
+
Create a purposeful animation plan:
|
|
41
|
+
|
|
42
|
+
- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?)
|
|
43
|
+
- **Feedback layer**: Which interactions need acknowledgment?
|
|
44
|
+
- **Transition layer**: Which state changes need smoothing?
|
|
45
|
+
- **Delight layer**: Where can we surprise and delight?
|
|
46
|
+
|
|
47
|
+
**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments.
|
|
48
|
+
|
|
49
|
+
## Implement Animations
|
|
50
|
+
|
|
51
|
+
Add motion systematically across these categories:
|
|
52
|
+
|
|
53
|
+
### Entrance Animations
|
|
54
|
+
- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations
|
|
55
|
+
- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects)
|
|
56
|
+
- **Content reveals**: Scroll-triggered animations using intersection observer
|
|
57
|
+
- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management
|
|
58
|
+
|
|
59
|
+
### Micro-interactions
|
|
60
|
+
- **Button feedback**:
|
|
61
|
+
- Hover: Subtle scale (1.02-1.05), color shift, shadow increase
|
|
62
|
+
- Click: Quick scale down then up (0.95 → 1), ripple effect
|
|
63
|
+
- Loading: Spinner or pulse state
|
|
64
|
+
- **Form interactions**:
|
|
65
|
+
- Input focus: Border color transition, slight scale or glow
|
|
66
|
+
- Validation: Shake on error, check mark on success, smooth color transitions
|
|
67
|
+
- **Toggle switches**: Smooth slide + color transition (200-300ms)
|
|
68
|
+
- **Checkboxes/radio**: Check mark animation, ripple effect
|
|
69
|
+
- **Like/favorite**: Scale + rotation, particle effects, color transition
|
|
70
|
+
|
|
71
|
+
### State Transitions
|
|
72
|
+
- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms)
|
|
73
|
+
- **Expand/collapse**: Height transition with overflow handling, icon rotation
|
|
74
|
+
- **Loading states**: Skeleton screen fades, spinner animations, progress bars
|
|
75
|
+
- **Success/error**: Color transitions, icon animations, gentle scale pulse
|
|
76
|
+
- **Enable/disable**: Opacity transitions, cursor changes
|
|
77
|
+
|
|
78
|
+
### Navigation & Flow
|
|
79
|
+
- **Page transitions**: Crossfade between routes, shared element transitions
|
|
80
|
+
- **Tab switching**: Slide indicator, content fade/slide
|
|
81
|
+
- **Carousel/slider**: Smooth transforms, snap points, momentum
|
|
82
|
+
- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators
|
|
83
|
+
|
|
84
|
+
### Feedback & Guidance
|
|
85
|
+
- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights
|
|
86
|
+
- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning
|
|
87
|
+
- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation
|
|
88
|
+
- **Focus flow**: Highlight path through form or workflow
|
|
89
|
+
|
|
90
|
+
### Delight Moments
|
|
91
|
+
- **Empty states**: Subtle floating animations on illustrations
|
|
92
|
+
- **Completed actions**: Confetti, check mark flourish, success celebrations
|
|
93
|
+
- **Easter eggs**: Hidden interactions for discovery
|
|
94
|
+
- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches
|
|
95
|
+
|
|
96
|
+
## Technical Implementation
|
|
97
|
+
|
|
98
|
+
Use appropriate techniques for each animation:
|
|
99
|
+
|
|
100
|
+
### Timing & Easing
|
|
101
|
+
|
|
102
|
+
**Durations by purpose:**
|
|
103
|
+
- **100-150ms**: Instant feedback (button press, toggle)
|
|
104
|
+
- **200-300ms**: State changes (hover, menu open)
|
|
105
|
+
- **300-500ms**: Layout changes (accordion, modal)
|
|
106
|
+
- **500-800ms**: Entrance animations (page load)
|
|
107
|
+
|
|
108
|
+
**Easing curves (use these, not CSS defaults):**
|
|
109
|
+
```css
|
|
110
|
+
/* Recommended - natural deceleration */
|
|
111
|
+
--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */
|
|
112
|
+
--ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */
|
|
113
|
+
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */
|
|
114
|
+
|
|
115
|
+
/* AVOID - feel dated and tacky */
|
|
116
|
+
/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */
|
|
117
|
+
/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Exit animations are faster than entrances.** Use ~75% of enter duration.
|
|
121
|
+
|
|
122
|
+
### CSS Animations
|
|
123
|
+
```css
|
|
124
|
+
/* Prefer for simple, declarative animations */
|
|
125
|
+
- transitions for state changes
|
|
126
|
+
- @keyframes for complex sequences
|
|
127
|
+
- transform + opacity only (GPU-accelerated)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### JavaScript Animation
|
|
131
|
+
```javascript
|
|
132
|
+
/* Use for complex, interactive animations */
|
|
133
|
+
- Web Animations API for programmatic control
|
|
134
|
+
- Framer Motion for React
|
|
135
|
+
- GSAP for complex sequences
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Performance
|
|
139
|
+
- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
|
|
140
|
+
- **will-change**: Add sparingly for known expensive animations
|
|
141
|
+
- **Reduce paint**: Minimize repaints, use `contain` where appropriate
|
|
142
|
+
- **Monitor FPS**: Ensure 60fps on target devices
|
|
143
|
+
|
|
144
|
+
### Accessibility
|
|
145
|
+
```css
|
|
146
|
+
@media (prefers-reduced-motion: reduce) {
|
|
147
|
+
* {
|
|
148
|
+
animation-duration: 0.01ms !important;
|
|
149
|
+
animation-iteration-count: 1 !important;
|
|
150
|
+
transition-duration: 0.01ms !important;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**NEVER**:
|
|
156
|
+
- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
|
|
157
|
+
- Animate layout properties (width, height, top, left)—use transform instead
|
|
158
|
+
- Use durations over 500ms for feedback—it feels laggy
|
|
159
|
+
- Animate without purpose—every animation needs a reason
|
|
160
|
+
- Ignore `prefers-reduced-motion`—this is an accessibility violation
|
|
161
|
+
- Animate everything—animation fatigue makes interfaces feel exhausting
|
|
162
|
+
- Block interaction during animations unless intentional
|
|
163
|
+
|
|
164
|
+
## Verify Quality
|
|
165
|
+
|
|
166
|
+
Test animations thoroughly:
|
|
167
|
+
|
|
168
|
+
- **Smooth at 60fps**: No jank on target devices
|
|
169
|
+
- **Feels natural**: Easing curves feel organic, not robotic
|
|
170
|
+
- **Appropriate timing**: Not too fast (jarring) or too slow (laggy)
|
|
171
|
+
- **Reduced motion works**: Animations disabled or simplified appropriately
|
|
172
|
+
- **Doesn't block**: Users can interact during/after animations
|
|
173
|
+
- **Adds value**: Makes interface clearer or more delightful
|
|
174
|
+
|
|
175
|
+
Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arrange
|
|
3
|
+
description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
argument-hint: "[target]"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions.
|
|
9
|
+
|
|
10
|
+
## MANDATORY PREPARATION
|
|
11
|
+
|
|
12
|
+
Invoke /frontend-design — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /teach-impeccable first.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Assess Current Layout
|
|
17
|
+
|
|
18
|
+
Analyze what's weak about the current spatial design:
|
|
19
|
+
|
|
20
|
+
1. **Spacing**:
|
|
21
|
+
- Is spacing consistent or arbitrary? (Random padding/margin values)
|
|
22
|
+
- Is all spacing the same? (Equal padding everywhere = no rhythm)
|
|
23
|
+
- Are related elements grouped tightly, with generous space between groups?
|
|
24
|
+
|
|
25
|
+
2. **Visual hierarchy**:
|
|
26
|
+
- Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings?
|
|
27
|
+
- Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?)
|
|
28
|
+
- Does whitespace guide the eye to what matters?
|
|
29
|
+
|
|
30
|
+
3. **Grid & structure**:
|
|
31
|
+
- Is there a clear underlying structure, or does the layout feel random?
|
|
32
|
+
- Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly)
|
|
33
|
+
- Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule)
|
|
34
|
+
|
|
35
|
+
4. **Rhythm & variety**:
|
|
36
|
+
- Does the layout have visual rhythm? (Alternating tight/generous spacing)
|
|
37
|
+
- Is every section structured the same way? (Monotonous repetition)
|
|
38
|
+
- Are there intentional moments of surprise or emphasis?
|
|
39
|
+
|
|
40
|
+
5. **Density**:
|
|
41
|
+
- Is the layout too cramped? (Not enough breathing room)
|
|
42
|
+
- Is the layout too sparse? (Excessive whitespace without purpose)
|
|
43
|
+
- Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air)
|
|
44
|
+
|
|
45
|
+
**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention.
|
|
46
|
+
|
|
47
|
+
## Plan Layout Improvements
|
|
48
|
+
|
|
49
|
+
Consult the [spatial design reference](reference/spatial-design.md) from the frontend-design skill for detailed guidance on grids, rhythm, and container queries.
|
|
50
|
+
|
|
51
|
+
Create a systematic plan:
|
|
52
|
+
|
|
53
|
+
- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency.
|
|
54
|
+
- **Hierarchy strategy**: How will space communicate importance?
|
|
55
|
+
- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts.
|
|
56
|
+
- **Rhythm**: Where should spacing be tight vs generous?
|
|
57
|
+
|
|
58
|
+
## Improve Layout Systematically
|
|
59
|
+
|
|
60
|
+
### Establish a Spacing System
|
|
61
|
+
|
|
62
|
+
- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers.
|
|
63
|
+
- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8`
|
|
64
|
+
- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks
|
|
65
|
+
- Apply `clamp()` for fluid spacing that breathes on larger screens
|
|
66
|
+
|
|
67
|
+
### Create Visual Rhythm
|
|
68
|
+
|
|
69
|
+
- **Tight grouping** for related elements (8-12px between siblings)
|
|
70
|
+
- **Generous separation** between distinct sections (48-96px)
|
|
71
|
+
- **Varied spacing** within sections — not every row needs the same gap
|
|
72
|
+
- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense
|
|
73
|
+
|
|
74
|
+
### Choose the Right Layout Tool
|
|
75
|
+
|
|
76
|
+
- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks.
|
|
77
|
+
- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control.
|
|
78
|
+
- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible.
|
|
79
|
+
- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints.
|
|
80
|
+
- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints.
|
|
81
|
+
|
|
82
|
+
### Break Card Grid Monotony
|
|
83
|
+
|
|
84
|
+
- Don't default to card grids for everything — spacing and alignment create visual grouping naturally
|
|
85
|
+
- Use cards only when content is truly distinct and actionable — never nest cards inside cards
|
|
86
|
+
- Vary card sizes, span columns, or mix cards with non-card content to break repetition
|
|
87
|
+
|
|
88
|
+
### Strengthen Visual Hierarchy
|
|
89
|
+
|
|
90
|
+
- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient.
|
|
91
|
+
- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation).
|
|
92
|
+
- Create clear content groupings through proximity and separation.
|
|
93
|
+
|
|
94
|
+
### Manage Depth & Elevation
|
|
95
|
+
|
|
96
|
+
- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip)
|
|
97
|
+
- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle
|
|
98
|
+
- Use elevation to reinforce hierarchy, not as decoration
|
|
99
|
+
|
|
100
|
+
### Optical Adjustments
|
|
101
|
+
|
|
102
|
+
- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively.
|
|
103
|
+
|
|
104
|
+
**NEVER**:
|
|
105
|
+
- Use arbitrary spacing values outside your scale
|
|
106
|
+
- Make all spacing equal — variety creates hierarchy
|
|
107
|
+
- Wrap everything in cards — not everything needs a container
|
|
108
|
+
- Nest cards inside cards — use spacing and dividers for hierarchy within
|
|
109
|
+
- Use identical card grids everywhere (icon + heading + text, repeated)
|
|
110
|
+
- Center everything — left-aligned with asymmetry feels more designed
|
|
111
|
+
- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers.
|
|
112
|
+
- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job
|
|
113
|
+
- Use arbitrary z-index values (999, 9999) — build a semantic scale
|
|
114
|
+
|
|
115
|
+
## Verify Layout Improvements
|
|
116
|
+
|
|
117
|
+
- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision?
|
|
118
|
+
- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing?
|
|
119
|
+
- **Hierarchy**: Is the most important content obvious within 2 seconds?
|
|
120
|
+
- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful?
|
|
121
|
+
- **Consistency**: Is the spacing system applied uniformly?
|
|
122
|
+
- **Responsiveness**: Does the layout adapt gracefully across screen sizes?
|
|
123
|
+
|
|
124
|
+
Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional.
|