@bastani/atomic 0.5.11 → 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,243 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gh-commit
|
|
3
|
+
description: Create well-formatted commits with conventional commit format.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Smart Git Commit
|
|
7
|
+
|
|
8
|
+
Create well-formatted commit: $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
## Current Repository State
|
|
11
|
+
|
|
12
|
+
- Git status: !`git status --porcelain`
|
|
13
|
+
- Current branch: !`git branch --show-current`
|
|
14
|
+
- Staged changes: !`git diff --cached --stat`
|
|
15
|
+
- Unstaged changes: !`git diff --stat`
|
|
16
|
+
- Recent commits: !`git log --oneline -5`
|
|
17
|
+
|
|
18
|
+
## What This Command Does
|
|
19
|
+
|
|
20
|
+
1. Checks which files are staged with `git status`
|
|
21
|
+
2. If 0 files are staged, automatically adds all modified and new files with `git add`
|
|
22
|
+
3. Performs a `git diff` to understand what changes are being committed
|
|
23
|
+
4. Analyzes the diff to determine if multiple distinct logical changes are present
|
|
24
|
+
5. If multiple distinct changes are detected, suggests breaking the commit into multiple smaller commits
|
|
25
|
+
6. For each commit (or the single commit if not split), creates a commit message using conventional commit format
|
|
26
|
+
|
|
27
|
+
## Best Practices for Commits
|
|
28
|
+
|
|
29
|
+
- Follow the Conventional Commits specification as described below.
|
|
30
|
+
|
|
31
|
+
# Conventional Commits 1.0.0
|
|
32
|
+
|
|
33
|
+
## Summary
|
|
34
|
+
|
|
35
|
+
The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with [SemVer](http://semver.org), by describing the features, fixes, and breaking changes made in commit messages.
|
|
36
|
+
|
|
37
|
+
The commit message should be structured as follows:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
<type>[optional scope]: <description>
|
|
41
|
+
|
|
42
|
+
[optional body]
|
|
43
|
+
|
|
44
|
+
[optional footer(s)]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The commit contains the following structural elements, to communicate intent to the consumers of your library:
|
|
48
|
+
|
|
49
|
+
1. **fix:** a commit of the _type_ `fix` patches a bug in your codebase (this correlates with [`PATCH`](http://semver.org/#summary) in Semantic Versioning).
|
|
50
|
+
2. **feat:** a commit of the _type_ `feat` introduces a new feature to the codebase (this correlates with [`MINOR`](http://semver.org/#summary) in Semantic Versioning).
|
|
51
|
+
3. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:`, or appends a `'!'` after the type/scope, introduces a breaking API change (correlating with [`MAJOR`](http://semver.org/#summary) in Semantic Versioning). A BREAKING CHANGE can be part of commits of any _type_.
|
|
52
|
+
4. _types_ other than `fix:` and `feat:` are allowed, for example [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) (based on the [Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)) recommends `build:`, `chore:`, `ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others.
|
|
53
|
+
5. _footers_ other than `BREAKING CHANGE: <description>` may be provided and follow a convention similar to [git trailer format](https://git-scm.com/docs/git-interpret-trailers).
|
|
54
|
+
|
|
55
|
+
Additional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic Versioning (unless they include a BREAKING CHANGE). A scope may be provided to a commit's type, to provide additional contextual information and is contained within parenthesis, e.g., `feat(parser): add ability to parse arrays`.
|
|
56
|
+
|
|
57
|
+
## Examples
|
|
58
|
+
|
|
59
|
+
### Commit message with description and breaking change footer
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
feat: allow provided config object to extend other configs
|
|
63
|
+
|
|
64
|
+
BREAKING CHANGE: `extends` key in config file is now used for extending other config files
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Commit message with `'!'` to draw attention to breaking change
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
feat'!': send an email to the customer when a product is shipped
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Commit message with scope and `'!'` to draw attention to breaking change
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
feat(api)'!': send an email to the customer when a product is shipped
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Commit message with both `'!'` and BREAKING CHANGE footer
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
chore'!': drop support for Node 6
|
|
83
|
+
|
|
84
|
+
BREAKING CHANGE: use JavaScript features not available in Node 6.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Commit message with no body
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
docs: correct spelling of CHANGELOG
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Commit message with scope
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
feat(lang): add Polish language
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Commit message with multi-paragraph body and multiple footers
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
fix: prevent racing of requests
|
|
103
|
+
|
|
104
|
+
Introduce a request id and a reference to latest request. Dismiss
|
|
105
|
+
incoming responses other than from latest request.
|
|
106
|
+
|
|
107
|
+
Remove timeouts which were used to mitigate the racing issue but are
|
|
108
|
+
obsolete now.
|
|
109
|
+
|
|
110
|
+
Reviewed-by: Z
|
|
111
|
+
Refs: #123
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Specification
|
|
115
|
+
|
|
116
|
+
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt).
|
|
117
|
+
|
|
118
|
+
1. Commits MUST be prefixed with a type, which consists of a noun, `feat`, `fix`, etc., followed by the OPTIONAL scope, OPTIONAL `'!'`, and REQUIRED terminal colon and space.
|
|
119
|
+
2. The type `feat` MUST be used when a commit adds a new feature to your application or library.
|
|
120
|
+
3. The type `fix` MUST be used when a commit represents a bug fix for your application.
|
|
121
|
+
4. A scope MAY be provided after a type. A scope MUST consist of a noun describing a section of the codebase surrounded by parenthesis, e.g., `fix(parser):`
|
|
122
|
+
5. A description MUST immediately follow the colon and space after the type/scope prefix. The description is a short summary of the code changes, e.g., _fix: array parsing issue when multiple spaces were contained in string_.
|
|
123
|
+
6. A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.
|
|
124
|
+
7. A commit body is free-form and MAY consist of any number of newline separated paragraphs.
|
|
125
|
+
8. One or more footers MAY be provided one blank line after the body. Each footer MUST consist of a word token, followed by either a `:<space>` or `<space>#` separator, followed by a string value (this is inspired by the [git trailer convention](https://git-scm.com/docs/git-interpret-trailers)).
|
|
126
|
+
9. A footer's token MUST use `-` in place of whitespace characters, e.g., `Acked-by` (this helps differentiate the footer section from a multi-paragraph body). An exception is made for `BREAKING CHANGE`, which MAY also be used as a token.
|
|
127
|
+
10. A footer's value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer token/separator pair is observed.
|
|
128
|
+
11. Breaking changes MUST be indicated in the type/scope prefix of a commit, or as an entry in the footer.
|
|
129
|
+
12. If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g., _BREAKING CHANGE: environment variables now take precedence over config files_.
|
|
130
|
+
13. If included in the type/scope prefix, breaking changes MUST be indicated by a `'!'` immediately before the `:`. If `'!'` is used, `BREAKING CHANGE:` MAY be omitted from the footer section, and the commit description SHALL be used to describe the breaking change.
|
|
131
|
+
14. Types other than `feat` and `fix` MAY be used in your commit messages, e.g., _docs: update ref docs._
|
|
132
|
+
15. The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase.
|
|
133
|
+
16. BREAKING-CHANGE MUST be synonymous with BREAKING CHANGE, when used as a token in a footer.
|
|
134
|
+
|
|
135
|
+
## Why Use Conventional Commits
|
|
136
|
+
|
|
137
|
+
- Automatically generating CHANGELOGs.
|
|
138
|
+
- Automatically determining a semantic version bump (based on the types of commits landed).
|
|
139
|
+
- Communicating the nature of changes to teammates, the public, and other stakeholders.
|
|
140
|
+
- Triggering build and publish processes.
|
|
141
|
+
- Making it easier for people to contribute to your projects, by allowing them to explore a more structured commit history.
|
|
142
|
+
|
|
143
|
+
## FAQ
|
|
144
|
+
|
|
145
|
+
### How should I deal with commit messages in the initial development phase?
|
|
146
|
+
|
|
147
|
+
We recommend that you proceed as if you've already released the product. Typically _somebody_, even if it's your fellow software developers, is using your software. They'll want to know what's fixed, what breaks etc.
|
|
148
|
+
|
|
149
|
+
### Are the types in the commit title uppercase or lowercase?
|
|
150
|
+
|
|
151
|
+
Any casing may be used, but it's best to be consistent.
|
|
152
|
+
|
|
153
|
+
### What do I do if the commit conforms to more than one of the commit types?
|
|
154
|
+
|
|
155
|
+
Go back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive us to make more organized commits and PRs.
|
|
156
|
+
|
|
157
|
+
### Doesn't this discourage rapid development and fast iteration?
|
|
158
|
+
|
|
159
|
+
It discourages moving fast in a disorganized way. It helps you be able to move fast long term across multiple projects with varied contributors.
|
|
160
|
+
|
|
161
|
+
### Might Conventional Commits lead developers to limit the type of commits they make because they'll be thinking in the types provided?
|
|
162
|
+
|
|
163
|
+
Conventional Commits encourages us to make more of certain types of commits such as fixes. Other than that, the flexibility of Conventional Commits allows your team to come up with their own types and change those types over time.
|
|
164
|
+
|
|
165
|
+
### How does this relate to SemVer?
|
|
166
|
+
|
|
167
|
+
`fix` type commits should be translated to `PATCH` releases. `feat` type commits should be translated to `MINOR` releases. Commits with `BREAKING CHANGE` in the commits, regardless of type, should be translated to `MAJOR` releases.
|
|
168
|
+
|
|
169
|
+
### How should I version my extensions to the Conventional Commits Specification, e.g. `@jameswomack/conventional-commit-spec`?
|
|
170
|
+
|
|
171
|
+
We recommend using SemVer to release your own extensions to this specification (and encourage you to make these extensions'!')
|
|
172
|
+
|
|
173
|
+
### What do I do if I accidentally use the wrong commit type?
|
|
174
|
+
|
|
175
|
+
#### When you used a type that's of the spec but not the correct type, e.g. `fix` instead of `feat`
|
|
176
|
+
|
|
177
|
+
Prior to merging or releasing the mistake, we recommend using `git rebase -i` to edit the commit history. After release, the cleanup will be different according to what tools and processes you use.
|
|
178
|
+
|
|
179
|
+
#### When you used a type _not_ of the spec, e.g. `feet` instead of `feat`
|
|
180
|
+
|
|
181
|
+
In a worst case scenario, it's not the end of the world if a commit lands that does not meet the Conventional Commits specification. It simply means that commit will be missed by tools that are based on the spec.
|
|
182
|
+
|
|
183
|
+
### Do all my contributors need to use the Conventional Commits specification?
|
|
184
|
+
|
|
185
|
+
No'!' If you use a squash based workflow on Git lead maintainers can clean up the commit messages as they're merged—adding no workload to casual committers. A common workflow for this is to have your git system automatically squash commits from a pull request and present a form for the lead maintainer to enter the proper git commit message for the merge.
|
|
186
|
+
|
|
187
|
+
### How does Conventional Commits handle revert commits?
|
|
188
|
+
|
|
189
|
+
Reverting code can be complicated: are you reverting multiple commits? if you revert a feature, should the next release instead be a patch?
|
|
190
|
+
|
|
191
|
+
Conventional Commits does not make an explicit effort to define revert behavior. Instead we leave it to tooling authors to use the flexibility of _types_ and _footers_ to develop their logic for handling reverts.
|
|
192
|
+
|
|
193
|
+
One recommendation is to use the `revert` type, and a footer that references the commit SHAs that are being reverted:
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
revert: let us never again speak of the noodle incident
|
|
197
|
+
|
|
198
|
+
Refs: 676104e, a215868
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Attributing AI-Assisted Code Authorship
|
|
202
|
+
|
|
203
|
+
When using AI tools to generate code, it can be beneficial to maintain transparency about authorship for accountability, code review, and auditing purposes. This can be done easily by using Git trailers that append structured metadata to the end of commit messages.
|
|
204
|
+
|
|
205
|
+
This can be done by appending one or more custom trailers in the commit message, such as:
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
Assistant-model: Claude Code
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Because most Git tooling expects `Co-authored-by` trailers to be formatted as email addresses, you should use a different trailer key to avoid confusion and to distinguish authorship from assistance.
|
|
212
|
+
|
|
213
|
+
Trailers can be added manually at the end of a commit message, or by using the `git commit` command with the `--trailer` option:
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
git commit --message "Implement feature" --trailer "Assistant-model: Claude Code"
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Trailers can be displayed using the [pretty formats](https://git-scm.com/docs/pretty-formats#Documentation/pretty-formats.txt-trailersoptions) option to `git log` command. For example, for a formatted history showing the hash, author name, and assistant models used for each commit:
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
git log --color --pretty=format:"%C(yellow)%h%C(reset) %C(blue)%an%C(reset) [%C(magenta)%(trailers:key=Assistant-model,valueonly=true,separator=%x2C)%C(reset)] %s%C(bold cyan)%d%C(reset)"
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
2100e6c Author [Claude Code] Test commit 4 (HEAD -> work-item-8)
|
|
227
|
+
7120221 Author [Claude Code] Test commit 3
|
|
228
|
+
ea03d91 Author [] Test commit 2
|
|
229
|
+
f93fd8e Author [Claude Code] Test commit 1
|
|
230
|
+
dde0159 Claude Code [] Test work item (#7) (origin/main, origin/HEAD)
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Important Notes
|
|
234
|
+
|
|
235
|
+
- By default, pre-commit checks (defined in `.pre-commit-config.yaml`) will run to ensure code quality
|
|
236
|
+
- IMPORTANT: DO NOT SKIP pre-commit checks
|
|
237
|
+
- ALWAYS attribute AI-Assisted Code Authorship
|
|
238
|
+
- If specific files are already staged, the command will only commit those files
|
|
239
|
+
- If no files are staged, it will automatically stage all modified and new files
|
|
240
|
+
- The commit message will be constructed based on the changes detected
|
|
241
|
+
- Before committing, the command will review the diff to identify if multiple commits would be more appropriate
|
|
242
|
+
- If suggesting multiple commits, it will help you stage and commit the changes separately
|
|
243
|
+
- Always reviews the commit diff to ensure the message matches the changes
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gh-create-pr
|
|
3
|
+
description: Commit unstaged changes, push changes, submit a pull request.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Create Pull Request
|
|
7
|
+
|
|
8
|
+
Commit changes, push to remote, and create a pull request with a conventional commit-style title and comprehensive description: $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
## Current Repository State
|
|
11
|
+
|
|
12
|
+
- Git status: !`git status --porcelain`
|
|
13
|
+
- Current branch: !`git branch --show-current`
|
|
14
|
+
- Default branch: !`git rev-parse --abbrev-ref origin/HEAD 2>/dev/null | sed 's|origin/||' || echo main`
|
|
15
|
+
- Staged changes: !`git diff --cached --stat`
|
|
16
|
+
- Unstaged changes: !`git diff --stat`
|
|
17
|
+
- Recent commits on this branch: !`git log --oneline -10`
|
|
18
|
+
- Existing PR for branch: !`gh pr view --json number,title,body 2>/dev/null || echo "No existing PR"`
|
|
19
|
+
|
|
20
|
+
## What This Command Does
|
|
21
|
+
|
|
22
|
+
1. **Stage and commit changes** using conventional commit format (follow the gh-commit skill conventions)
|
|
23
|
+
- If there are unstaged changes, stage and commit them with appropriate conventional commit messages
|
|
24
|
+
- If multiple distinct logical changes exist, create separate commits for each
|
|
25
|
+
- ALWAYS attribute AI-assisted code authorship in commits
|
|
26
|
+
2. **Push the branch** to the remote repository
|
|
27
|
+
- If the current branch is the default branch (main/master), create a new feature branch first
|
|
28
|
+
- Use `git push -u origin <branch>` to set upstream tracking
|
|
29
|
+
3. **Analyze all changes** in the branch relative to the base branch
|
|
30
|
+
- Run `git diff origin/<default-branch>...HEAD` to review the full scope of changes
|
|
31
|
+
- Read relevant modified files to understand the context and impact of changes
|
|
32
|
+
4. **Generate a PR title** following Conventional Commits format:
|
|
33
|
+
- Format: `<type>[optional scope]: <description>`
|
|
34
|
+
- Types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`
|
|
35
|
+
- Use `!` after type/scope for breaking changes: `feat(api)!: change response format`
|
|
36
|
+
- Keep the title concise (under 72 characters)
|
|
37
|
+
- For multi-commit PRs, synthesize a higher-level title that captures the overall theme
|
|
38
|
+
5. **Generate a PR description** with the structure defined in the PR Description Template below
|
|
39
|
+
6. **Create or update the pull request**
|
|
40
|
+
- If no PR exists for this branch: `gh pr create --title "TITLE" --body "DESCRIPTION"`
|
|
41
|
+
- If a PR already exists: `gh pr edit <number> --title "TITLE" --body "DESCRIPTION"`
|
|
42
|
+
|
|
43
|
+
## PR Title Examples
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
feat(auth): add JWT token refresh endpoint
|
|
47
|
+
fix(ui): resolve layout shift on mobile navigation
|
|
48
|
+
docs: update API reference for v2 endpoints
|
|
49
|
+
refactor(db): migrate from raw SQL to query builder
|
|
50
|
+
feat(api)!: change pagination response format
|
|
51
|
+
chore(deps): bump TypeScript to 5.x
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## PR Description Template
|
|
55
|
+
|
|
56
|
+
Use this structure for the PR body. Omit sections that are not applicable.
|
|
57
|
+
|
|
58
|
+
```markdown
|
|
59
|
+
## Summary
|
|
60
|
+
|
|
61
|
+
[1-2 sentence overview of what this PR does and why]
|
|
62
|
+
|
|
63
|
+
## Changes
|
|
64
|
+
|
|
65
|
+
- [Key change 1]
|
|
66
|
+
- [Key change 2]
|
|
67
|
+
- [Key change 3]
|
|
68
|
+
|
|
69
|
+
## Breaking Changes
|
|
70
|
+
|
|
71
|
+
[Describe what breaks and required migration steps]
|
|
72
|
+
|
|
73
|
+
## Notes
|
|
74
|
+
|
|
75
|
+
[Additional context, testing instructions, or deployment considerations]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Guidelines
|
|
79
|
+
|
|
80
|
+
- **Respect existing content**: If the PR title already follows conventional commit format, keep it unless it's inaccurate. If a PR already has a meaningful description, enhance it rather than replace it entirely.
|
|
81
|
+
- **Issue references**: If the branch name contains an issue number (e.g., `feat/123-add-auth`), reference it in the description with `Closes #123` or `Refs #123`.
|
|
82
|
+
- **Holistic analysis**: The PR title should capture the overall intent of the changes, not just list individual commits.
|
|
83
|
+
- **Single-commit PRs**: The PR title can mirror the commit message.
|
|
84
|
+
- **Multi-commit PRs**: Synthesize a higher-level title that captures the full scope.
|
|
85
|
+
- Use markdown formatting in the description for readability.
|
|
86
|
+
|
|
87
|
+
## Important Notes
|
|
88
|
+
|
|
89
|
+
- By default, pre-commit checks (defined in `.pre-commit-config.yaml`) will run to ensure code quality
|
|
90
|
+
- IMPORTANT: DO NOT SKIP pre-commit checks
|
|
91
|
+
- ALWAYS attribute AI-Assisted Code Authorship in commit messages
|
|
92
|
+
- Always review the diff before generating the title and description to ensure accuracy
|
|
93
|
+
- If `gh` CLI is not authenticated, prompt the user to run `gh auth login` first
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: harden
|
|
3
|
+
description: Improve interface resilience through better error handling, i18n support, text overflow handling, and edge case management. Makes interfaces robust and production-ready. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
argument-hint: "[target]"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs.
|
|
9
|
+
|
|
10
|
+
## Assess Hardening Needs
|
|
11
|
+
|
|
12
|
+
Identify weaknesses and edge cases:
|
|
13
|
+
|
|
14
|
+
1. **Test with extreme inputs**:
|
|
15
|
+
- Very long text (names, descriptions, titles)
|
|
16
|
+
- Very short text (empty, single character)
|
|
17
|
+
- Special characters (emoji, RTL text, accents)
|
|
18
|
+
- Large numbers (millions, billions)
|
|
19
|
+
- Many items (1000+ list items, 50+ options)
|
|
20
|
+
- No data (empty states)
|
|
21
|
+
|
|
22
|
+
2. **Test error scenarios**:
|
|
23
|
+
- Network failures (offline, slow, timeout)
|
|
24
|
+
- API errors (400, 401, 403, 404, 500)
|
|
25
|
+
- Validation errors
|
|
26
|
+
- Permission errors
|
|
27
|
+
- Rate limiting
|
|
28
|
+
- Concurrent operations
|
|
29
|
+
|
|
30
|
+
3. **Test internationalization**:
|
|
31
|
+
- Long translations (German is often 30% longer than English)
|
|
32
|
+
- RTL languages (Arabic, Hebrew)
|
|
33
|
+
- Character sets (Chinese, Japanese, Korean, emoji)
|
|
34
|
+
- Date/time formats
|
|
35
|
+
- Number formats (1,000 vs 1.000)
|
|
36
|
+
- Currency symbols
|
|
37
|
+
|
|
38
|
+
**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality.
|
|
39
|
+
|
|
40
|
+
## Hardening Dimensions
|
|
41
|
+
|
|
42
|
+
Systematically improve resilience:
|
|
43
|
+
|
|
44
|
+
### Text Overflow & Wrapping
|
|
45
|
+
|
|
46
|
+
**Long text handling**:
|
|
47
|
+
```css
|
|
48
|
+
/* Single line with ellipsis */
|
|
49
|
+
.truncate {
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
text-overflow: ellipsis;
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Multi-line with clamp */
|
|
56
|
+
.line-clamp {
|
|
57
|
+
display: -webkit-box;
|
|
58
|
+
-webkit-line-clamp: 3;
|
|
59
|
+
-webkit-box-orient: vertical;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Allow wrapping */
|
|
64
|
+
.wrap {
|
|
65
|
+
word-wrap: break-word;
|
|
66
|
+
overflow-wrap: break-word;
|
|
67
|
+
hyphens: auto;
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Flex/Grid overflow**:
|
|
72
|
+
```css
|
|
73
|
+
/* Prevent flex items from overflowing */
|
|
74
|
+
.flex-item {
|
|
75
|
+
min-width: 0; /* Allow shrinking below content size */
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Prevent grid items from overflowing */
|
|
80
|
+
.grid-item {
|
|
81
|
+
min-width: 0;
|
|
82
|
+
min-height: 0;
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Responsive text sizing**:
|
|
87
|
+
- Use `clamp()` for fluid typography
|
|
88
|
+
- Set minimum readable sizes (14px on mobile)
|
|
89
|
+
- Test text scaling (zoom to 200%)
|
|
90
|
+
- Ensure containers expand with text
|
|
91
|
+
|
|
92
|
+
### Internationalization (i18n)
|
|
93
|
+
|
|
94
|
+
**Text expansion**:
|
|
95
|
+
- Add 30-40% space budget for translations
|
|
96
|
+
- Use flexbox/grid that adapts to content
|
|
97
|
+
- Test with longest language (usually German)
|
|
98
|
+
- Avoid fixed widths on text containers
|
|
99
|
+
|
|
100
|
+
```jsx
|
|
101
|
+
// ❌ Bad: Assumes short English text
|
|
102
|
+
<button className="w-24">Submit</button>
|
|
103
|
+
|
|
104
|
+
// ✅ Good: Adapts to content
|
|
105
|
+
<button className="px-4 py-2">Submit</button>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**RTL (Right-to-Left) support**:
|
|
109
|
+
```css
|
|
110
|
+
/* Use logical properties */
|
|
111
|
+
margin-inline-start: 1rem; /* Not margin-left */
|
|
112
|
+
padding-inline: 1rem; /* Not padding-left/right */
|
|
113
|
+
border-inline-end: 1px solid; /* Not border-right */
|
|
114
|
+
|
|
115
|
+
/* Or use dir attribute */
|
|
116
|
+
[dir="rtl"] .arrow { transform: scaleX(-1); }
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Character set support**:
|
|
120
|
+
- Use UTF-8 encoding everywhere
|
|
121
|
+
- Test with Chinese/Japanese/Korean (CJK) characters
|
|
122
|
+
- Test with emoji (they can be 2-4 bytes)
|
|
123
|
+
- Handle different scripts (Latin, Cyrillic, Arabic, etc.)
|
|
124
|
+
|
|
125
|
+
**Date/Time formatting**:
|
|
126
|
+
```javascript
|
|
127
|
+
// ✅ Use Intl API for proper formatting
|
|
128
|
+
new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024
|
|
129
|
+
new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024
|
|
130
|
+
|
|
131
|
+
new Intl.NumberFormat('en-US', {
|
|
132
|
+
style: 'currency',
|
|
133
|
+
currency: 'USD'
|
|
134
|
+
}).format(1234.56); // $1,234.56
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Pluralization**:
|
|
138
|
+
```javascript
|
|
139
|
+
// ❌ Bad: Assumes English pluralization
|
|
140
|
+
`${count} item${count !== 1 ? 's' : ''}`
|
|
141
|
+
|
|
142
|
+
// ✅ Good: Use proper i18n library
|
|
143
|
+
t('items', { count }) // Handles complex plural rules
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Error Handling
|
|
147
|
+
|
|
148
|
+
**Network errors**:
|
|
149
|
+
- Show clear error messages
|
|
150
|
+
- Provide retry button
|
|
151
|
+
- Explain what happened
|
|
152
|
+
- Offer offline mode (if applicable)
|
|
153
|
+
- Handle timeout scenarios
|
|
154
|
+
|
|
155
|
+
```jsx
|
|
156
|
+
// Error states with recovery
|
|
157
|
+
{error && (
|
|
158
|
+
<ErrorMessage>
|
|
159
|
+
<p>Failed to load data. {error.message}</p>
|
|
160
|
+
<button onClick={retry}>Try again</button>
|
|
161
|
+
</ErrorMessage>
|
|
162
|
+
)}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Form validation errors**:
|
|
166
|
+
- Inline errors near fields
|
|
167
|
+
- Clear, specific messages
|
|
168
|
+
- Suggest corrections
|
|
169
|
+
- Don't block submission unnecessarily
|
|
170
|
+
- Preserve user input on error
|
|
171
|
+
|
|
172
|
+
**API errors**:
|
|
173
|
+
- Handle each status code appropriately
|
|
174
|
+
- 400: Show validation errors
|
|
175
|
+
- 401: Redirect to login
|
|
176
|
+
- 403: Show permission error
|
|
177
|
+
- 404: Show not found state
|
|
178
|
+
- 429: Show rate limit message
|
|
179
|
+
- 500: Show generic error, offer support
|
|
180
|
+
|
|
181
|
+
**Graceful degradation**:
|
|
182
|
+
- Core functionality works without JavaScript
|
|
183
|
+
- Images have alt text
|
|
184
|
+
- Progressive enhancement
|
|
185
|
+
- Fallbacks for unsupported features
|
|
186
|
+
|
|
187
|
+
### Edge Cases & Boundary Conditions
|
|
188
|
+
|
|
189
|
+
**Empty states**:
|
|
190
|
+
- No items in list
|
|
191
|
+
- No search results
|
|
192
|
+
- No notifications
|
|
193
|
+
- No data to display
|
|
194
|
+
- Provide clear next action
|
|
195
|
+
|
|
196
|
+
**Loading states**:
|
|
197
|
+
- Initial load
|
|
198
|
+
- Pagination load
|
|
199
|
+
- Refresh
|
|
200
|
+
- Show what's loading ("Loading your projects...")
|
|
201
|
+
- Time estimates for long operations
|
|
202
|
+
|
|
203
|
+
**Large datasets**:
|
|
204
|
+
- Pagination or virtual scrolling
|
|
205
|
+
- Search/filter capabilities
|
|
206
|
+
- Performance optimization
|
|
207
|
+
- Don't load all 10,000 items at once
|
|
208
|
+
|
|
209
|
+
**Concurrent operations**:
|
|
210
|
+
- Prevent double-submission (disable button while loading)
|
|
211
|
+
- Handle race conditions
|
|
212
|
+
- Optimistic updates with rollback
|
|
213
|
+
- Conflict resolution
|
|
214
|
+
|
|
215
|
+
**Permission states**:
|
|
216
|
+
- No permission to view
|
|
217
|
+
- No permission to edit
|
|
218
|
+
- Read-only mode
|
|
219
|
+
- Clear explanation of why
|
|
220
|
+
|
|
221
|
+
**Browser compatibility**:
|
|
222
|
+
- Polyfills for modern features
|
|
223
|
+
- Fallbacks for unsupported CSS
|
|
224
|
+
- Feature detection (not browser detection)
|
|
225
|
+
- Test in target browsers
|
|
226
|
+
|
|
227
|
+
### Input Validation & Sanitization
|
|
228
|
+
|
|
229
|
+
**Client-side validation**:
|
|
230
|
+
- Required fields
|
|
231
|
+
- Format validation (email, phone, URL)
|
|
232
|
+
- Length limits
|
|
233
|
+
- Pattern matching
|
|
234
|
+
- Custom validation rules
|
|
235
|
+
|
|
236
|
+
**Server-side validation** (always):
|
|
237
|
+
- Never trust client-side only
|
|
238
|
+
- Validate and sanitize all inputs
|
|
239
|
+
- Protect against injection attacks
|
|
240
|
+
- Rate limiting
|
|
241
|
+
|
|
242
|
+
**Constraint handling**:
|
|
243
|
+
```html
|
|
244
|
+
<!-- Set clear constraints -->
|
|
245
|
+
<input
|
|
246
|
+
type="text"
|
|
247
|
+
maxlength="100"
|
|
248
|
+
pattern="[A-Za-z0-9]+"
|
|
249
|
+
required
|
|
250
|
+
aria-describedby="username-hint"
|
|
251
|
+
/>
|
|
252
|
+
<small id="username-hint">
|
|
253
|
+
Letters and numbers only, up to 100 characters
|
|
254
|
+
</small>
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Accessibility Resilience
|
|
258
|
+
|
|
259
|
+
**Keyboard navigation**:
|
|
260
|
+
- All functionality accessible via keyboard
|
|
261
|
+
- Logical tab order
|
|
262
|
+
- Focus management in modals
|
|
263
|
+
- Skip links for long content
|
|
264
|
+
|
|
265
|
+
**Screen reader support**:
|
|
266
|
+
- Proper ARIA labels
|
|
267
|
+
- Announce dynamic changes (live regions)
|
|
268
|
+
- Descriptive alt text
|
|
269
|
+
- Semantic HTML
|
|
270
|
+
|
|
271
|
+
**Motion sensitivity**:
|
|
272
|
+
```css
|
|
273
|
+
@media (prefers-reduced-motion: reduce) {
|
|
274
|
+
* {
|
|
275
|
+
animation-duration: 0.01ms !important;
|
|
276
|
+
animation-iteration-count: 1 !important;
|
|
277
|
+
transition-duration: 0.01ms !important;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**High contrast mode**:
|
|
283
|
+
- Test in Windows high contrast mode
|
|
284
|
+
- Don't rely only on color
|
|
285
|
+
- Provide alternative visual cues
|
|
286
|
+
|
|
287
|
+
### Performance Resilience
|
|
288
|
+
|
|
289
|
+
**Slow connections**:
|
|
290
|
+
- Progressive image loading
|
|
291
|
+
- Skeleton screens
|
|
292
|
+
- Optimistic UI updates
|
|
293
|
+
- Offline support (service workers)
|
|
294
|
+
|
|
295
|
+
**Memory leaks**:
|
|
296
|
+
- Clean up event listeners
|
|
297
|
+
- Cancel subscriptions
|
|
298
|
+
- Clear timers/intervals
|
|
299
|
+
- Abort pending requests on unmount
|
|
300
|
+
|
|
301
|
+
**Throttling & Debouncing**:
|
|
302
|
+
```javascript
|
|
303
|
+
// Debounce search input
|
|
304
|
+
const debouncedSearch = debounce(handleSearch, 300);
|
|
305
|
+
|
|
306
|
+
// Throttle scroll handler
|
|
307
|
+
const throttledScroll = throttle(handleScroll, 100);
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## Testing Strategies
|
|
311
|
+
|
|
312
|
+
**Manual testing**:
|
|
313
|
+
- Test with extreme data (very long, very short, empty)
|
|
314
|
+
- Test in different languages
|
|
315
|
+
- Test offline
|
|
316
|
+
- Test slow connection (throttle to 3G)
|
|
317
|
+
- Test with screen reader
|
|
318
|
+
- Test keyboard-only navigation
|
|
319
|
+
- Test on old browsers
|
|
320
|
+
|
|
321
|
+
**Automated testing**:
|
|
322
|
+
- Unit tests for edge cases
|
|
323
|
+
- Integration tests for error scenarios
|
|
324
|
+
- E2E tests for critical paths
|
|
325
|
+
- Visual regression tests
|
|
326
|
+
- Accessibility tests (axe, WAVE)
|
|
327
|
+
|
|
328
|
+
**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined.
|
|
329
|
+
|
|
330
|
+
**NEVER**:
|
|
331
|
+
- Assume perfect input (validate everything)
|
|
332
|
+
- Ignore internationalization (design for global)
|
|
333
|
+
- Leave error messages generic ("Error occurred")
|
|
334
|
+
- Forget offline scenarios
|
|
335
|
+
- Trust client-side validation alone
|
|
336
|
+
- Use fixed widths for text
|
|
337
|
+
- Assume English-length text
|
|
338
|
+
- Block entire interface when one component errors
|
|
339
|
+
|
|
340
|
+
## Verify Hardening
|
|
341
|
+
|
|
342
|
+
Test thoroughly with edge cases:
|
|
343
|
+
|
|
344
|
+
- **Long text**: Try names with 100+ characters
|
|
345
|
+
- **Emoji**: Use emoji in all text fields
|
|
346
|
+
- **RTL**: Test with Arabic or Hebrew
|
|
347
|
+
- **CJK**: Test with Chinese/Japanese/Korean
|
|
348
|
+
- **Network issues**: Disable internet, throttle connection
|
|
349
|
+
- **Large datasets**: Test with 1000+ items
|
|
350
|
+
- **Concurrent actions**: Click submit 10 times rapidly
|
|
351
|
+
- **Errors**: Force API errors, test all error states
|
|
352
|
+
- **Empty**: Remove all data, test empty states
|
|
353
|
+
|
|
354
|
+
Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component.
|