@agentskillkit/agent-skills 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/.shared/ui-ux-pro-max/data/charts.csv +26 -0
- package/.agent/.shared/ui-ux-pro-max/data/colors.csv +97 -0
- package/.agent/.shared/ui-ux-pro-max/data/icons.csv +101 -0
- package/.agent/.shared/ui-ux-pro-max/data/landing.csv +31 -0
- package/.agent/.shared/ui-ux-pro-max/data/products.csv +97 -0
- package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
- package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.agent/.shared/ui-ux-pro-max/data/styles.csv +59 -0
- package/.agent/.shared/ui-ux-pro-max/data/typography.csv +58 -0
- package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/core.py +258 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/search.py +106 -0
- package/.agent/ARCHITECTURE.md +292 -0
- package/.agent/GEMINI.md +374 -0
- package/.agent/agents/backend-specialist.md +263 -0
- package/.agent/agents/code-archaeologist.md +106 -0
- package/.agent/agents/database-architect.md +226 -0
- package/.agent/agents/debugger.md +225 -0
- package/.agent/agents/devops-engineer.md +242 -0
- package/.agent/agents/documentation-writer.md +104 -0
- package/.agent/agents/explorer-agent.md +73 -0
- package/.agent/agents/frontend-specialist.md +556 -0
- package/.agent/agents/game-developer.md +162 -0
- package/.agent/agents/mobile-developer.md +377 -0
- package/.agent/agents/orchestrator.md +416 -0
- package/.agent/agents/penetration-tester.md +188 -0
- package/.agent/agents/performance-optimizer.md +187 -0
- package/.agent/agents/product-manager.md +112 -0
- package/.agent/agents/product-owner.md +95 -0
- package/.agent/agents/project-planner.md +406 -0
- package/.agent/agents/qa-automation-engineer.md +103 -0
- package/.agent/agents/security-auditor.md +170 -0
- package/.agent/agents/seo-specialist.md +111 -0
- package/.agent/agents/test-engineer.md +158 -0
- package/.agent/knowledge/lessons-learned.yaml +17 -0
- package/.agent/rules/GEMINI.md +253 -0
- package/.agent/scripts/auto_preview.py +148 -0
- package/.agent/scripts/checklist.py +217 -0
- package/.agent/scripts/session_manager.py +120 -0
- package/.agent/scripts/verify_all.py +327 -0
- package/.agent/skills/aesthetic/SKILL.md +121 -0
- package/.agent/skills/aesthetic/assets/design-guideline-template.md +163 -0
- package/.agent/skills/aesthetic/assets/design-story-template.md +135 -0
- package/.agent/skills/aesthetic/references/design-principles.md +62 -0
- package/.agent/skills/aesthetic/references/design-resources.md +75 -0
- package/.agent/skills/aesthetic/references/micro-interactions.md +53 -0
- package/.agent/skills/aesthetic/references/storytelling-design.md +50 -0
- package/.agent/skills/api-patterns/SKILL.md +81 -0
- package/.agent/skills/api-patterns/rules/api-style.md +42 -0
- package/.agent/skills/api-patterns/rules/auth.md +24 -0
- package/.agent/skills/api-patterns/rules/documentation.md +26 -0
- package/.agent/skills/api-patterns/rules/graphql.md +41 -0
- package/.agent/skills/api-patterns/rules/rate-limiting.md +31 -0
- package/.agent/skills/api-patterns/rules/response.md +37 -0
- package/.agent/skills/api-patterns/rules/rest.md +40 -0
- package/.agent/skills/api-patterns/rules/security-testing.md +122 -0
- package/.agent/skills/api-patterns/rules/trpc.md +41 -0
- package/.agent/skills/api-patterns/rules/versioning.md +22 -0
- package/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
- package/.agent/skills/app-builder/SKILL.md +75 -0
- package/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/.agent/skills/app-builder/feature-building.md +53 -0
- package/.agent/skills/app-builder/project-detection.md +34 -0
- package/.agent/skills/app-builder/scaffolding.md +118 -0
- package/.agent/skills/app-builder/tech-stack.md +40 -0
- package/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/.agent/skills/architecture/SKILL.md +55 -0
- package/.agent/skills/architecture/context-discovery.md +43 -0
- package/.agent/skills/architecture/examples.md +94 -0
- package/.agent/skills/architecture/pattern-selection.md +68 -0
- package/.agent/skills/architecture/patterns-reference.md +50 -0
- package/.agent/skills/architecture/trade-off-analysis.md +77 -0
- package/.agent/skills/bash-linux/SKILL.md +199 -0
- package/.agent/skills/behavioral-modes/SKILL.md +242 -0
- package/.agent/skills/brainstorming/SKILL.md +163 -0
- package/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
- package/.agent/skills/clean-code/SKILL.md +201 -0
- package/.agent/skills/code-review-checklist/SKILL.md +109 -0
- package/.agent/skills/code-reviewer/.skill-source.json +8 -0
- package/.agent/skills/code-reviewer/SKILL.md +32 -0
- package/.agent/skills/code-reviewer/enforcement/checklists/backend-api-review-checklist.md +5 -0
- package/.agent/skills/code-reviewer/examples/approved-pr/review-output.md +76 -0
- package/.agent/skills/code-reviewer/examples/rejected-pr/review-output.md +99 -0
- package/.agent/skills/code-reviewer/examples/scenarios.md +3 -0
- package/.agent/skills/code-reviewer/metadata/doctrine-mapping.yaml +167 -0
- package/.agent/skills/code-reviewer/metadata/intent-triggers.yaml +41 -0
- package/.agent/skills/code-reviewer/resources/links.md +59 -0
- package/.agent/skills/code-reviewer/scripts/audit_pr.js +8 -0
- package/.agent/skills/code-reviewer/scripts/audit_pr.v2.js +417 -0
- package/.agent/skills/code-reviewer/scripts/validate_doctrine.js +307 -0
- package/.agent/skills/context-engineering/SKILL.md +86 -0
- package/.agent/skills/context-engineering/references/context-compression.md +84 -0
- package/.agent/skills/context-engineering/references/context-degradation.md +93 -0
- package/.agent/skills/context-engineering/references/context-fundamentals.md +75 -0
- package/.agent/skills/context-engineering/references/context-optimization.md +82 -0
- package/.agent/skills/context-engineering/references/evaluation.md +89 -0
- package/.agent/skills/context-engineering/references/memory-systems.md +88 -0
- package/.agent/skills/context-engineering/references/multi-agent-patterns.md +90 -0
- package/.agent/skills/context-engineering/references/project-development.md +97 -0
- package/.agent/skills/context-engineering/references/tool-design.md +86 -0
- package/.agent/skills/context-engineering/scripts/compression_evaluator.py +329 -0
- package/.agent/skills/context-engineering/scripts/context_analyzer.py +294 -0
- package/.agent/skills/database-design/SKILL.md +52 -0
- package/.agent/skills/database-design/database-selection.md +43 -0
- package/.agent/skills/database-design/indexing.md +39 -0
- package/.agent/skills/database-design/migrations.md +48 -0
- package/.agent/skills/database-design/optimization.md +36 -0
- package/.agent/skills/database-design/orm-selection.md +30 -0
- package/.agent/skills/database-design/schema-design.md +56 -0
- package/.agent/skills/database-design/scripts/schema_validator.py +172 -0
- package/.agent/skills/debugging/SKILL.md +42 -0
- package/.agent/skills/debugging/defense-in-depth/SKILL.md +130 -0
- package/.agent/skills/debugging/root-cause-tracing/SKILL.md +177 -0
- package/.agent/skills/debugging/root-cause-tracing/find-polluter.sh +63 -0
- package/.agent/skills/debugging/verification-before-completion/SKILL.md +142 -0
- package/.agent/skills/deployment-procedures/SKILL.md +241 -0
- package/.agent/skills/doc.md +177 -0
- package/.agent/skills/document-skills/SKILL.md +49 -0
- package/.agent/skills/document-skills/docx/LICENSE.txt +30 -0
- package/.agent/skills/document-skills/docx/SKILL.md +197 -0
- package/.agent/skills/document-skills/docx/docx-js.md +350 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/mce/mc.xsd +75 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.agent/skills/document-skills/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.agent/skills/document-skills/docx/ooxml/scripts/pack.py +159 -0
- package/.agent/skills/document-skills/docx/ooxml/scripts/unpack.py +29 -0
- package/.agent/skills/document-skills/docx/ooxml/scripts/validate.py +69 -0
- package/.agent/skills/document-skills/docx/ooxml/scripts/validation/__init__.py +15 -0
- package/.agent/skills/document-skills/docx/ooxml/scripts/validation/base.py +951 -0
- package/.agent/skills/document-skills/docx/ooxml/scripts/validation/docx.py +274 -0
- package/.agent/skills/document-skills/docx/ooxml/scripts/validation/pptx.py +315 -0
- package/.agent/skills/document-skills/docx/ooxml/scripts/validation/redlining.py +279 -0
- package/.agent/skills/document-skills/docx/ooxml.md +610 -0
- package/.agent/skills/document-skills/docx/scripts/__init__.py +1 -0
- package/.agent/skills/document-skills/docx/scripts/document.py +1276 -0
- package/.agent/skills/document-skills/docx/scripts/templates/comments.xml +3 -0
- package/.agent/skills/document-skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/.agent/skills/document-skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/.agent/skills/document-skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/.agent/skills/document-skills/docx/scripts/templates/people.xml +3 -0
- package/.agent/skills/document-skills/docx/scripts/utilities.py +374 -0
- package/.agent/skills/document-skills/pdf/LICENSE.txt +30 -0
- package/.agent/skills/document-skills/pdf/SKILL.md +294 -0
- package/.agent/skills/document-skills/pdf/forms.md +205 -0
- package/.agent/skills/document-skills/pdf/reference.md +612 -0
- package/.agent/skills/document-skills/pdf/scripts/check_bounding_boxes.py +70 -0
- package/.agent/skills/document-skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/.agent/skills/document-skills/pdf/scripts/check_fillable_fields.py +12 -0
- package/.agent/skills/document-skills/pdf/scripts/convert_pdf_to_images.py +35 -0
- package/.agent/skills/document-skills/pdf/scripts/create_validation_image.py +41 -0
- package/.agent/skills/document-skills/pdf/scripts/extract_form_field_info.py +152 -0
- package/.agent/skills/document-skills/pdf/scripts/fill_fillable_fields.py +114 -0
- package/.agent/skills/document-skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/.agent/skills/document-skills/pptx/LICENSE.txt +30 -0
- package/.agent/skills/document-skills/pptx/SKILL.md +484 -0
- package/.agent/skills/document-skills/pptx/html2pptx.md +625 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.agent/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.agent/skills/document-skills/pptx/ooxml/scripts/pack.py +159 -0
- package/.agent/skills/document-skills/pptx/ooxml/scripts/unpack.py +29 -0
- package/.agent/skills/document-skills/pptx/ooxml/scripts/validate.py +69 -0
- package/.agent/skills/document-skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/.agent/skills/document-skills/pptx/ooxml/scripts/validation/base.py +951 -0
- package/.agent/skills/document-skills/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/.agent/skills/document-skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/.agent/skills/document-skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/.agent/skills/document-skills/pptx/ooxml.md +427 -0
- package/.agent/skills/document-skills/pptx/scripts/html2pptx.js +979 -0
- package/.agent/skills/document-skills/pptx/scripts/inventory.py +1020 -0
- package/.agent/skills/document-skills/pptx/scripts/rearrange.py +231 -0
- package/.agent/skills/document-skills/pptx/scripts/replace.py +385 -0
- package/.agent/skills/document-skills/pptx/scripts/thumbnail.py +450 -0
- package/.agent/skills/document-skills/xlsx/LICENSE.txt +30 -0
- package/.agent/skills/document-skills/xlsx/SKILL.md +289 -0
- package/.agent/skills/document-skills/xlsx/recalc.py +178 -0
- package/.agent/skills/documentation-templates/SKILL.md +194 -0
- package/.agent/skills/frontend/SKILL.md +38 -0
- package/.agent/skills/frontend/rules/_sections.md +46 -0
- package/.agent/skills/frontend/rules/_template.md +28 -0
- package/.agent/skills/frontend/rules/advanced-event-handler-refs.md +55 -0
- package/.agent/skills/frontend/rules/advanced-init-once.md +42 -0
- package/.agent/skills/frontend/rules/advanced-use-latest.md +39 -0
- package/.agent/skills/frontend/rules/async-api-routes.md +38 -0
- package/.agent/skills/frontend/rules/async-defer-await.md +80 -0
- package/.agent/skills/frontend/rules/async-dependencies.md +51 -0
- package/.agent/skills/frontend/rules/async-parallel.md +28 -0
- package/.agent/skills/frontend/rules/async-suspense-boundaries.md +99 -0
- package/.agent/skills/frontend/rules/bundle-barrel-imports.md +59 -0
- package/.agent/skills/frontend/rules/bundle-conditional.md +31 -0
- package/.agent/skills/frontend/rules/bundle-defer-third-party.md +49 -0
- package/.agent/skills/frontend/rules/bundle-dynamic-imports.md +35 -0
- package/.agent/skills/frontend/rules/bundle-preload.md +50 -0
- package/.agent/skills/frontend/rules/client-event-listeners.md +74 -0
- package/.agent/skills/frontend/rules/client-localstorage-schema.md +71 -0
- package/.agent/skills/frontend/rules/client-passive-event-listeners.md +48 -0
- package/.agent/skills/frontend/rules/client-swr-dedup.md +56 -0
- package/.agent/skills/frontend/rules/js-batch-dom-css.md +107 -0
- package/.agent/skills/frontend/rules/js-cache-function-results.md +80 -0
- package/.agent/skills/frontend/rules/js-cache-property-access.md +28 -0
- package/.agent/skills/frontend/rules/js-cache-storage.md +70 -0
- package/.agent/skills/frontend/rules/js-combine-iterations.md +32 -0
- package/.agent/skills/frontend/rules/js-early-exit.md +50 -0
- package/.agent/skills/frontend/rules/js-hoist-regexp.md +45 -0
- package/.agent/skills/frontend/rules/js-index-maps.md +37 -0
- package/.agent/skills/frontend/rules/js-length-check-first.md +49 -0
- package/.agent/skills/frontend/rules/js-min-max-loop.md +82 -0
- package/.agent/skills/frontend/rules/js-set-map-lookups.md +24 -0
- package/.agent/skills/frontend/rules/js-tosorted-immutable.md +57 -0
- package/.agent/skills/frontend/rules/rendering-activity.md +26 -0
- package/.agent/skills/frontend/rules/rendering-animate-svg-wrapper.md +47 -0
- package/.agent/skills/frontend/rules/rendering-conditional-render.md +40 -0
- package/.agent/skills/frontend/rules/rendering-content-visibility.md +38 -0
- package/.agent/skills/frontend/rules/rendering-hoist-jsx.md +46 -0
- package/.agent/skills/frontend/rules/rendering-hydration-no-flicker.md +82 -0
- package/.agent/skills/frontend/rules/rendering-hydration-suppress-warning.md +30 -0
- package/.agent/skills/frontend/rules/rendering-svg-precision.md +28 -0
- package/.agent/skills/frontend/rules/rendering-usetransition-loading.md +75 -0
- package/.agent/skills/frontend/rules/rerender-defer-reads.md +39 -0
- package/.agent/skills/frontend/rules/rerender-dependencies.md +45 -0
- package/.agent/skills/frontend/rules/rerender-derived-state-no-effect.md +40 -0
- package/.agent/skills/frontend/rules/rerender-derived-state.md +29 -0
- package/.agent/skills/frontend/rules/rerender-functional-setstate.md +74 -0
- package/.agent/skills/frontend/rules/rerender-lazy-state-init.md +58 -0
- package/.agent/skills/frontend/rules/rerender-memo-with-default-value.md +38 -0
- package/.agent/skills/frontend/rules/rerender-memo.md +44 -0
- package/.agent/skills/frontend/rules/rerender-move-effect-to-event.md +45 -0
- package/.agent/skills/frontend/rules/rerender-simple-expression-in-memo.md +35 -0
- package/.agent/skills/frontend/rules/rerender-transitions.md +40 -0
- package/.agent/skills/frontend/rules/rerender-use-ref-transient-values.md +73 -0
- package/.agent/skills/frontend/rules/schema.json +34 -0
- package/.agent/skills/frontend/rules/server-after-nonblocking.md +73 -0
- package/.agent/skills/frontend/rules/server-auth-actions.md +96 -0
- package/.agent/skills/frontend/rules/server-cache-lru.md +41 -0
- package/.agent/skills/frontend/rules/server-cache-react.md +76 -0
- package/.agent/skills/frontend/rules/server-dedup-props.md +65 -0
- package/.agent/skills/frontend/rules/server-parallel-fetching.md +83 -0
- package/.agent/skills/frontend/rules/server-serialization.md +38 -0
- package/.agent/skills/frontend-design/SKILL.md +33 -0
- package/.agent/skills/frontend-design/rules/animation-guide.md +331 -0
- package/.agent/skills/frontend-design/rules/color-system.md +311 -0
- package/.agent/skills/frontend-design/rules/decision-trees.md +418 -0
- package/.agent/skills/frontend-design/rules/motion-graphics.md +306 -0
- package/.agent/skills/frontend-design/rules/typography-system.md +345 -0
- package/.agent/skills/frontend-design/rules/ux-psychology.md +541 -0
- package/.agent/skills/frontend-design/rules/visual-effects.md +383 -0
- package/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/.agent/skills/game-development/2d-games/SKILL.md +119 -0
- package/.agent/skills/game-development/3d-games/SKILL.md +135 -0
- package/.agent/skills/game-development/SKILL.md +167 -0
- package/.agent/skills/game-development/game-art/SKILL.md +185 -0
- package/.agent/skills/game-development/game-audio/SKILL.md +190 -0
- package/.agent/skills/game-development/game-design/SKILL.md +129 -0
- package/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
- package/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
- package/.agent/skills/game-development/pc-games/SKILL.md +144 -0
- package/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
- package/.agent/skills/game-development/web-games/SKILL.md +150 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +156 -0
- package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/.agent/skills/git-conventions/.skill-source.json +8 -0
- package/.agent/skills/git-conventions/SKILL.md +28 -0
- package/.agent/skills/git-conventions/enforcement/commit-validation-rules.md +55 -0
- package/.agent/skills/git-conventions/examples/bad-commits.md +201 -0
- package/.agent/skills/git-conventions/examples/good-commits.md +135 -0
- package/.agent/skills/git-conventions/metadata/commit-config.yaml +79 -0
- package/.agent/skills/git-conventions/metadata/intent-triggers.yaml +25 -0
- package/.agent/skills/git-conventions/metadata/scope-mapping.yaml +83 -0
- package/.agent/skills/git-conventions/resources/BEST_PRACTICES.md +121 -0
- package/.agent/skills/git-conventions/resources/references.md +53 -0
- package/.agent/skills/git-conventions/scripts/format-commit.js +393 -0
- package/.agent/skills/git-conventions/scripts/validate-commit-msg.sh +27 -0
- package/.agent/skills/governance/.skill-source.json +8 -0
- package/.agent/skills/governance/CHANGELOG.md +222 -0
- package/.agent/skills/governance/README.md +250 -0
- package/.agent/skills/governance/SKILL.md +199 -0
- package/.agent/skills/governance/VERSION +4 -0
- package/.agent/skills/governance/examples/violation-backend-mutation/after.tsx +59 -0
- package/.agent/skills/governance/examples/violation-backend-mutation/before.tsx +42 -0
- package/.agent/skills/governance/examples/violation-backend-mutation/explanation.md +87 -0
- package/.agent/skills/governance/examples/violation-chart-injection/after.tsx +99 -0
- package/.agent/skills/governance/examples/violation-chart-injection/before.tsx +57 -0
- package/.agent/skills/governance/examples/violation-chart-injection/explanation.md +116 -0
- package/.agent/skills/governance/knowledge/lessons-learned.yaml +3 -0
- package/.agent/skills/governance/metadata/precedence.yaml +117 -0
- package/.agent/skills/governance/metadata/scope-map.yaml +156 -0
- package/.agent/skills/governance/proposals/v1.1-change-proposal-template.md +197 -0
- package/.agent/skills/governance/resources/AUTHORITY_MODEL.md +111 -0
- package/.agent/skills/governance/resources/ENFORCEMENT_GUIDE.md +242 -0
- package/.agent/skills/governance/resources/LOAD_ORDER.md +82 -0
- package/.agent/skills/governance/rules/constitution/coinpika-master-constitution.md +206 -0
- package/.agent/skills/governance/rules/doctrines/architecture/coinpika-architecture-doctrine.md +184 -0
- package/.agent/skills/governance/rules/doctrines/backend/coinpika-backend-data-engine-doctrine.md +214 -0
- package/.agent/skills/governance/rules/doctrines/commercial/coinpika-commercial-guardrails-doctrine.md +192 -0
- package/.agent/skills/governance/rules/doctrines/data/coinpika-chart-data-doctrine.md +198 -0
- package/.agent/skills/governance/rules/doctrines/frontend/coinpika-frontend-mobile-doctrine.md +165 -0
- package/.agent/skills/governance/rules/doctrines/frontend/coinpika-swipe-tabs-doctrine.md +172 -0
- package/.agent/skills/governance/rules/doctrines/learning/coinpika-learning-engine-doctrine.md +188 -0
- package/.agent/skills/governance/rules/doctrines/performance/coinpika-performance-doctrine.md +176 -0
- package/.agent/skills/governance/rules/doctrines/review/coinpika-code-review-doctrine.md +170 -0
- package/.agent/skills/governance/rules/enforcement/agents/coinpika-agent-enforcement-protocol.md +214 -0
- package/.agent/skills/governance/rules/enforcement/agents/coinpika-agent-system-prompt.md +192 -0
- package/.agent/skills/governance/rules/enforcement/checklists/backend-api-review-checklist.md +127 -0
- package/.agent/skills/governance/rules/enforcement/checklists/chart-component-review-checklist.md +143 -0
- package/.agent/skills/governance/rules/enforcement/checklists/coinpika-frontend-gesture-review-checklist.md +190 -0
- package/.agent/skills/governance/rules/enforcement/playbooks/doctrine-violation-playbook.md +232 -0
- package/.agent/skills/governance/scripts/audit_pr.js +218 -0
- package/.agent/skills/governance/scripts/learn.js +161 -0
- package/.agent/skills/governance/scripts/validate_doctrine.js +286 -0
- package/.agent/skills/i18n-localization/SKILL.md +154 -0
- package/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/.agent/skills/intelligent-routing/SKILL.md +335 -0
- package/.agent/skills/lint-and-validate/SKILL.md +45 -0
- package/.agent/skills/lint-and-validate/scripts/lint_runner.py +172 -0
- package/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/.agent/skills/mcp-builder/SKILL.md +176 -0
- package/.agent/skills/mermaidjs-v11/SKILL.md +115 -0
- package/.agent/skills/mermaidjs-v11/references/cli-usage.md +228 -0
- package/.agent/skills/mermaidjs-v11/references/configuration.md +232 -0
- package/.agent/skills/mermaidjs-v11/references/diagram-types.md +315 -0
- package/.agent/skills/mermaidjs-v11/references/examples.md +344 -0
- package/.agent/skills/mermaidjs-v11/references/integration.md +310 -0
- package/.agent/skills/mobile-design/SKILL.md +76 -0
- package/.agent/skills/mobile-design/references/anti-patterns.md +46 -0
- package/.agent/skills/mobile-design/references/decision-trees.md +516 -0
- package/.agent/skills/mobile-design/references/mobile-backend.md +491 -0
- package/.agent/skills/mobile-design/references/mobile-color-system.md +420 -0
- package/.agent/skills/mobile-design/references/mobile-debugging.md +122 -0
- package/.agent/skills/mobile-design/references/mobile-design-thinking.md +357 -0
- package/.agent/skills/mobile-design/references/mobile-navigation.md +458 -0
- package/.agent/skills/mobile-design/references/mobile-performance.md +767 -0
- package/.agent/skills/mobile-design/references/mobile-testing.md +356 -0
- package/.agent/skills/mobile-design/references/mobile-typography.md +433 -0
- package/.agent/skills/mobile-design/references/platform-android.md +666 -0
- package/.agent/skills/mobile-design/references/platform-ios.md +561 -0
- package/.agent/skills/mobile-design/references/touch-psychology.md +537 -0
- package/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/.agent/skills/nextjs-best-practices/SKILL.md +203 -0
- package/.agent/skills/nodejs-best-practices/SKILL.md +76 -0
- package/.agent/skills/nodejs-best-practices/references/architecture-patterns.md +34 -0
- package/.agent/skills/nodejs-best-practices/references/async-patterns.md +32 -0
- package/.agent/skills/nodejs-best-practices/references/error-handling.md +39 -0
- package/.agent/skills/nodejs-best-practices/references/framework-selection.md +39 -0
- package/.agent/skills/nodejs-best-practices/references/runtime-modules.md +33 -0
- package/.agent/skills/nodejs-best-practices/references/testing-strategy.md +25 -0
- package/.agent/skills/nodejs-best-practices/references/validation-security.md +45 -0
- package/.agent/skills/parallel-agents/SKILL.md +175 -0
- package/.agent/skills/performance-profiling/SKILL.md +143 -0
- package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/.agent/skills/plan-writing/SKILL.md +152 -0
- package/.agent/skills/powershell-windows/SKILL.md +167 -0
- package/.agent/skills/problem-solving/ABOUT.md +40 -0
- package/.agent/skills/problem-solving/SKILL.md +69 -0
- package/.agent/skills/problem-solving/collision-zone-thinking/SKILL.md +62 -0
- package/.agent/skills/problem-solving/inversion-exercise/SKILL.md +58 -0
- package/.agent/skills/problem-solving/meta-pattern-recognition/SKILL.md +54 -0
- package/.agent/skills/problem-solving/scale-game/SKILL.md +63 -0
- package/.agent/skills/problem-solving/simplification-cascades/SKILL.md +76 -0
- package/.agent/skills/problem-solving/when-stuck/SKILL.md +88 -0
- package/.agent/skills/python-patterns/SKILL.md +80 -0
- package/.agent/skills/python-patterns/references/async-patterns.md +57 -0
- package/.agent/skills/python-patterns/references/django-patterns.md +41 -0
- package/.agent/skills/python-patterns/references/fastapi-patterns.md +54 -0
- package/.agent/skills/python-patterns/references/framework-selection.md +39 -0
- package/.agent/skills/python-patterns/references/project-structure.md +80 -0
- package/.agent/skills/python-patterns/references/testing-patterns.md +34 -0
- package/.agent/skills/python-patterns/references/type-hints.md +51 -0
- package/.agent/skills/react-patterns/SKILL.md +198 -0
- package/.agent/skills/red-team-tactics/SKILL.md +199 -0
- package/.agent/skills/registry.json +367 -0
- package/.agent/skills/seo-fundamentals/SKILL.md +129 -0
- package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/.agent/skills/sequential-thinking/README.md +118 -0
- package/.agent/skills/sequential-thinking/SKILL.md +93 -0
- package/.agent/skills/sequential-thinking/references/advanced.md +122 -0
- package/.agent/skills/sequential-thinking/references/examples.md +274 -0
- package/.agent/skills/server-management/SKILL.md +161 -0
- package/.agent/skills/skill-creator/LICENSE.txt +202 -0
- package/.agent/skills/skill-creator/SKILL.md +237 -0
- package/.agent/skills/skill-creator/scripts/init_skill.py +303 -0
- package/.agent/skills/skill-creator/scripts/package_skill.py +110 -0
- package/.agent/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/.agent/skills/systematic-debugging/SKILL.md +109 -0
- package/.agent/skills/tailwind-patterns/SKILL.md +269 -0
- package/.agent/skills/tdd-workflow/SKILL.md +149 -0
- package/.agent/skills/testing-patterns/SKILL.md +178 -0
- package/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
- package/.agent/skills/vulnerability-scanner/checklists.md +121 -0
- package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/.agent/skills/webapp-testing/SKILL.md +187 -0
- package/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/.agent/workflows/architect.md +200 -0
- package/.agent/workflows/autopilot.md +254 -0
- package/.agent/workflows/boost.md +163 -0
- package/.agent/workflows/build.md +192 -0
- package/.agent/workflows/chronicle.md +172 -0
- package/.agent/workflows/diagnose.md +207 -0
- package/.agent/workflows/forge.md +123 -0
- package/.agent/workflows/inspect.md +187 -0
- package/.agent/workflows/launch.md +208 -0
- package/.agent/workflows/pulse.md +115 -0
- package/.agent/workflows/stage.md +117 -0
- package/.agent/workflows/studio.md +319 -0
- package/.agent/workflows/think.md +173 -0
- package/.agent/workflows/validate.md +226 -0
- package/.editorconfig +21 -0
- package/.github/workflows/release.yml +39 -0
- package/CHANGELOG.md +38 -0
- package/LICENSE +16 -0
- package/README.md +294 -0
- package/VERSIONING.md +45 -0
- package/docs/PATTERNS_REFERENCE.md +93 -0
- package/docs/PLAN-consolidation-final.md +14 -0
- package/docs/PLAN-integration.md +28 -0
- package/docs/PLAN-rebrand-agent-skills-kit.md +104 -0
- package/docs/PLAN-refactor.md +48 -0
- package/docs/PYTHON_SCRIPTS.md +55 -0
- package/docs/awf-user-guide.md +436 -0
- package/docs/context-engineering-guide.md +99 -0
- package/package.json +38 -0
- package/packages/cli/.agent/knowledge/lessons-learned.yaml +32 -0
- package/packages/cli/bin/ag-smart.js +155 -0
- package/packages/cli/bin/ag-smart.v1.js +78 -0
- package/packages/cli/lib/audit.js +69 -0
- package/packages/cli/lib/audit.v2.js +151 -0
- package/packages/cli/lib/auto-learn.js +319 -0
- package/packages/cli/lib/auto_preview.py +148 -0
- package/packages/cli/lib/checklist.py +222 -0
- package/packages/cli/lib/config.js +29 -0
- package/packages/cli/lib/eslint-fix.js +238 -0
- package/packages/cli/lib/fix.js +278 -0
- package/packages/cli/lib/generate-registry.js +42 -0
- package/packages/cli/lib/hooks/install-hooks.js +176 -0
- package/packages/cli/lib/hooks/lint-learn.js +172 -0
- package/packages/cli/lib/learn.js +173 -0
- package/packages/cli/lib/learn.test.js +70 -0
- package/packages/cli/lib/learn.v2.js +255 -0
- package/packages/cli/lib/recall.js +75 -0
- package/packages/cli/lib/recall.v2.js +252 -0
- package/packages/cli/lib/session_manager.py +120 -0
- package/packages/cli/lib/skill-learn.js +296 -0
- package/packages/cli/lib/stats.js +143 -0
- package/packages/cli/lib/types.js +33 -0
- package/packages/cli/lib/verify_all.py +327 -0
- package/packages/cli/lib/watcher.js +181 -0
- package/packages/cli/package-lock.json +1837 -0
- package/packages/cli/package.json +23 -0
- package/packages/cli/vitest.config.js +9 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Commit Message Best Practices
|
|
2
|
+
|
|
3
|
+
## CoinPika-Specific Guidelines
|
|
4
|
+
|
|
5
|
+
### 1. Always Include Context
|
|
6
|
+
|
|
7
|
+
For fintech applications, context is critical:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
# ❌ Bad - No context
|
|
11
|
+
fix: update price
|
|
12
|
+
|
|
13
|
+
# ✅ Good - Clear context
|
|
14
|
+
fix(api): correct BTC price rounding to 2 decimals [doctrine: Law-1]
|
|
15
|
+
|
|
16
|
+
Fixes floating-point precision issue that caused 0.01% price drift.
|
|
17
|
+
Affects display only, not stored values.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### 2. Doctrine Tags Are Mandatory
|
|
21
|
+
|
|
22
|
+
When changing critical areas, ALWAYS include doctrine tags:
|
|
23
|
+
|
|
24
|
+
| Change Type | Required Tags |
|
|
25
|
+
|-------------|---------------|
|
|
26
|
+
| Price/balance logic | `[doctrine: Law-1]` |
|
|
27
|
+
| Historical data | `[doctrine: Law-2]` |
|
|
28
|
+
| Chart components | `[doctrine: Law-3, Law-4]` |
|
|
29
|
+
| Mobile gestures | `[doctrine: Frontend-Mobile]` |
|
|
30
|
+
| API endpoints | `[doctrine: Architecture]` |
|
|
31
|
+
| Caching | `[doctrine: Performance]` |
|
|
32
|
+
|
|
33
|
+
### 3. Breaking Changes
|
|
34
|
+
|
|
35
|
+
Breaking changes in fintech are HIGH RISK:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
feat(api)!: change price response format [doctrine: Commercial]
|
|
39
|
+
|
|
40
|
+
BREAKING CHANGE: /api/coins/[id]/price now returns object
|
|
41
|
+
|
|
42
|
+
Before: { price: 50000 }
|
|
43
|
+
After: { currentPrice: 50000, timestamp: "...", source: "..." }
|
|
44
|
+
|
|
45
|
+
Migration:
|
|
46
|
+
1. Deploy v2 endpoint alongside v1
|
|
47
|
+
2. Update all consumers
|
|
48
|
+
3. Deprecate v1 after 30 days
|
|
49
|
+
|
|
50
|
+
Rollback: Revert to commit abc123
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 4. Document WHY, Not What
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
# ❌ Bad - Describes WHAT
|
|
57
|
+
refactor(chart): change data loading
|
|
58
|
+
|
|
59
|
+
# ✅ Good - Explains WHY
|
|
60
|
+
refactor(chart): separate realtime from historical data loading
|
|
61
|
+
|
|
62
|
+
Historical chart data was contaminated by WebSocket ticks,
|
|
63
|
+
causing visual artifacts during high-frequency trading.
|
|
64
|
+
Realtime price now displays in separate ticker component.
|
|
65
|
+
|
|
66
|
+
[doctrine: Law-3, Law-4]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Anti-Patterns to Avoid
|
|
70
|
+
|
|
71
|
+
### ❌ Vague Messages
|
|
72
|
+
```
|
|
73
|
+
fix: bug
|
|
74
|
+
update: stuff
|
|
75
|
+
changes
|
|
76
|
+
wip
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### ❌ Missing Scope for Critical Changes
|
|
80
|
+
```
|
|
81
|
+
feat: add caching # Which caching? Where?
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### ❌ Multiple Unrelated Changes
|
|
85
|
+
```
|
|
86
|
+
feat: add chart, fix login, update deps # Split into 3 commits
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### ❌ Past Tense
|
|
90
|
+
```
|
|
91
|
+
feat(api): added caching # Should be "add caching"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### ❌ Period at End
|
|
95
|
+
```
|
|
96
|
+
feat(api): add caching. # No period needed
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Quick Reference
|
|
100
|
+
|
|
101
|
+
### Commit Types
|
|
102
|
+
| Type | Description | Bump |
|
|
103
|
+
|------|-------------|------|
|
|
104
|
+
| feat | New feature | MINOR |
|
|
105
|
+
| fix | Bug fix | PATCH |
|
|
106
|
+
| perf | Performance | PATCH |
|
|
107
|
+
| refactor | Code restructure | - |
|
|
108
|
+
| docs | Documentation | - |
|
|
109
|
+
| style | Formatting | - |
|
|
110
|
+
| test | Tests | - |
|
|
111
|
+
| chore | Maintenance | - |
|
|
112
|
+
| doctrine | Constitutional | - |
|
|
113
|
+
|
|
114
|
+
### Commit Template
|
|
115
|
+
```
|
|
116
|
+
<type>(<scope>): <description> [doctrine: <tags>]
|
|
117
|
+
|
|
118
|
+
<body - explain WHY>
|
|
119
|
+
|
|
120
|
+
<footer - breaking changes, issue refs>
|
|
121
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# References & Resources
|
|
2
|
+
|
|
3
|
+
## Specifications
|
|
4
|
+
|
|
5
|
+
### Conventional Commits
|
|
6
|
+
- [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/)
|
|
7
|
+
- [Angular Commit Message Format](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit)
|
|
8
|
+
- [Commitizen](https://commitizen-tools.github.io/commitizen/)
|
|
9
|
+
|
|
10
|
+
### Semantic Versioning
|
|
11
|
+
- [Semantic Versioning 2.0.0](https://semver.org/)
|
|
12
|
+
- [npm Semver Calculator](https://semver.npmjs.com/)
|
|
13
|
+
|
|
14
|
+
## CoinPika Doctrines
|
|
15
|
+
|
|
16
|
+
### Constitutional Laws
|
|
17
|
+
| Law | Name | Description |
|
|
18
|
+
|-----|------|-------------|
|
|
19
|
+
| Law-1 | Truth Ownership | Backend owns financial truth |
|
|
20
|
+
| Law-2 | Historical Integrity | Historical data is immutable |
|
|
21
|
+
| Law-3 | Realtime Ephemerality | Realtime data is ephemeral |
|
|
22
|
+
| Law-4 | Chart Truthfulness | Charts from backend only |
|
|
23
|
+
|
|
24
|
+
### Doctrine Files
|
|
25
|
+
- [Master Constitution](../coinpika-doctrine-pack/constitution/coinpika-master-constitution.md)
|
|
26
|
+
- [Architecture Doctrine](../coinpika-doctrine-pack/doctrines/architecture/)
|
|
27
|
+
- [Backend Doctrine](../coinpika-doctrine-pack/doctrines/backend/)
|
|
28
|
+
- [Chart Data Doctrine](../coinpika-doctrine-pack/doctrines/data/)
|
|
29
|
+
- [Mobile Doctrine](../coinpika-doctrine-pack/doctrines/frontend/)
|
|
30
|
+
- [Performance Doctrine](../coinpika-doctrine-pack/doctrines/performance/)
|
|
31
|
+
- [Commercial Doctrine](../coinpika-doctrine-pack/doctrines/commercial/)
|
|
32
|
+
|
|
33
|
+
## Git Tools
|
|
34
|
+
|
|
35
|
+
### Commit Helpers
|
|
36
|
+
- [Commitizen CLI](https://github.com/commitizen/cz-cli)
|
|
37
|
+
- [Commitlint](https://commitlint.js.org/)
|
|
38
|
+
- [Husky Git Hooks](https://typicode.github.io/husky/)
|
|
39
|
+
|
|
40
|
+
### Changelog Generation
|
|
41
|
+
- [Conventional Changelog](https://github.com/conventional-changelog/conventional-changelog)
|
|
42
|
+
- [Release It!](https://github.com/release-it/release-it)
|
|
43
|
+
- [Standard Version](https://github.com/conventional-changelog/standard-version)
|
|
44
|
+
|
|
45
|
+
## Learning Resources
|
|
46
|
+
|
|
47
|
+
### Articles
|
|
48
|
+
- [How to Write Good Commit Messages](https://cbea.ms/git-commit/)
|
|
49
|
+
- [A Note About Git Commit Messages](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
|
|
50
|
+
- [Git Commit Best Practices](https://gist.github.com/luismts/495d982e8c5b1a0ced4a57cf3d93cf60)
|
|
51
|
+
|
|
52
|
+
### Videos
|
|
53
|
+
- [Conventional Commits Explained](https://www.youtube.com/results?search_query=conventional+commits)
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* CoinPika Commit Message Formatter
|
|
4
|
+
*
|
|
5
|
+
* Interactive CLI to format commit messages following Conventional Commits
|
|
6
|
+
* with CoinPika doctrine tags.
|
|
7
|
+
*
|
|
8
|
+
* Usage: node format-commit.js [--quick "message"]
|
|
9
|
+
*
|
|
10
|
+
* @version 1.2.0
|
|
11
|
+
* @author DataGuruIn
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const readline = require('readline');
|
|
15
|
+
const { execSync } = require('child_process');
|
|
16
|
+
const fs = require('fs');
|
|
17
|
+
const path = require('path');
|
|
18
|
+
const yaml = require('js-yaml');
|
|
19
|
+
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// CONFIGURATION
|
|
22
|
+
// ============================================================================
|
|
23
|
+
|
|
24
|
+
const SKILL_ROOT = path.resolve(__dirname, '..');
|
|
25
|
+
const CONFIG_PATH = path.join(SKILL_ROOT, 'metadata', 'commit-config.yaml');
|
|
26
|
+
|
|
27
|
+
function loadConfiguration() {
|
|
28
|
+
try {
|
|
29
|
+
if (!fs.existsSync(CONFIG_PATH)) {
|
|
30
|
+
console.warn('⚠️ Configuration file not found, using internal defaults.');
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
const fileContents = fs.readFileSync(CONFIG_PATH, 'utf8');
|
|
34
|
+
return yaml.load(fileContents);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
console.error('❌ Failed to load configuration:', e);
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Fallback defaults in case config is missing
|
|
42
|
+
const DEFAULT_CONFIG = {
|
|
43
|
+
commitTypes: [
|
|
44
|
+
{ value: 'feat', description: 'New feature or capability' },
|
|
45
|
+
{ value: 'fix', description: 'Bug fix' },
|
|
46
|
+
{ value: 'refactor', description: 'Code refactor without behavior change' },
|
|
47
|
+
{ value: 'perf', description: 'Performance improvement' },
|
|
48
|
+
{ value: 'style', description: 'Code style/formatting (no logic change)' },
|
|
49
|
+
{ value: 'docs', description: 'Documentation only' },
|
|
50
|
+
{ value: 'test', description: 'Adding or updating tests' },
|
|
51
|
+
{ value: 'chore', description: 'Build process, dependencies, tooling' },
|
|
52
|
+
{ value: 'doctrine', description: 'Constitutional/doctrinal enforcement' },
|
|
53
|
+
],
|
|
54
|
+
scopes: [
|
|
55
|
+
{ value: 'api', description: 'Backend API' },
|
|
56
|
+
{ value: 'data', description: 'Data pipeline or persistence' },
|
|
57
|
+
{ value: 'chart', description: 'Chart components' },
|
|
58
|
+
{ value: 'mobile', description: 'Mobile UI/gestures' },
|
|
59
|
+
{ value: 'worker', description: 'Background jobs/workers' },
|
|
60
|
+
{ value: 'cache', description: 'Caching layer' },
|
|
61
|
+
{ value: 'auth', description: 'Authentication' },
|
|
62
|
+
{ value: 'ui', description: 'General UI components' },
|
|
63
|
+
],
|
|
64
|
+
doctrines: [
|
|
65
|
+
{ value: 'Law-1', description: 'Truth Ownership - Backend owns truth' },
|
|
66
|
+
{ value: 'Law-2', description: 'Historical Integrity - Data is immutable' },
|
|
67
|
+
{ value: 'Law-3', description: 'Realtime Ephemerality - Separate realtime/historical' },
|
|
68
|
+
{ value: 'Law-4', description: 'Chart Truthfulness - Charts from backend only' },
|
|
69
|
+
{ value: 'Architecture', description: 'System boundaries' },
|
|
70
|
+
{ value: 'Performance', description: 'Caching & optimization' },
|
|
71
|
+
{ value: 'Frontend-Mobile', description: 'Mobile UX standards' },
|
|
72
|
+
{ value: 'Commercial', description: 'Commercial guardrails' },
|
|
73
|
+
],
|
|
74
|
+
scopeMapping: {
|
|
75
|
+
'api': ['Law-1', 'Architecture', 'Performance'],
|
|
76
|
+
'data': ['Law-1', 'Law-2', 'Architecture'],
|
|
77
|
+
'chart': ['Law-3', 'Law-4'],
|
|
78
|
+
'mobile': ['Frontend-Mobile'],
|
|
79
|
+
'worker': ['Performance', 'Architecture'],
|
|
80
|
+
'cache': ['Performance'],
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const config = loadConfiguration() || DEFAULT_CONFIG;
|
|
85
|
+
|
|
86
|
+
const COMMIT_TYPES = config.commitTypes || DEFAULT_CONFIG.commitTypes;
|
|
87
|
+
const SCOPES = config.scopes || DEFAULT_CONFIG.scopes;
|
|
88
|
+
const DOCTRINES = config.doctrines || DEFAULT_CONFIG.doctrines;
|
|
89
|
+
const SCOPE_DOCTRINE_MAP = config.scopeMapping || DEFAULT_CONFIG.scopeMapping;
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
// ============================================================================
|
|
93
|
+
// UTILITIES
|
|
94
|
+
// ============================================================================
|
|
95
|
+
|
|
96
|
+
function getChangedFiles() {
|
|
97
|
+
try {
|
|
98
|
+
const output = execSync('git diff --cached --name-only', { encoding: 'utf8' });
|
|
99
|
+
return output.trim().split('\n').filter(Boolean);
|
|
100
|
+
} catch {
|
|
101
|
+
return [];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function suggestScope(files) {
|
|
106
|
+
// Naive suggestion logic - could also be moved to config (regex mapping) but keeping simple for now
|
|
107
|
+
for (const file of files) {
|
|
108
|
+
const lower = file.toLowerCase();
|
|
109
|
+
// Check against known scopes if they match file path parts
|
|
110
|
+
for (const scope of SCOPES) {
|
|
111
|
+
if (lower.includes(scope.value)) return scope.value;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Manual fallbacks from original script if not covered by scope names
|
|
115
|
+
if (lower.includes('server')) return 'api';
|
|
116
|
+
if (lower.includes('graph')) return 'chart';
|
|
117
|
+
if (lower.includes('gesture')) return 'mobile';
|
|
118
|
+
if (lower.includes('db')) return 'data';
|
|
119
|
+
}
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function suggestDoctrines(scope) {
|
|
124
|
+
return SCOPE_DOCTRINE_MAP[scope] || [];
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// ============================================================================
|
|
128
|
+
// INTERACTIVE MODE
|
|
129
|
+
// ============================================================================
|
|
130
|
+
|
|
131
|
+
async function prompt(question) {
|
|
132
|
+
const rl = readline.createInterface({
|
|
133
|
+
input: process.stdin,
|
|
134
|
+
output: process.stdout
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
return new Promise(resolve => {
|
|
138
|
+
rl.question(question, answer => {
|
|
139
|
+
rl.close();
|
|
140
|
+
resolve(answer.trim());
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
async function selectFromList(title, items, defaultValue = null) {
|
|
146
|
+
console.log(`\n${title}`);
|
|
147
|
+
items.forEach((item, i) => {
|
|
148
|
+
const marker = defaultValue === item.value ? ' (suggested)' : '';
|
|
149
|
+
console.log(` ${i + 1}. ${item.value} - ${item.description}${marker}`);
|
|
150
|
+
});
|
|
151
|
+
console.log(` 0. Skip/None`);
|
|
152
|
+
|
|
153
|
+
const answer = await prompt('\nSelect (number): ');
|
|
154
|
+
const idx = parseInt(answer, 10);
|
|
155
|
+
|
|
156
|
+
if (idx === 0 || isNaN(idx)) return null;
|
|
157
|
+
return items[idx - 1]?.value || null;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
async function multiSelectFromList(title, items, suggested = []) {
|
|
161
|
+
console.log(`\n${title}`);
|
|
162
|
+
items.forEach((item, i) => {
|
|
163
|
+
const marker = suggested.includes(item.value) ? ' ★' : '';
|
|
164
|
+
console.log(` ${i + 1}. ${item.value} - ${item.description}${marker}`);
|
|
165
|
+
});
|
|
166
|
+
console.log(` (Enter comma-separated numbers, e.g., 1,3,4)`);
|
|
167
|
+
console.log(` (Press Enter to skip)`);
|
|
168
|
+
|
|
169
|
+
const answer = await prompt('\nSelect: ');
|
|
170
|
+
if (!answer) return [];
|
|
171
|
+
|
|
172
|
+
const indices = answer.split(',').map(s => parseInt(s.trim(), 10));
|
|
173
|
+
return indices
|
|
174
|
+
.filter(i => !isNaN(i) && i > 0 && i <= items.length)
|
|
175
|
+
.map(i => items[i - 1].value);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
async function interactiveMode() {
|
|
179
|
+
console.log('\n🔧 CoinPika Commit Message Formatter\n');
|
|
180
|
+
console.log('─'.repeat(50));
|
|
181
|
+
|
|
182
|
+
// Detect context
|
|
183
|
+
const changedFiles = getChangedFiles();
|
|
184
|
+
if (changedFiles.length > 0) {
|
|
185
|
+
console.log(`\n📁 Staged files:`);
|
|
186
|
+
changedFiles.slice(0, 5).forEach(f => console.log(` - ${f}`));
|
|
187
|
+
if (changedFiles.length > 5) {
|
|
188
|
+
console.log(` ... and ${changedFiles.length - 5} more`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const suggestedScope = suggestScope(changedFiles);
|
|
193
|
+
|
|
194
|
+
// Step 1: Type
|
|
195
|
+
const type = await selectFromList('Select commit type:', COMMIT_TYPES);
|
|
196
|
+
if (!type) {
|
|
197
|
+
console.log('❌ Type is required');
|
|
198
|
+
process.exit(1);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Step 2: Scope
|
|
202
|
+
const scope = await selectFromList('Select scope (optional):', SCOPES, suggestedScope);
|
|
203
|
+
|
|
204
|
+
// Step 3: Description
|
|
205
|
+
const description = await prompt('\nEnter description (imperative mood, lowercase, no period):\n> ');
|
|
206
|
+
if (!description) {
|
|
207
|
+
console.log('❌ Description is required');
|
|
208
|
+
process.exit(1);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// Step 4: Breaking change
|
|
212
|
+
const breaking = await prompt('\nIs this a breaking change? (y/N): ');
|
|
213
|
+
const isBreaking = breaking.toLowerCase() === 'y';
|
|
214
|
+
|
|
215
|
+
// Step 5: Doctrine tags
|
|
216
|
+
const suggestedDoctrines = scope ? suggestDoctrines(scope) : [];
|
|
217
|
+
const doctrines = await multiSelectFromList(
|
|
218
|
+
'Select applicable doctrines:',
|
|
219
|
+
DOCTRINES,
|
|
220
|
+
suggestedDoctrines
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
// Step 6: Body (optional)
|
|
224
|
+
console.log('\nEnter body (optional, press Enter twice to finish):');
|
|
225
|
+
let body = '';
|
|
226
|
+
const bodyRl = readline.createInterface({
|
|
227
|
+
input: process.stdin,
|
|
228
|
+
output: process.stdout
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
let emptyLines = 0;
|
|
232
|
+
for await (const line of bodyRl) {
|
|
233
|
+
if (line === '') {
|
|
234
|
+
emptyLines++;
|
|
235
|
+
if (emptyLines >= 2) break;
|
|
236
|
+
} else {
|
|
237
|
+
emptyLines = 0;
|
|
238
|
+
body += line + '\n';
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
bodyRl.close();
|
|
242
|
+
body = body.trim();
|
|
243
|
+
|
|
244
|
+
// Build message
|
|
245
|
+
let message = type;
|
|
246
|
+
if (scope) message += `(${scope})`;
|
|
247
|
+
if (isBreaking) message += '!';
|
|
248
|
+
message += `: ${description}`;
|
|
249
|
+
|
|
250
|
+
if (doctrines.length > 0) {
|
|
251
|
+
message += ` [doctrine: ${doctrines.join(', ')}]`;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if (body) {
|
|
255
|
+
message += `\n\n${body}`;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (isBreaking) {
|
|
259
|
+
message += `\n\nBREAKING CHANGE: ${description}`;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Output
|
|
263
|
+
console.log('\n' + '═'.repeat(50));
|
|
264
|
+
console.log('📝 Generated Commit Message:');
|
|
265
|
+
console.log('═'.repeat(50));
|
|
266
|
+
console.log(`\n${message}\n`);
|
|
267
|
+
console.log('═'.repeat(50));
|
|
268
|
+
|
|
269
|
+
// Copy option
|
|
270
|
+
const copy = await prompt('\nCopy to clipboard? (Y/n): ');
|
|
271
|
+
if (copy.toLowerCase() !== 'n') {
|
|
272
|
+
try {
|
|
273
|
+
if (process.platform === 'win32') {
|
|
274
|
+
execSync(`echo ${message.replace(/\n/g, '& echo.')} | clip`);
|
|
275
|
+
} else if (process.platform === 'darwin') {
|
|
276
|
+
execSync(`echo "${message}" | pbcopy`);
|
|
277
|
+
} else {
|
|
278
|
+
execSync(`echo "${message}" | xclip -selection clipboard`);
|
|
279
|
+
}
|
|
280
|
+
console.log('✅ Copied to clipboard!');
|
|
281
|
+
} catch {
|
|
282
|
+
console.log('⚠️ Could not copy to clipboard');
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// Commit option
|
|
287
|
+
const commit = await prompt('Run git commit with this message? (y/N): ');
|
|
288
|
+
if (commit.toLowerCase() === 'y') {
|
|
289
|
+
try {
|
|
290
|
+
execSync(`git commit -m "${message.replace(/"/g, '\\"')}"`, { stdio: 'inherit' });
|
|
291
|
+
} catch {
|
|
292
|
+
console.log('⚠️ Git commit failed');
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
console.log('\n' + '─'.repeat(50));
|
|
297
|
+
console.log('P.S. ⚡ Formatted by CoinPika Commit Engine');
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// ============================================================================
|
|
301
|
+
// QUICK MODE
|
|
302
|
+
// ============================================================================
|
|
303
|
+
|
|
304
|
+
function quickFormat(input) {
|
|
305
|
+
// Parse input: "type(scope): message"
|
|
306
|
+
const match = input.match(/^(\w+)(?:\((\w+)\))?(!)?:\s*(.+)$/);
|
|
307
|
+
|
|
308
|
+
if (!match) {
|
|
309
|
+
console.log('❌ Invalid format. Expected: type(scope): description');
|
|
310
|
+
console.log(' Example: feat(api): add caching layer');
|
|
311
|
+
process.exit(1);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
const [, type, scope, breaking, description] = match;
|
|
315
|
+
|
|
316
|
+
// Validate type
|
|
317
|
+
if (!COMMIT_TYPES.find(t => t.value === type)) {
|
|
318
|
+
console.log(`❌ Invalid type: ${type}`);
|
|
319
|
+
console.log(` Valid types: ${COMMIT_TYPES.map(t => t.value).join(', ')}`);
|
|
320
|
+
process.exit(1);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Suggest doctrines
|
|
324
|
+
const suggestedDoctrines = scope ? suggestDoctrines(scope) : [];
|
|
325
|
+
|
|
326
|
+
let message = input;
|
|
327
|
+
if (suggestedDoctrines.length > 0) {
|
|
328
|
+
message += ` [doctrine: ${suggestedDoctrines.join(', ')}]`;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
console.log('\n📝 Formatted Message:');
|
|
332
|
+
console.log(`\n${message}\n`);
|
|
333
|
+
|
|
334
|
+
if (suggestedDoctrines.length > 0) {
|
|
335
|
+
console.log(`💡 Suggested doctrines based on scope "${scope}":`);
|
|
336
|
+
suggestedDoctrines.forEach(d => {
|
|
337
|
+
const doc = DOCTRINES.find(x => x.value === d);
|
|
338
|
+
console.log(` - ${d}: ${doc?.description || ''}`);
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// ============================================================================
|
|
344
|
+
// CLI
|
|
345
|
+
// ============================================================================
|
|
346
|
+
|
|
347
|
+
function printHelp() {
|
|
348
|
+
console.log(`
|
|
349
|
+
CoinPika Commit Message Formatter v1.2.0
|
|
350
|
+
|
|
351
|
+
USAGE:
|
|
352
|
+
node format-commit.js Interactive mode
|
|
353
|
+
node format-commit.js --quick "..." Quick format
|
|
354
|
+
node format-commit.js --help Show help
|
|
355
|
+
|
|
356
|
+
OPTIONS:
|
|
357
|
+
--quick Format a quick message with doctrine suggestions
|
|
358
|
+
--help Show this help
|
|
359
|
+
|
|
360
|
+
EXAMPLES:
|
|
361
|
+
node format-commit.js
|
|
362
|
+
node format-commit.js --quick "feat(api): add caching layer"
|
|
363
|
+
|
|
364
|
+
COMMIT TYPES:
|
|
365
|
+
${COMMIT_TYPES.map(t => t.value).join(', ')}
|
|
366
|
+
|
|
367
|
+
SCOPES:
|
|
368
|
+
${SCOPES.map(s => s.value).join(', ')}
|
|
369
|
+
`);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
async function main() {
|
|
373
|
+
const args = process.argv.slice(2);
|
|
374
|
+
|
|
375
|
+
if (args.includes('--help')) {
|
|
376
|
+
printHelp();
|
|
377
|
+
process.exit(0);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
if (args.includes('--quick')) {
|
|
381
|
+
const idx = args.indexOf('--quick');
|
|
382
|
+
const message = args[idx + 1];
|
|
383
|
+
if (!message) {
|
|
384
|
+
console.log('❌ --quick requires a message');
|
|
385
|
+
process.exit(1);
|
|
386
|
+
}
|
|
387
|
+
quickFormat(message);
|
|
388
|
+
} else {
|
|
389
|
+
await interactiveMode();
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
main().catch(console.error);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
MESSAGE=$(cat "$1")
|
|
4
|
+
|
|
5
|
+
# Check for doctrine tag when needed
|
|
6
|
+
if echo "$MESSAGE" | grep -qiE '(api|chart|data|mobile|backend)'; then
|
|
7
|
+
if ! echo "$MESSAGE" | grep -q '\[doctrine:'; then
|
|
8
|
+
echo "ERROR: Changes to api/chart/data/mobile/backend require [doctrine: ...] tag"
|
|
9
|
+
echo ""
|
|
10
|
+
echo "Examples:"
|
|
11
|
+
echo " [doctrine: Law-2]"
|
|
12
|
+
echo " [doctrine: Architecture]"
|
|
13
|
+
echo " [doctrine: Performance]"
|
|
14
|
+
exit 1
|
|
15
|
+
fi
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# Check conventional commit format
|
|
19
|
+
if ! echo "$MESSAGE" | grep -qE '^(feat|fix|docs|style|refactor|perf|test|chore|doctrine)(\(.+\))?!?:'; then
|
|
20
|
+
echo "ERROR: Commit message must follow Conventional Commits format"
|
|
21
|
+
echo ""
|
|
22
|
+
echo "Format: <type>[scope]: <description>"
|
|
23
|
+
echo "Example: feat(api): add caching layer"
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
exit 0
|