@dtt_siye/atool 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +235 -0
- package/VERSION +1 -0
- package/agents/code-reviewer.md +29 -0
- package/bin/atool.js +235 -0
- package/bin/postinstall.js +23 -0
- package/hooks/doc-sync-reminder +155 -0
- package/hooks/hooks-cursor.json +37 -0
- package/hooks/hooks.json +37 -0
- package/hooks/prompt-guard +135 -0
- package/hooks/session-start +286 -0
- package/install.sh +603 -0
- package/lib/analyze-source.sh +1265 -0
- package/lib/common.sh +1041 -0
- package/lib/compute-importance.sh +598 -0
- package/lib/detect-stack.sh +354 -0
- package/lib/generate-visualization.sh +266 -0
- package/lib/install-claude.sh +43 -0
- package/lib/install-cursor.sh +281 -0
- package/lib/install-hooks.sh +285 -0
- package/lib/install-kiro.sh +543 -0
- package/lib/install-mcp.sh +99 -0
- package/lib/install-skills.sh +129 -0
- package/lib/knowledge-graph.sh +1014 -0
- package/lib/multi-dimensional-analysis.sh +413 -0
- package/lib/pre-scan.sh +1045 -0
- package/lib/project-init.sh +552 -0
- package/lib/visualization-template.html +545 -0
- package/mcp/recommended.json +24 -0
- package/package.json +39 -0
- package/skills/_superpowers/.claude-plugin/marketplace.json +20 -0
- package/skills/_superpowers/.claude-plugin/plugin.json +20 -0
- package/skills/_superpowers/.codex/INSTALL.md +67 -0
- package/skills/_superpowers/.cursor-plugin/plugin.json +25 -0
- package/skills/_superpowers/.gitattributes +18 -0
- package/skills/_superpowers/.github/FUNDING.yml +3 -0
- package/skills/_superpowers/.github/ISSUE_TEMPLATE/bug_report.md +52 -0
- package/skills/_superpowers/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/skills/_superpowers/.github/ISSUE_TEMPLATE/feature_request.md +34 -0
- package/skills/_superpowers/.github/ISSUE_TEMPLATE/platform_support.md +23 -0
- package/skills/_superpowers/.github/PULL_REQUEST_TEMPLATE.md +87 -0
- package/skills/_superpowers/.opencode/INSTALL.md +83 -0
- package/skills/_superpowers/.opencode/plugins/superpowers.js +107 -0
- package/skills/_superpowers/CHANGELOG.md +13 -0
- package/skills/_superpowers/CODE_OF_CONDUCT.md +128 -0
- package/skills/_superpowers/GEMINI.md +2 -0
- package/skills/_superpowers/LICENSE +21 -0
- package/skills/_superpowers/README.md +187 -0
- package/skills/_superpowers/RELEASE-NOTES.md +1083 -0
- package/skills/_superpowers/agents/code-reviewer.md +48 -0
- package/skills/_superpowers/commands/brainstorm.md +5 -0
- package/skills/_superpowers/commands/execute-plan.md +5 -0
- package/skills/_superpowers/commands/write-plan.md +5 -0
- package/skills/_superpowers/docs/README.codex.md +126 -0
- package/skills/_superpowers/docs/README.opencode.md +130 -0
- package/skills/_superpowers/docs/plans/2025-11-22-opencode-support-design.md +294 -0
- package/skills/_superpowers/docs/plans/2025-11-22-opencode-support-implementation.md +1095 -0
- package/skills/_superpowers/docs/plans/2025-11-28-skills-improvements-from-user-feedback.md +711 -0
- package/skills/_superpowers/docs/plans/2026-01-17-visual-brainstorming.md +571 -0
- package/skills/_superpowers/docs/superpowers/plans/2026-01-22-document-review-system.md +301 -0
- package/skills/_superpowers/docs/superpowers/plans/2026-02-19-visual-brainstorming-refactor.md +523 -0
- package/skills/_superpowers/docs/superpowers/plans/2026-03-11-zero-dep-brainstorm-server.md +479 -0
- package/skills/_superpowers/docs/superpowers/plans/2026-03-23-codex-app-compatibility.md +564 -0
- package/skills/_superpowers/docs/superpowers/specs/2026-01-22-document-review-system-design.md +136 -0
- package/skills/_superpowers/docs/superpowers/specs/2026-02-19-visual-brainstorming-refactor-design.md +162 -0
- package/skills/_superpowers/docs/superpowers/specs/2026-03-11-zero-dep-brainstorm-server-design.md +118 -0
- package/skills/_superpowers/docs/superpowers/specs/2026-03-23-codex-app-compatibility-design.md +244 -0
- package/skills/_superpowers/docs/testing.md +303 -0
- package/skills/_superpowers/docs/windows/polyglot-hooks.md +212 -0
- package/skills/_superpowers/gemini-extension.json +6 -0
- package/skills/_superpowers/hooks/hooks-cursor.json +10 -0
- package/skills/_superpowers/hooks/hooks.json +16 -0
- package/skills/_superpowers/hooks/run-hook.cmd +46 -0
- package/skills/_superpowers/hooks/session-start +57 -0
- package/skills/_superpowers/package.json +6 -0
- package/skills/_superpowers/skills/brainstorming/SKILL.md +164 -0
- package/skills/_superpowers/skills/brainstorming/scripts/frame-template.html +214 -0
- package/skills/_superpowers/skills/brainstorming/scripts/helper.js +88 -0
- package/skills/_superpowers/skills/brainstorming/scripts/server.cjs +354 -0
- package/skills/_superpowers/skills/brainstorming/scripts/start-server.sh +148 -0
- package/skills/_superpowers/skills/brainstorming/scripts/stop-server.sh +56 -0
- package/skills/_superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/skills/_superpowers/skills/brainstorming/visual-companion.md +287 -0
- package/skills/_superpowers/skills/dispatching-parallel-agents/SKILL.md +182 -0
- package/skills/_superpowers/skills/executing-plans/SKILL.md +70 -0
- package/skills/_superpowers/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/skills/_superpowers/skills/receiving-code-review/SKILL.md +213 -0
- package/skills/_superpowers/skills/requesting-code-review/SKILL.md +105 -0
- package/skills/_superpowers/skills/requesting-code-review/code-reviewer.md +146 -0
- package/skills/_superpowers/skills/subagent-driven-development/SKILL.md +277 -0
- package/skills/_superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
- package/skills/_superpowers/skills/subagent-driven-development/implementer-prompt.md +113 -0
- package/skills/_superpowers/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/skills/_superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/_superpowers/skills/systematic-debugging/SKILL.md +296 -0
- package/skills/_superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/_superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/_superpowers/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/_superpowers/skills/systematic-debugging/find-polluter.sh +63 -0
- package/skills/_superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/_superpowers/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/_superpowers/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/_superpowers/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/_superpowers/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/_superpowers/skills/test-driven-development/SKILL.md +371 -0
- package/skills/_superpowers/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/_superpowers/skills/using-git-worktrees/SKILL.md +218 -0
- package/skills/_superpowers/skills/using-superpowers/SKILL.md +115 -0
- package/skills/_superpowers/skills/using-superpowers/references/codex-tools.md +100 -0
- package/skills/_superpowers/skills/using-superpowers/references/gemini-tools.md +33 -0
- package/skills/_superpowers/skills/verification-before-completion/SKILL.md +139 -0
- package/skills/_superpowers/skills/writing-plans/SKILL.md +152 -0
- package/skills/_superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/skills/_superpowers/skills/writing-skills/SKILL.md +655 -0
- package/skills/_superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/skills/_superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/_superpowers/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/_superpowers/skills/writing-skills/persuasion-principles.md +187 -0
- package/skills/_superpowers/skills/writing-skills/render-graphs.js +168 -0
- package/skills/_superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/skills/_superpowers/tests/brainstorm-server/package-lock.json +36 -0
- package/skills/_superpowers/tests/brainstorm-server/package.json +10 -0
- package/skills/_superpowers/tests/brainstorm-server/server.test.js +427 -0
- package/skills/_superpowers/tests/brainstorm-server/windows-lifecycle.test.sh +351 -0
- package/skills/_superpowers/tests/brainstorm-server/ws-protocol.test.js +392 -0
- package/skills/_superpowers/tests/claude-code/README.md +158 -0
- package/skills/_superpowers/tests/claude-code/analyze-token-usage.py +168 -0
- package/skills/_superpowers/tests/claude-code/run-skill-tests.sh +187 -0
- package/skills/_superpowers/tests/claude-code/test-document-review-system.sh +177 -0
- package/skills/_superpowers/tests/claude-code/test-helpers.sh +202 -0
- package/skills/_superpowers/tests/claude-code/test-subagent-driven-development-integration.sh +314 -0
- package/skills/_superpowers/tests/claude-code/test-subagent-driven-development.sh +165 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/action-oriented.txt +3 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/after-planning-flow.txt +17 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/claude-suggested-it.txt +11 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/i-know-what-sdd-means.txt +8 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/mid-conversation-execute-plan.txt +3 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/please-use-brainstorming.txt +1 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/skip-formalities.txt +3 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/subagent-driven-development-please.txt +1 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/use-systematic-debugging.txt +1 -0
- package/skills/_superpowers/tests/explicit-skill-requests/run-all.sh +70 -0
- package/skills/_superpowers/tests/explicit-skill-requests/run-claude-describes-sdd.sh +100 -0
- package/skills/_superpowers/tests/explicit-skill-requests/run-extended-multiturn-test.sh +113 -0
- package/skills/_superpowers/tests/explicit-skill-requests/run-haiku-test.sh +144 -0
- package/skills/_superpowers/tests/explicit-skill-requests/run-multiturn-test.sh +143 -0
- package/skills/_superpowers/tests/explicit-skill-requests/run-test.sh +136 -0
- package/skills/_superpowers/tests/opencode/run-tests.sh +163 -0
- package/skills/_superpowers/tests/opencode/setup.sh +73 -0
- package/skills/_superpowers/tests/opencode/test-plugin-loading.sh +72 -0
- package/skills/_superpowers/tests/opencode/test-priority.sh +198 -0
- package/skills/_superpowers/tests/opencode/test-tools.sh +104 -0
- package/skills/_superpowers/tests/skill-triggering/prompts/dispatching-parallel-agents.txt +8 -0
- package/skills/_superpowers/tests/skill-triggering/prompts/executing-plans.txt +1 -0
- package/skills/_superpowers/tests/skill-triggering/prompts/requesting-code-review.txt +3 -0
- package/skills/_superpowers/tests/skill-triggering/prompts/systematic-debugging.txt +11 -0
- package/skills/_superpowers/tests/skill-triggering/prompts/test-driven-development.txt +7 -0
- package/skills/_superpowers/tests/skill-triggering/prompts/writing-plans.txt +10 -0
- package/skills/_superpowers/tests/skill-triggering/run-all.sh +60 -0
- package/skills/_superpowers/tests/skill-triggering/run-test.sh +88 -0
- package/skills/_superpowers/tests/subagent-driven-dev/go-fractals/design.md +81 -0
- package/skills/_superpowers/tests/subagent-driven-dev/go-fractals/plan.md +172 -0
- package/skills/_superpowers/tests/subagent-driven-dev/go-fractals/scaffold.sh +45 -0
- package/skills/_superpowers/tests/subagent-driven-dev/run-test.sh +106 -0
- package/skills/_superpowers/tests/subagent-driven-dev/svelte-todo/design.md +70 -0
- package/skills/_superpowers/tests/subagent-driven-dev/svelte-todo/plan.md +222 -0
- package/skills/_superpowers/tests/subagent-driven-dev/svelte-todo/scaffold.sh +46 -0
- package/skills/ai-project-architecture/SKILL.md +632 -0
- package/skills/ai-project-architecture/reference/structure-rules.md +406 -0
- package/skills/ai-project-architecture/templates/compliance-report.md +300 -0
- package/skills/ai-project-architecture/templates/migration-plan.md +433 -0
- package/skills/ai-project-architecture/templates/verification-checklist.md +408 -0
- package/skills/android-conventions/SKILL.md +125 -0
- package/skills/atool-init/SKILL.md +141 -0
- package/skills/clarify-before-build/SKILL.md +107 -0
- package/skills/code-review/SKILL.md +406 -0
- package/skills/code-review/rules/architecture.md +285 -0
- package/skills/code-review/rules/coupling-cohesion.md +309 -0
- package/skills/code-review/rules/dead-code.md +115 -0
- package/skills/code-review/rules/deprecation-debt.md +279 -0
- package/skills/code-review/rules/duplication.md +104 -0
- package/skills/code-review/rules/error-security.md +143 -0
- package/skills/code-review/rules/maintainability.md +203 -0
- package/skills/code-review/rules/quality.md +158 -0
- package/skills/devops-conventions/SKILL.md +205 -0
- package/skills/doc-coauthoring/SKILL.md +392 -0
- package/skills/doc-standards-enforcer/SKILL.md +290 -0
- package/skills/doc-standards-enforcer/examples/valid-document-example.md +67 -0
- package/skills/doc-standards-enforcer/references/101-standards-summary.md +318 -0
- package/skills/doc-standards-enforcer/scripts/check_references.py +175 -0
- package/skills/doc-standards-enforcer/scripts/fix_common_issues.py +303 -0
- package/skills/doc-standards-enforcer/scripts/validate_doc_standards.py +332 -0
- package/skills/docx/LICENSE.txt +30 -0
- package/skills/docx/SKILL.md +200 -0
- package/skills/docx/docx-js.md +350 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/docx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/docx/ooxml/scripts/pack.py +159 -0
- package/skills/docx/ooxml/scripts/unpack.py +29 -0
- package/skills/docx/ooxml/scripts/validate.py +69 -0
- package/skills/docx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/docx/ooxml/scripts/validation/base.py +951 -0
- package/skills/docx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/docx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/docx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/docx/ooxml.md +610 -0
- package/skills/docx/scripts/__init__.py +1 -0
- package/skills/docx/scripts/document.py +1276 -0
- package/skills/docx/scripts/templates/comments.xml +3 -0
- package/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/skills/docx/scripts/templates/people.xml +3 -0
- package/skills/docx/scripts/utilities.py +374 -0
- package/skills/flutter-conventions/SKILL.md +70 -0
- package/skills/go-conventions/SKILL.md +230 -0
- package/skills/harmony-conventions/SKILL.md +156 -0
- package/skills/java-conventions/SKILL.md +277 -0
- package/skills/pdf/LICENSE.txt +30 -0
- package/skills/pdf/SKILL.md +297 -0
- package/skills/pdf/forms.md +205 -0
- package/skills/pdf/reference.md +612 -0
- package/skills/pdf/scripts/check_bounding_boxes.py +70 -0
- package/skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/skills/pdf/scripts/check_fillable_fields.py +12 -0
- package/skills/pdf/scripts/convert_pdf_to_images.py +35 -0
- package/skills/pdf/scripts/create_validation_image.py +41 -0
- package/skills/pdf/scripts/extract_form_field_info.py +152 -0
- package/skills/pdf/scripts/fill_fillable_fields.py +114 -0
- package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/skills/pptx/LICENSE.txt +30 -0
- package/skills/pptx/SKILL.md +487 -0
- package/skills/pptx/html2pptx.md +625 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/pptx/ooxml/scripts/pack.py +159 -0
- package/skills/pptx/ooxml/scripts/unpack.py +29 -0
- package/skills/pptx/ooxml/scripts/validate.py +69 -0
- package/skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/pptx/ooxml/scripts/validation/base.py +951 -0
- package/skills/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/pptx/ooxml.md +427 -0
- package/skills/pptx/scripts/html2pptx.js +979 -0
- package/skills/pptx/scripts/inventory.py +1020 -0
- package/skills/pptx/scripts/rearrange.py +231 -0
- package/skills/pptx/scripts/replace.py +385 -0
- package/skills/pptx/scripts/thumbnail.py +450 -0
- package/skills/project-analyze/SKILL.md +270 -0
- package/skills/project-analyze/phases/phase0-discovery.md +278 -0
- package/skills/project-analyze/phases/phase0.5-prescan.md +139 -0
- package/skills/project-analyze/phases/phase1-inventory.md +94 -0
- package/skills/project-analyze/phases/phase2-deep-analysis.md +249 -0
- package/skills/project-analyze/phases/phase2a-l4-analysis.md +94 -0
- package/skills/project-analyze/phases/phase2b-l5-analysis.md +97 -0
- package/skills/project-analyze/phases/phase3-knowledge-graph.md +120 -0
- package/skills/project-analyze/phases/phase3a-multi-dimensional.md +61 -0
- package/skills/project-analyze/phases/phase4-code-quality.md +81 -0
- package/skills/project-analyze/phases/phase5-synthesis.md +284 -0
- package/skills/project-analyze/phases/phase6-validation.md +179 -0
- package/skills/project-analyze/prompts/code-review-agent.md +122 -0
- package/skills/project-analyze/prompts/deep-analysis-agent.md +107 -0
- package/skills/project-analyze/prompts/inventory-agent.md +67 -0
- package/skills/project-analyze/prompts/l4-analysis-agent.md +98 -0
- package/skills/project-analyze/rules/android.md +282 -0
- package/skills/project-analyze/rules/devops.md +443 -0
- package/skills/project-analyze/rules/generic.md +243 -0
- package/skills/project-analyze/rules/go.md +289 -0
- package/skills/project-analyze/rules/harmony.md +257 -0
- package/skills/project-analyze/rules/java.md +507 -0
- package/skills/project-analyze/rules/mobile-flutter.md +315 -0
- package/skills/project-analyze/rules/mobile-react-native.md +283 -0
- package/skills/project-analyze/rules/mobile-swift.md +323 -0
- package/skills/project-analyze/rules/python.md +317 -0
- package/skills/project-analyze/rules/rust-tauri.md +243 -0
- package/skills/project-analyze/rules/rust.md +296 -0
- package/skills/project-analyze/rules/web-nextjs.md +364 -0
- package/skills/project-analyze/rules/web-react.md +298 -0
- package/skills/project-analyze/rules/web-vue.md +378 -0
- package/skills/project-analyze/rules/web.md +390 -0
- package/skills/project-query/SKILL.md +224 -0
- package/skills/project-query/rules/query-templates.md +212 -0
- package/skills/python-conventions/SKILL.md +169 -0
- package/skills/react-native-conventions/SKILL.md +73 -0
- package/skills/requirements-writer/README.md +153 -0
- package/skills/requirements-writer/SKILL.md +341 -0
- package/skills/requirements-writer/examples/prd-outline-example.md +217 -0
- package/skills/requirements-writer/templates/module-prd-template.md +362 -0
- package/skills/requirements-writer/templates/prd-outline-template.md +185 -0
- package/skills/requirements-writer/templates/user-story-template.md +1125 -0
- package/skills/rust-conventions/SKILL.md +361 -0
- package/skills/smart-dispatch/SKILL.md +296 -0
- package/skills/smart-dispatch/implementer-prompt.md +146 -0
- package/skills/smart-dispatch/reviewer-prompt.md +199 -0
- package/skills/software-architecture/SKILL.md +278 -0
- package/skills/swift-conventions/SKILL.md +72 -0
- package/skills/ui-ux-pro/SKILL.md +140 -0
- package/skills/verification-before-completion/SKILL.md +119 -0
- package/skills/web-conventions/SKILL.md +259 -0
- package/skills/webapp-testing/LICENSE.txt +202 -0
- package/skills/webapp-testing/SKILL.md +97 -0
- package/skills/webapp-testing/examples/console_logging.py +35 -0
- package/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/skills/webapp-testing/scripts/with_server.py +106 -0
- package/skills/writing-plans/SKILL.md +144 -0
- package/skills/xlsx/LICENSE.txt +30 -0
- package/skills/xlsx/SKILL.md +292 -0
- package/skills/xlsx/recalc.py +178 -0
- package/templates/CLAUDE.md.android +57 -0
- package/templates/CLAUDE.md.devops +50 -0
- package/templates/CLAUDE.md.generic +34 -0
- package/templates/CLAUDE.md.go +67 -0
- package/templates/CLAUDE.md.harmony +54 -0
- package/templates/CLAUDE.md.java +56 -0
- package/templates/CLAUDE.md.mobile-flutter +38 -0
- package/templates/CLAUDE.md.mobile-react-native +37 -0
- package/templates/CLAUDE.md.mobile-swift +40 -0
- package/templates/CLAUDE.md.python +65 -0
- package/templates/CLAUDE.md.rust +68 -0
- package/templates/CLAUDE.md.rust-tauri +120 -0
- package/templates/CLAUDE.md.web +63 -0
- package/templates/COMPONENT.md.android +58 -0
- package/templates/COMPONENT.md.devops +54 -0
- package/templates/COMPONENT.md.generic +35 -0
- package/templates/COMPONENT.md.go +59 -0
- package/templates/COMPONENT.md.harmony +63 -0
- package/templates/COMPONENT.md.java +69 -0
- package/templates/COMPONENT.md.mobile-flutter +56 -0
- package/templates/COMPONENT.md.mobile-react-native +55 -0
- package/templates/COMPONENT.md.mobile-swift +56 -0
- package/templates/COMPONENT.md.python +67 -0
- package/templates/COMPONENT.md.rust +57 -0
- package/templates/COMPONENT.md.rust-tauri +66 -0
- package/templates/COMPONENT.md.web +39 -0
- package/templates/README.md.android +71 -0
- package/templates/README.md.devops +68 -0
- package/templates/README.md.generic +39 -0
- package/templates/README.md.go +70 -0
- package/templates/README.md.harmony +72 -0
- package/templates/README.md.java +73 -0
- package/templates/README.md.mobile-flutter +69 -0
- package/templates/README.md.mobile-react-native +65 -0
- package/templates/README.md.mobile-swift +69 -0
- package/templates/README.md.monorepo +59 -0
- package/templates/README.md.python +66 -0
- package/templates/README.md.rust +69 -0
- package/templates/README.md.rust-tauri +149 -0
- package/templates/README.md.web +94 -0
- package/templates/UI_STYLE.md.android +74 -0
- package/templates/UI_STYLE.md.devops +50 -0
- package/templates/UI_STYLE.md.generic +31 -0
- package/templates/UI_STYLE.md.go +49 -0
- package/templates/UI_STYLE.md.harmony +71 -0
- package/templates/UI_STYLE.md.java +61 -0
- package/templates/UI_STYLE.md.mobile-flutter +70 -0
- package/templates/UI_STYLE.md.mobile-react-native +71 -0
- package/templates/UI_STYLE.md.mobile-swift +71 -0
- package/templates/UI_STYLE.md.python +58 -0
- package/templates/UI_STYLE.md.rust +52 -0
- package/templates/UI_STYLE.md.rust-tauri +102 -0
- package/templates/UI_STYLE.md.web +92 -0
- package/templates/cursor-rules.android.mdc +33 -0
- package/templates/cursor-rules.devops.mdc +32 -0
- package/templates/cursor-rules.generic.mdc +25 -0
- package/templates/cursor-rules.go.mdc +34 -0
- package/templates/cursor-rules.harmony.mdc +30 -0
- package/templates/cursor-rules.java.mdc +30 -0
- package/templates/cursor-rules.mobile-flutter.mdc +42 -0
- package/templates/cursor-rules.mobile-react-native.mdc +43 -0
- package/templates/cursor-rules.mobile-swift.mdc +42 -0
- package/templates/cursor-rules.python.mdc +33 -0
- package/templates/cursor-rules.rust-tauri.mdc +67 -0
- package/templates/cursor-rules.rust.mdc +30 -0
- package/templates/cursor-rules.web.mdc +30 -0
- package/templates/kiro-steering.android.md +39 -0
- package/templates/kiro-steering.devops.md +32 -0
- package/templates/kiro-steering.generic.md +28 -0
- package/templates/kiro-steering.go.md +41 -0
- package/templates/kiro-steering.harmony.md +36 -0
- package/templates/kiro-steering.java.md +37 -0
- package/templates/kiro-steering.mobile-flutter.md +73 -0
- package/templates/kiro-steering.mobile-react-native.md +71 -0
- package/templates/kiro-steering.mobile-swift.md +62 -0
- package/templates/kiro-steering.python.md +34 -0
- package/templates/kiro-steering.rust-tauri.md +50 -0
- package/templates/kiro-steering.rust.md +36 -0
- package/templates/kiro-steering.web.md +41 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rust-conventions
|
|
3
|
+
description: Rust/Cargo/Tauri development conventions and best practices
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Rust Conventions
|
|
8
|
+
|
|
9
|
+
Use this skill when working on Rust projects.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
- Detected Rust project (Cargo.toml)
|
|
13
|
+
- Detected Tauri project (src-tauri/Cargo.toml)
|
|
14
|
+
- User asks about Rust or Tauri best practices
|
|
15
|
+
- Writing or reviewing Rust/Tauri code
|
|
16
|
+
|
|
17
|
+
## Code Style
|
|
18
|
+
|
|
19
|
+
### General
|
|
20
|
+
- Follow Rust API Guidelines
|
|
21
|
+
- Run `cargo fmt` for formatting
|
|
22
|
+
- Run `cargo clippy -- -D warnings` for linting
|
|
23
|
+
- 4-space indentation
|
|
24
|
+
- Use `rustfmt.toml` for project-specific formatting
|
|
25
|
+
|
|
26
|
+
### Naming
|
|
27
|
+
- Types & Traits: `PascalCase` (`UserService`)
|
|
28
|
+
- Functions & Methods: `snake_case` (`get_user`)
|
|
29
|
+
- Constants: `UPPER_SNAKE_CASE` (`MAX_RETRIES`)
|
|
30
|
+
- Lifetime parameters: short names (`'a`, `'b`)
|
|
31
|
+
- Type parameters: `PascalCase` with `T` prefix (`TValue`)
|
|
32
|
+
|
|
33
|
+
### Idioms
|
|
34
|
+
- Use `Option<T>` instead of null
|
|
35
|
+
- Use `Result<T, E>` instead of exceptions
|
|
36
|
+
- Use `impl Trait` for simple trait bounds
|
|
37
|
+
- Use `&str` for borrowed strings, `String` for owned
|
|
38
|
+
- Use `Cow<str>` when ownership varies
|
|
39
|
+
- Use iterators over index-based loops
|
|
40
|
+
- Use pattern matching (`match`, `if let`, `let else`)
|
|
41
|
+
|
|
42
|
+
## Error Handling
|
|
43
|
+
|
|
44
|
+
### Custom Errors with thiserror
|
|
45
|
+
```rust
|
|
46
|
+
use thiserror::Error;
|
|
47
|
+
|
|
48
|
+
#[derive(Error, Debug)]
|
|
49
|
+
pub enum AppError {
|
|
50
|
+
#[error("User not found: {0}")]
|
|
51
|
+
UserNotFound(String),
|
|
52
|
+
|
|
53
|
+
#[error("Database error: {0}")]
|
|
54
|
+
Database(#[from] sqlx::Error),
|
|
55
|
+
|
|
56
|
+
#[error("Unauthorized")]
|
|
57
|
+
Unauthorized,
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
pub type AppResult<T> = Result<T, AppError>;
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Error Handling Pattern
|
|
64
|
+
```rust
|
|
65
|
+
// In library code: return Result
|
|
66
|
+
fn get_user(id: u32) -> AppResult<User> {
|
|
67
|
+
let user = db.query_user(id)?;
|
|
68
|
+
Ok(user)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// In application code: handle errors
|
|
72
|
+
match get_user(id) {
|
|
73
|
+
Ok(user) => println!("{user:?}"),
|
|
74
|
+
Err(AppError::UserNotFound(_)) => println!("User not found"),
|
|
75
|
+
Err(e) => eprintln!("Error: {e}"),
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Architecture
|
|
80
|
+
|
|
81
|
+
### Module Organization
|
|
82
|
+
```
|
|
83
|
+
src/
|
|
84
|
+
├── main.rs
|
|
85
|
+
├── lib.rs
|
|
86
|
+
├── config.rs
|
|
87
|
+
├── error.rs
|
|
88
|
+
├── models/
|
|
89
|
+
│ ├── mod.rs
|
|
90
|
+
│ └── user.rs
|
|
91
|
+
├── services/
|
|
92
|
+
│ ├── mod.rs
|
|
93
|
+
│ └── user_service.rs
|
|
94
|
+
└── api/
|
|
95
|
+
├── mod.rs
|
|
96
|
+
└── handlers.rs
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Trait-based Abstraction
|
|
100
|
+
```rust
|
|
101
|
+
pub trait UserRepository {
|
|
102
|
+
fn find_by_id(&self, id: u32) -> AppResult<User>;
|
|
103
|
+
fn save(&self, user: &User) -> AppResult<()>;
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Async/Await
|
|
108
|
+
```rust
|
|
109
|
+
use tokio;
|
|
110
|
+
|
|
111
|
+
async fn fetch_user(id: u32) -> AppResult<User> {
|
|
112
|
+
let user = repository.find_by_id(id).await?;
|
|
113
|
+
Ok(user)
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Ownership Patterns
|
|
118
|
+
|
|
119
|
+
### Borrowing
|
|
120
|
+
```rust
|
|
121
|
+
fn process(data: &str) -> usize {
|
|
122
|
+
data.len()
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
fn take_ownership(data: String) -> usize {
|
|
126
|
+
data.len() // data is moved
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Lifetimes
|
|
131
|
+
```rust
|
|
132
|
+
fn first_word<'a>(text: &'a str) -> &'a str {
|
|
133
|
+
text.split_whitespace().next().unwrap_or("")
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Testing
|
|
138
|
+
|
|
139
|
+
### Unit Tests
|
|
140
|
+
```rust
|
|
141
|
+
#[cfg(test)]
|
|
142
|
+
mod tests {
|
|
143
|
+
use super::*;
|
|
144
|
+
|
|
145
|
+
#[test]
|
|
146
|
+
fn test_process() {
|
|
147
|
+
assert_eq!(process("hello"), 5);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
#[test]
|
|
151
|
+
#[should_panic(expected = "division by zero")]
|
|
152
|
+
fn test_panic_case() {
|
|
153
|
+
divide(1, 0);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Integration Tests (tests/ directory)
|
|
159
|
+
```rust
|
|
160
|
+
// tests/api_tests.rs
|
|
161
|
+
use myapp::create_app;
|
|
162
|
+
|
|
163
|
+
#[tokio::test]
|
|
164
|
+
async fn test_get_user() {
|
|
165
|
+
let app = create_app().await;
|
|
166
|
+
let resp = app.get("/users/1").send().await;
|
|
167
|
+
assert!(resp.status().is_success());
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Common Commands
|
|
172
|
+
```bash
|
|
173
|
+
cargo build # Build
|
|
174
|
+
cargo run # Run
|
|
175
|
+
cargo test # Test
|
|
176
|
+
cargo clippy -- -D warnings # Lint strictly
|
|
177
|
+
cargo fmt # Format
|
|
178
|
+
cargo build --release # Release build
|
|
179
|
+
cargo doc # Generate docs
|
|
180
|
+
cargo outdated # Check dependency updates
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Tauri 2 Desktop Development
|
|
184
|
+
|
|
185
|
+
### IPC Command Pattern
|
|
186
|
+
|
|
187
|
+
```rust
|
|
188
|
+
// src-tauri/src/commands/system.rs
|
|
189
|
+
#[tauri::command]
|
|
190
|
+
pub async fn get_system_info(state: tauri::State<'_, AppState>) -> Result<SysInfo, String> {
|
|
191
|
+
let info = state.get_system_info().await
|
|
192
|
+
.map_err(|e| e.to_string())?;
|
|
193
|
+
Ok(info)
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
```typescript
|
|
198
|
+
// src/services/system.ts
|
|
199
|
+
import { invoke } from '@tauri-apps/api/core';
|
|
200
|
+
|
|
201
|
+
export async function getSystemInfo(): Promise<SysInfo> {
|
|
202
|
+
return await invoke<SysInfo>('get_system_info');
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Rules**:
|
|
207
|
+
- All system operations must go through `#[tauri::command]` functions
|
|
208
|
+
- Never access file system, network, or OS APIs directly from frontend
|
|
209
|
+
- Commands return `Result<T, String>` for user-facing errors
|
|
210
|
+
- Use `tauri::State` for shared application state
|
|
211
|
+
|
|
212
|
+
### Command Registration
|
|
213
|
+
|
|
214
|
+
```rust
|
|
215
|
+
// src-tauri/src/lib.rs
|
|
216
|
+
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
|
217
|
+
pub fn run() {
|
|
218
|
+
tauri::Builder::default()
|
|
219
|
+
.plugin(tauri_plugin_shell::init())
|
|
220
|
+
.manage(AppState::new())
|
|
221
|
+
.invoke_handler(tauri::generate_handler![
|
|
222
|
+
commands::system::get_system_info,
|
|
223
|
+
commands::file::read_file,
|
|
224
|
+
commands::config::save_config,
|
|
225
|
+
])
|
|
226
|
+
.run(tauri::generate_context!())
|
|
227
|
+
.expect("error while running tauri application");
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### State Management
|
|
232
|
+
|
|
233
|
+
```rust
|
|
234
|
+
// src-tauri/src/state.rs
|
|
235
|
+
use std::sync::Mutex;
|
|
236
|
+
|
|
237
|
+
pub struct AppState {
|
|
238
|
+
pub config: Mutex<AppConfig>,
|
|
239
|
+
pub cache: Mutex<HashMap<String, String>>,
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
impl AppState {
|
|
243
|
+
pub fn new() -> Self {
|
|
244
|
+
Self {
|
|
245
|
+
config: Mutex::new(AppConfig::default()),
|
|
246
|
+
cache: Mutex::new(HashMap::new()),
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Error Handling in Commands
|
|
253
|
+
|
|
254
|
+
```rust
|
|
255
|
+
// Use thiserror for typed errors
|
|
256
|
+
#[derive(Debug, thiserror::Error)]
|
|
257
|
+
pub enum CommandError {
|
|
258
|
+
#[error("File not found: {0}")]
|
|
259
|
+
FileNotFound(String),
|
|
260
|
+
#[error("Permission denied: {0}")]
|
|
261
|
+
PermissionDenied(String),
|
|
262
|
+
#[error("IO error: {0}")]
|
|
263
|
+
Io(#[from] std::io::Error),
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// Convert to user-friendly string in command boundary
|
|
267
|
+
impl From<CommandError> for String {
|
|
268
|
+
fn from(err: CommandError) -> String {
|
|
269
|
+
err.to_string()
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
#[tauri::command]
|
|
274
|
+
pub async fn read_file(path: String) -> Result<String, CommandError> {
|
|
275
|
+
std::fs::read_to_string(&path)
|
|
276
|
+
.map_err(CommandError::Io)
|
|
277
|
+
}
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Security (Capabilities)
|
|
281
|
+
|
|
282
|
+
```json
|
|
283
|
+
// src-tauri/capabilities/default.json
|
|
284
|
+
{
|
|
285
|
+
"identifier": "default",
|
|
286
|
+
"windows": ["main"],
|
|
287
|
+
"permissions": [
|
|
288
|
+
"core:default",
|
|
289
|
+
"shell:allow-open",
|
|
290
|
+
"dialog:allow-open",
|
|
291
|
+
"fs:allow-read-text-file"
|
|
292
|
+
]
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Rules**:
|
|
297
|
+
- Declare all permissions explicitly in `capabilities/`
|
|
298
|
+
- Use scoped file system access (limit paths)
|
|
299
|
+
- Never use `core:window:allow-*` wildcards in production
|
|
300
|
+
- Principle of least privilege
|
|
301
|
+
|
|
302
|
+
### Frontend IPC Best Practices
|
|
303
|
+
|
|
304
|
+
```typescript
|
|
305
|
+
// Encapsulate all invoke calls in services/
|
|
306
|
+
// src/services/system.ts
|
|
307
|
+
import { invoke } from '@tauri-apps/api/core';
|
|
308
|
+
|
|
309
|
+
export interface SysInfo {
|
|
310
|
+
os: string;
|
|
311
|
+
arch: string;
|
|
312
|
+
version: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export async function getSystemInfo(): Promise<SysInfo> {
|
|
316
|
+
return invoke<SysInfo>('get_system_info');
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// Error handling wrapper
|
|
320
|
+
export async function safeInvoke<T>(cmd: string, args?: Record<string, unknown>): Promise<T> {
|
|
321
|
+
try {
|
|
322
|
+
return await invoke<T>(cmd, args);
|
|
323
|
+
} catch (error) {
|
|
324
|
+
console.error(`IPC error [${cmd}]:`, error);
|
|
325
|
+
throw new Error(`Command '${cmd}' failed: ${error}`);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### Shared Types
|
|
331
|
+
|
|
332
|
+
Mirror Rust structs as TypeScript interfaces:
|
|
333
|
+
|
|
334
|
+
```rust
|
|
335
|
+
// Rust
|
|
336
|
+
#[derive(Serialize, Deserialize)]
|
|
337
|
+
pub struct AppConfig {
|
|
338
|
+
pub theme: String,
|
|
339
|
+
pub language: String,
|
|
340
|
+
pub auto_start: bool,
|
|
341
|
+
}
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
```typescript
|
|
345
|
+
// TypeScript
|
|
346
|
+
export interface AppConfig {
|
|
347
|
+
theme: string;
|
|
348
|
+
language: string;
|
|
349
|
+
auto_start: boolean;
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### Common Tauri Commands
|
|
354
|
+
|
|
355
|
+
```bash
|
|
356
|
+
pnpm tauri dev # Development with hot reload
|
|
357
|
+
pnpm tauri build # Production build
|
|
358
|
+
cd src-tauri && cargo check # Quick Rust check
|
|
359
|
+
cd src-tauri && cargo clippy # Lint Rust code
|
|
360
|
+
cd src-tauri && cargo test # Run Rust tests
|
|
361
|
+
```
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: smart-dispatch
|
|
3
|
+
description: Use when executing an implementation plan with parallelizable tasks. Parses plan into chunks, detects file-level dependencies, and dispatches independent tasks as parallel background agents with two-stage review. Falls back to sequential execution on platforms without subagent support.
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Smart-Dispatch: Dependency-Aware Parallel Plan Execution
|
|
8
|
+
|
|
9
|
+
Execute implementation plans by dispatching independent tasks as parallel background agents, while respecting task dependencies and file-level conflicts.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
- You have a written implementation plan with tasks to execute
|
|
14
|
+
- The plan uses `## Chunk N: Title` groupings (or you can infer chunks from task structure)
|
|
15
|
+
- Your platform supports subagents (Claude Code with Agent tool, Cursor)
|
|
16
|
+
- Tasks within chunks touch different files and can run independently
|
|
17
|
+
|
|
18
|
+
**Do NOT use when:**
|
|
19
|
+
- Platform lacks subagent support → use `executing-plans` instead
|
|
20
|
+
- All tasks are tightly coupled (modify same files) → use `subagent-driven-development`
|
|
21
|
+
- You need debugging, not plan execution → use `dispatching-parallel-agents`
|
|
22
|
+
|
|
23
|
+
## Decision Flowchart
|
|
24
|
+
|
|
25
|
+
```dot
|
|
26
|
+
digraph smart_dispatch {
|
|
27
|
+
"Have implementation plan?" [shape=diamond];
|
|
28
|
+
"Platform has subagents?" [shape=diamond];
|
|
29
|
+
"Tasks have file overlap?" [shape=diamond];
|
|
30
|
+
"Use smart-dispatch" [shape=box];
|
|
31
|
+
"Use executing-plans" [shape=box];
|
|
32
|
+
"Use subagent-driven-development" [shape=box];
|
|
33
|
+
|
|
34
|
+
"Have implementation plan?" -> "Platform has subagents?" [label="yes"];
|
|
35
|
+
"Have implementation plan?" -> "Write plan first" [label="no"];
|
|
36
|
+
"Platform has subagents?" -> "Use smart-dispatch" [label="yes"];
|
|
37
|
+
"Platform has subagents?" -> "Use executing-plans" [label="no"];
|
|
38
|
+
"Use smart-dispatch" -> "Tasks have file overlap?";
|
|
39
|
+
"Tasks have file overlap?" -> "Split into sub-waves" [label="yes"];
|
|
40
|
+
"Tasks have file overlap?" -> "Full parallel" [label="no"];
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Platform Detection
|
|
45
|
+
|
|
46
|
+
Before dispatching, detect the platform:
|
|
47
|
+
|
|
48
|
+
| Platform | Detection | Parallel Mechanism |
|
|
49
|
+
|----------|-----------|-------------------|
|
|
50
|
+
| Claude Code | `Agent` tool available with `run_in_background` parameter | `Agent` tool + `run_in_background: true` |
|
|
51
|
+
| Cursor | Cursor agent tool available | Cursor background tasks |
|
|
52
|
+
| Kiro | No subagent support | Fallback to `executing-plans` |
|
|
53
|
+
| Gemini CLI | No subagent support | Fallback to `executing-plans` |
|
|
54
|
+
|
|
55
|
+
When platform doesn't support background agents:
|
|
56
|
+
```
|
|
57
|
+
Parallel agents not available on this platform.
|
|
58
|
+
Falling back to sequential execution via executing-plans.
|
|
59
|
+
Consider using Claude Code for full parallel support.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Phase 1: Parse Plan into Chunks
|
|
65
|
+
|
|
66
|
+
### Chunk Syntax
|
|
67
|
+
|
|
68
|
+
Plans use `## Chunk N: Title` headers to group tasks:
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
## Chunk 1: Foundation Tasks
|
|
72
|
+
|
|
73
|
+
### Task 1: Create Types
|
|
74
|
+
**Files:**
|
|
75
|
+
- Create: `src/types.ts`
|
|
76
|
+
|
|
77
|
+
### Task 2: Create Config
|
|
78
|
+
**Files:**
|
|
79
|
+
- Create: `src/config.ts`
|
|
80
|
+
|
|
81
|
+
## Chunk 2: Components
|
|
82
|
+
**Depends on:** Chunk 1
|
|
83
|
+
|
|
84
|
+
### Task 3: Button Component
|
|
85
|
+
**Files:**
|
|
86
|
+
- Create: `src/Button.tsx`
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Parsing Rules
|
|
90
|
+
|
|
91
|
+
1. `## Chunk N: Title` starts a new chunk; all tasks until the next chunk header belong to it
|
|
92
|
+
2. `**Depends on:** Chunk M` declares explicit dependency (optional)
|
|
93
|
+
3. Without `Depends on:`, Chunk N depends on Chunk N-1 (sequential by number)
|
|
94
|
+
4. Each task has `**Files:**` with `Create:`, `Modify:`, or `Test:` entries
|
|
95
|
+
5. **Backward compatible**: plans without chunk headers → single chunk, all tasks sequential
|
|
96
|
+
|
|
97
|
+
### Build Chunk DAG
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
For each chunk:
|
|
101
|
+
Extract dependency from "Depends on:" or default to previous chunk
|
|
102
|
+
Build directed acyclic graph (DAG)
|
|
103
|
+
Verify: no cycles (if cycle detected → error, ask user to fix plan)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Phase 2: Compute Sub-Waves (Within Each Chunk)
|
|
109
|
+
|
|
110
|
+
### File Overlap Analysis
|
|
111
|
+
|
|
112
|
+
For each pair of tasks within a chunk:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
For each task pair (Ti, Tj) where i < j:
|
|
116
|
+
If Ti.Files ∩ Tj.Files ≠ ∅ (Create or Modify same file):
|
|
117
|
+
→ Add edge Ti → Tj
|
|
118
|
+
If Ti creates file X AND Tj modifies file X:
|
|
119
|
+
→ Add edge Ti → Tj
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Sub-wave Computation
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
1. Build file-overlap graph from analysis above
|
|
126
|
+
2. Topological sort → BFS level-by-level → sub-waves
|
|
127
|
+
3. Tasks with no edges between them → same sub-wave (PARALLEL)
|
|
128
|
+
4. Tasks with edges → different sub-waves (SEQUENTIAL)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Output: Dispatch Plan
|
|
132
|
+
|
|
133
|
+
Print the dispatch plan before executing:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
Dispatch Plan:
|
|
137
|
+
Chunk 1: Foundation (no dependencies)
|
|
138
|
+
Sub-wave 1: [Task 1, Task 2] — PARALLEL (no file overlap)
|
|
139
|
+
Sub-wave 2: [Task 3] — depends on Task 1 (modifies types.ts)
|
|
140
|
+
|
|
141
|
+
Chunk 2: Components (depends on Chunk 1)
|
|
142
|
+
Sub-wave 1: [Task 4, Task 5, Task 6] — PARALLEL (different files)
|
|
143
|
+
|
|
144
|
+
Chunk 3: Integration (depends on Chunk 2)
|
|
145
|
+
Sub-wave 1: [Task 7] — SEQUENTIAL (touches multiple files)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Phase 3: Execute
|
|
151
|
+
|
|
152
|
+
### Execution Loop
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
For each chunk (in topological order from DAG):
|
|
156
|
+
|
|
157
|
+
Compute sub-waves via file-overlap analysis
|
|
158
|
+
|
|
159
|
+
For each sub-wave:
|
|
160
|
+
|
|
161
|
+
1. DISPATCH: Send all tasks in sub-wave as background agents
|
|
162
|
+
- **HARD LIMIT: Maximum 5 concurrent background agents**
|
|
163
|
+
- If sub-wave has more than 5 tasks, queue in batches of 5
|
|
164
|
+
- Wait for ALL agents in current batch to complete before starting next batch
|
|
165
|
+
- Use implementer-prompt.md template
|
|
166
|
+
- Each agent gets: task description, file list, steps, scope constraints
|
|
167
|
+
- Monitor all agents until ALL complete
|
|
168
|
+
|
|
169
|
+
2. REVIEW: Sequential two-stage review per completed task
|
|
170
|
+
For each task (one at a time):
|
|
171
|
+
a. Spec Review → use reviewer-prompt.md (spec mode)
|
|
172
|
+
- If FAIL → re-dispatch fix agent (max 2 retries)
|
|
173
|
+
b. Code Quality Review → use reviewer-prompt.md (quality mode)
|
|
174
|
+
- If FAIL → re-dispatch fix agent (max 2 retries)
|
|
175
|
+
c. If both PASS → mark task COMPLETE
|
|
176
|
+
|
|
177
|
+
3. COMMIT: Controller commits after each task passes both reviews
|
|
178
|
+
- One commit per task: git commit -m "feat: [task description]"
|
|
179
|
+
- Commits are SEQUENTIAL (never parallel)
|
|
180
|
+
|
|
181
|
+
4. HANDLE FAILURES:
|
|
182
|
+
- BLOCKED task → halt chunk, report blocker to user
|
|
183
|
+
- FAILED after retries → report, continue with remaining tasks
|
|
184
|
+
- Agent crash/timeout → treat as BLOCKED
|
|
185
|
+
|
|
186
|
+
Next sub-wave
|
|
187
|
+
|
|
188
|
+
Next chunk
|
|
189
|
+
|
|
190
|
+
FINAL: Run verification-before-completion + doc sync
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Model Selection
|
|
194
|
+
|
|
195
|
+
| Task Type | Model | Reason |
|
|
196
|
+
|-----------|-------|--------|
|
|
197
|
+
| Mechanical (1-2 files, clear spec) | fast/cheap | Simple implementation |
|
|
198
|
+
| Integration (multi-file, patterns) | standard | Needs broader context |
|
|
199
|
+
| Architecture/design/review | most capable | Requires judgment |
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Safety Rules
|
|
204
|
+
|
|
205
|
+
### What Can Run in Parallel
|
|
206
|
+
|
|
207
|
+
| Operation | Parallel? | Reason |
|
|
208
|
+
|-----------|-----------|--------|
|
|
209
|
+
| Create different new files | YES | No conflict possible |
|
|
210
|
+
| Modify different existing files | YES | No conflict |
|
|
211
|
+
| Run linter/formatter | YES | Read-only operation |
|
|
212
|
+
| Create + modify same file | NO → sequential | Dependency |
|
|
213
|
+
| Modify same file different sections | NO → sequential | Conservative; avoid conflicts |
|
|
214
|
+
| git commit/push | NO → Controller only | Parallel commits conflict |
|
|
215
|
+
| Install dependencies (npm/cargo/pip) | NO → sequential | Shared lock files |
|
|
216
|
+
| Run tests | NO → sequential | May depend on shared state |
|
|
217
|
+
|
|
218
|
+
### Agent Scope Constraints
|
|
219
|
+
|
|
220
|
+
Each implementer agent receives these strict rules in its prompt:
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
**Scope Limitations:**
|
|
224
|
+
- ONLY create/modify: {explicit file list from task}
|
|
225
|
+
- FORBIDDEN: git commit, git push, git add
|
|
226
|
+
- FORBIDDEN: npm install, cargo build, pip install, go mod tidy
|
|
227
|
+
- FORBIDDEN: Modify any file NOT in the above list
|
|
228
|
+
- If you need to modify additional files → return BLOCKED status
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Failure Handling
|
|
232
|
+
|
|
233
|
+
| Status | Action |
|
|
234
|
+
|--------|--------|
|
|
235
|
+
| DONE | Proceed to review |
|
|
236
|
+
| DONE_WITH_CONCERNS | Read concerns, decide proceed or fix |
|
|
237
|
+
| BLOCKED | Halt chunk, report blocker to user |
|
|
238
|
+
| NEEDS_CONTEXT | Provide context, re-dispatch same agent |
|
|
239
|
+
| Review FAIL | Re-dispatch fix agent (max 2 retries per stage) |
|
|
240
|
+
| All retries exhausted | Mark FAILED, report, continue other tasks |
|
|
241
|
+
| Agent crash/timeout | Treat as BLOCKED, report last known output |
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Review Integration
|
|
246
|
+
|
|
247
|
+
### Two-Stage Review (Per Task, Sequential)
|
|
248
|
+
|
|
249
|
+
**Stage 1: Spec Compliance Review**
|
|
250
|
+
- Did the implementer build exactly what was requested?
|
|
251
|
+
- All steps completed? All files created/modified?
|
|
252
|
+
- No extra features added? No missing requirements?
|
|
253
|
+
- Reviewer MUST read actual code, not trust implementer's report
|
|
254
|
+
|
|
255
|
+
**Stage 2: Code Quality Review** (only after Stage 1 passes)
|
|
256
|
+
- Dead code? Duplication? Overly complex functions?
|
|
257
|
+
- Error handling adequate? Security issues?
|
|
258
|
+
- Follows project conventions? File organization clean?
|
|
259
|
+
|
|
260
|
+
### Review Scheduling
|
|
261
|
+
|
|
262
|
+
- Reviews run **sequentially per task** (not parallelized)
|
|
263
|
+
- A task must pass spec review BEFORE code quality review starts
|
|
264
|
+
- A sub-wave must have ALL tasks pass both reviews before the next sub-wave starts
|
|
265
|
+
- Between sub-waves: Controller commits all passed tasks
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Checklist
|
|
270
|
+
|
|
271
|
+
Before starting execution, verify:
|
|
272
|
+
|
|
273
|
+
- [ ] Plan has been parsed into chunks
|
|
274
|
+
- [ ] Chunk DAG has been built (no cycles)
|
|
275
|
+
- [ ] Sub-waves computed for each chunk
|
|
276
|
+
- [ ] Dispatch plan printed and confirmed
|
|
277
|
+
- [ ] Platform supports background agents (or fallback chosen)
|
|
278
|
+
|
|
279
|
+
During execution:
|
|
280
|
+
|
|
281
|
+
- [ ] Each sub-wave dispatched as background agents
|
|
282
|
+
- [ ] All agents monitored until completion
|
|
283
|
+
- [ ] Two-stage review run on each task
|
|
284
|
+
- [ ] Failures handled per the table above
|
|
285
|
+
- [ ] Commits made after reviews pass (sequential)
|
|
286
|
+
|
|
287
|
+
After execution:
|
|
288
|
+
|
|
289
|
+
- [ ] All tasks completed (or failures reported)
|
|
290
|
+
- [ ] Documentation sync task executed
|
|
291
|
+
- [ ] verification-before-completion run
|
|
292
|
+
|
|
293
|
+
## Prompt Templates
|
|
294
|
+
|
|
295
|
+
- **Implementer prompt:** `skills/smart-dispatch/implementer-prompt.md`
|
|
296
|
+
- **Reviewer prompt:** `skills/smart-dispatch/reviewer-prompt.md`
|