@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,168 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Analyze token usage from Claude Code session transcripts.
|
|
4
|
+
Breaks down usage by main session and individual subagents.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import json
|
|
8
|
+
import sys
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from collections import defaultdict
|
|
11
|
+
|
|
12
|
+
def analyze_main_session(filepath):
|
|
13
|
+
"""Analyze a session file and return token usage broken down by agent."""
|
|
14
|
+
main_usage = {
|
|
15
|
+
'input_tokens': 0,
|
|
16
|
+
'output_tokens': 0,
|
|
17
|
+
'cache_creation': 0,
|
|
18
|
+
'cache_read': 0,
|
|
19
|
+
'messages': 0
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
# Track usage per subagent
|
|
23
|
+
subagent_usage = defaultdict(lambda: {
|
|
24
|
+
'input_tokens': 0,
|
|
25
|
+
'output_tokens': 0,
|
|
26
|
+
'cache_creation': 0,
|
|
27
|
+
'cache_read': 0,
|
|
28
|
+
'messages': 0,
|
|
29
|
+
'description': None
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
with open(filepath, 'r') as f:
|
|
33
|
+
for line in f:
|
|
34
|
+
try:
|
|
35
|
+
data = json.loads(line)
|
|
36
|
+
|
|
37
|
+
# Main session assistant messages
|
|
38
|
+
if data.get('type') == 'assistant' and 'message' in data:
|
|
39
|
+
main_usage['messages'] += 1
|
|
40
|
+
msg_usage = data['message'].get('usage', {})
|
|
41
|
+
main_usage['input_tokens'] += msg_usage.get('input_tokens', 0)
|
|
42
|
+
main_usage['output_tokens'] += msg_usage.get('output_tokens', 0)
|
|
43
|
+
main_usage['cache_creation'] += msg_usage.get('cache_creation_input_tokens', 0)
|
|
44
|
+
main_usage['cache_read'] += msg_usage.get('cache_read_input_tokens', 0)
|
|
45
|
+
|
|
46
|
+
# Subagent tool results
|
|
47
|
+
if data.get('type') == 'user' and 'toolUseResult' in data:
|
|
48
|
+
result = data['toolUseResult']
|
|
49
|
+
if 'usage' in result and 'agentId' in result:
|
|
50
|
+
agent_id = result['agentId']
|
|
51
|
+
usage = result['usage']
|
|
52
|
+
|
|
53
|
+
# Get description from prompt if available
|
|
54
|
+
if subagent_usage[agent_id]['description'] is None:
|
|
55
|
+
prompt = result.get('prompt', '')
|
|
56
|
+
# Extract first line as description
|
|
57
|
+
first_line = prompt.split('\n')[0] if prompt else f"agent-{agent_id}"
|
|
58
|
+
if first_line.startswith('You are '):
|
|
59
|
+
first_line = first_line[8:] # Remove "You are "
|
|
60
|
+
subagent_usage[agent_id]['description'] = first_line[:60]
|
|
61
|
+
|
|
62
|
+
subagent_usage[agent_id]['messages'] += 1
|
|
63
|
+
subagent_usage[agent_id]['input_tokens'] += usage.get('input_tokens', 0)
|
|
64
|
+
subagent_usage[agent_id]['output_tokens'] += usage.get('output_tokens', 0)
|
|
65
|
+
subagent_usage[agent_id]['cache_creation'] += usage.get('cache_creation_input_tokens', 0)
|
|
66
|
+
subagent_usage[agent_id]['cache_read'] += usage.get('cache_read_input_tokens', 0)
|
|
67
|
+
except Exception:
|
|
68
|
+
pass
|
|
69
|
+
|
|
70
|
+
return main_usage, dict(subagent_usage)
|
|
71
|
+
|
|
72
|
+
def format_tokens(n):
|
|
73
|
+
"""Format token count with thousands separators."""
|
|
74
|
+
return f"{n:,}"
|
|
75
|
+
|
|
76
|
+
def calculate_cost(usage, input_cost_per_m=3.0, output_cost_per_m=15.0):
|
|
77
|
+
"""Calculate estimated cost in dollars."""
|
|
78
|
+
total_input = usage['input_tokens'] + usage['cache_creation'] + usage['cache_read']
|
|
79
|
+
input_cost = total_input * input_cost_per_m / 1_000_000
|
|
80
|
+
output_cost = usage['output_tokens'] * output_cost_per_m / 1_000_000
|
|
81
|
+
return input_cost + output_cost
|
|
82
|
+
|
|
83
|
+
def main():
|
|
84
|
+
if len(sys.argv) < 2:
|
|
85
|
+
print("Usage: analyze-token-usage.py <session-file.jsonl>")
|
|
86
|
+
sys.exit(1)
|
|
87
|
+
|
|
88
|
+
main_session_file = sys.argv[1]
|
|
89
|
+
|
|
90
|
+
if not Path(main_session_file).exists():
|
|
91
|
+
print(f"Error: Session file not found: {main_session_file}")
|
|
92
|
+
sys.exit(1)
|
|
93
|
+
|
|
94
|
+
# Analyze the session
|
|
95
|
+
main_usage, subagent_usage = analyze_main_session(main_session_file)
|
|
96
|
+
|
|
97
|
+
print("=" * 100)
|
|
98
|
+
print("TOKEN USAGE ANALYSIS")
|
|
99
|
+
print("=" * 100)
|
|
100
|
+
print()
|
|
101
|
+
|
|
102
|
+
# Print breakdown
|
|
103
|
+
print("Usage Breakdown:")
|
|
104
|
+
print("-" * 100)
|
|
105
|
+
print(f"{'Agent':<15} {'Description':<35} {'Msgs':>5} {'Input':>10} {'Output':>10} {'Cache':>10} {'Cost':>8}")
|
|
106
|
+
print("-" * 100)
|
|
107
|
+
|
|
108
|
+
# Main session
|
|
109
|
+
cost = calculate_cost(main_usage)
|
|
110
|
+
print(f"{'main':<15} {'Main session (coordinator)':<35} "
|
|
111
|
+
f"{main_usage['messages']:>5} "
|
|
112
|
+
f"{format_tokens(main_usage['input_tokens']):>10} "
|
|
113
|
+
f"{format_tokens(main_usage['output_tokens']):>10} "
|
|
114
|
+
f"{format_tokens(main_usage['cache_read']):>10} "
|
|
115
|
+
f"${cost:>7.2f}")
|
|
116
|
+
|
|
117
|
+
# Subagents (sorted by agent ID)
|
|
118
|
+
for agent_id in sorted(subagent_usage.keys()):
|
|
119
|
+
usage = subagent_usage[agent_id]
|
|
120
|
+
cost = calculate_cost(usage)
|
|
121
|
+
desc = usage['description'] or f"agent-{agent_id}"
|
|
122
|
+
print(f"{agent_id:<15} {desc:<35} "
|
|
123
|
+
f"{usage['messages']:>5} "
|
|
124
|
+
f"{format_tokens(usage['input_tokens']):>10} "
|
|
125
|
+
f"{format_tokens(usage['output_tokens']):>10} "
|
|
126
|
+
f"{format_tokens(usage['cache_read']):>10} "
|
|
127
|
+
f"${cost:>7.2f}")
|
|
128
|
+
|
|
129
|
+
print("-" * 100)
|
|
130
|
+
|
|
131
|
+
# Calculate totals
|
|
132
|
+
total_usage = {
|
|
133
|
+
'input_tokens': main_usage['input_tokens'],
|
|
134
|
+
'output_tokens': main_usage['output_tokens'],
|
|
135
|
+
'cache_creation': main_usage['cache_creation'],
|
|
136
|
+
'cache_read': main_usage['cache_read'],
|
|
137
|
+
'messages': main_usage['messages']
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
for usage in subagent_usage.values():
|
|
141
|
+
total_usage['input_tokens'] += usage['input_tokens']
|
|
142
|
+
total_usage['output_tokens'] += usage['output_tokens']
|
|
143
|
+
total_usage['cache_creation'] += usage['cache_creation']
|
|
144
|
+
total_usage['cache_read'] += usage['cache_read']
|
|
145
|
+
total_usage['messages'] += usage['messages']
|
|
146
|
+
|
|
147
|
+
total_input = total_usage['input_tokens'] + total_usage['cache_creation'] + total_usage['cache_read']
|
|
148
|
+
total_tokens = total_input + total_usage['output_tokens']
|
|
149
|
+
total_cost = calculate_cost(total_usage)
|
|
150
|
+
|
|
151
|
+
print()
|
|
152
|
+
print("TOTALS:")
|
|
153
|
+
print(f" Total messages: {format_tokens(total_usage['messages'])}")
|
|
154
|
+
print(f" Input tokens: {format_tokens(total_usage['input_tokens'])}")
|
|
155
|
+
print(f" Output tokens: {format_tokens(total_usage['output_tokens'])}")
|
|
156
|
+
print(f" Cache creation tokens: {format_tokens(total_usage['cache_creation'])}")
|
|
157
|
+
print(f" Cache read tokens: {format_tokens(total_usage['cache_read'])}")
|
|
158
|
+
print()
|
|
159
|
+
print(f" Total input (incl cache): {format_tokens(total_input)}")
|
|
160
|
+
print(f" Total tokens: {format_tokens(total_tokens)}")
|
|
161
|
+
print()
|
|
162
|
+
print(f" Estimated cost: ${total_cost:.2f}")
|
|
163
|
+
print(" (at $3/$15 per M tokens for input/output)")
|
|
164
|
+
print()
|
|
165
|
+
print("=" * 100)
|
|
166
|
+
|
|
167
|
+
if __name__ == '__main__':
|
|
168
|
+
main()
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Test runner for Claude Code skills
|
|
3
|
+
# Tests skills by invoking Claude Code CLI and verifying behavior
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
7
|
+
cd "$SCRIPT_DIR"
|
|
8
|
+
|
|
9
|
+
echo "========================================"
|
|
10
|
+
echo " Claude Code Skills Test Suite"
|
|
11
|
+
echo "========================================"
|
|
12
|
+
echo ""
|
|
13
|
+
echo "Repository: $(cd ../.. && pwd)"
|
|
14
|
+
echo "Test time: $(date)"
|
|
15
|
+
echo "Claude version: $(claude --version 2>/dev/null || echo 'not found')"
|
|
16
|
+
echo ""
|
|
17
|
+
|
|
18
|
+
# Check if Claude Code is available
|
|
19
|
+
if ! command -v claude &> /dev/null; then
|
|
20
|
+
echo "ERROR: Claude Code CLI not found"
|
|
21
|
+
echo "Install Claude Code first: https://code.claude.com"
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
# Parse command line arguments
|
|
26
|
+
VERBOSE=false
|
|
27
|
+
SPECIFIC_TEST=""
|
|
28
|
+
TIMEOUT=300 # Default 5 minute timeout per test
|
|
29
|
+
RUN_INTEGRATION=false
|
|
30
|
+
|
|
31
|
+
while [[ $# -gt 0 ]]; do
|
|
32
|
+
case $1 in
|
|
33
|
+
--verbose|-v)
|
|
34
|
+
VERBOSE=true
|
|
35
|
+
shift
|
|
36
|
+
;;
|
|
37
|
+
--test|-t)
|
|
38
|
+
SPECIFIC_TEST="$2"
|
|
39
|
+
shift 2
|
|
40
|
+
;;
|
|
41
|
+
--timeout)
|
|
42
|
+
TIMEOUT="$2"
|
|
43
|
+
shift 2
|
|
44
|
+
;;
|
|
45
|
+
--integration|-i)
|
|
46
|
+
RUN_INTEGRATION=true
|
|
47
|
+
shift
|
|
48
|
+
;;
|
|
49
|
+
--help|-h)
|
|
50
|
+
echo "Usage: $0 [options]"
|
|
51
|
+
echo ""
|
|
52
|
+
echo "Options:"
|
|
53
|
+
echo " --verbose, -v Show verbose output"
|
|
54
|
+
echo " --test, -t NAME Run only the specified test"
|
|
55
|
+
echo " --timeout SECONDS Set timeout per test (default: 300)"
|
|
56
|
+
echo " --integration, -i Run integration tests (slow, 10-30 min)"
|
|
57
|
+
echo " --help, -h Show this help"
|
|
58
|
+
echo ""
|
|
59
|
+
echo "Tests:"
|
|
60
|
+
echo " test-subagent-driven-development.sh Test skill loading and requirements"
|
|
61
|
+
echo ""
|
|
62
|
+
echo "Integration Tests (use --integration):"
|
|
63
|
+
echo " test-subagent-driven-development-integration.sh Full workflow execution"
|
|
64
|
+
exit 0
|
|
65
|
+
;;
|
|
66
|
+
*)
|
|
67
|
+
echo "Unknown option: $1"
|
|
68
|
+
echo "Use --help for usage information"
|
|
69
|
+
exit 1
|
|
70
|
+
;;
|
|
71
|
+
esac
|
|
72
|
+
done
|
|
73
|
+
|
|
74
|
+
# List of skill tests to run (fast unit tests)
|
|
75
|
+
tests=(
|
|
76
|
+
"test-subagent-driven-development.sh"
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
# Integration tests (slow, full execution)
|
|
80
|
+
integration_tests=(
|
|
81
|
+
"test-subagent-driven-development-integration.sh"
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# Add integration tests if requested
|
|
85
|
+
if [ "$RUN_INTEGRATION" = true ]; then
|
|
86
|
+
tests+=("${integration_tests[@]}")
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
# Filter to specific test if requested
|
|
90
|
+
if [ -n "$SPECIFIC_TEST" ]; then
|
|
91
|
+
tests=("$SPECIFIC_TEST")
|
|
92
|
+
fi
|
|
93
|
+
|
|
94
|
+
# Track results
|
|
95
|
+
passed=0
|
|
96
|
+
failed=0
|
|
97
|
+
skipped=0
|
|
98
|
+
|
|
99
|
+
# Run each test
|
|
100
|
+
for test in "${tests[@]}"; do
|
|
101
|
+
echo "----------------------------------------"
|
|
102
|
+
echo "Running: $test"
|
|
103
|
+
echo "----------------------------------------"
|
|
104
|
+
|
|
105
|
+
test_path="$SCRIPT_DIR/$test"
|
|
106
|
+
|
|
107
|
+
if [ ! -f "$test_path" ]; then
|
|
108
|
+
echo " [SKIP] Test file not found: $test"
|
|
109
|
+
skipped=$((skipped + 1))
|
|
110
|
+
continue
|
|
111
|
+
fi
|
|
112
|
+
|
|
113
|
+
if [ ! -x "$test_path" ]; then
|
|
114
|
+
echo " Making $test executable..."
|
|
115
|
+
chmod +x "$test_path"
|
|
116
|
+
fi
|
|
117
|
+
|
|
118
|
+
start_time=$(date +%s)
|
|
119
|
+
|
|
120
|
+
if [ "$VERBOSE" = true ]; then
|
|
121
|
+
if timeout "$TIMEOUT" bash "$test_path"; then
|
|
122
|
+
end_time=$(date +%s)
|
|
123
|
+
duration=$((end_time - start_time))
|
|
124
|
+
echo ""
|
|
125
|
+
echo " [PASS] $test (${duration}s)"
|
|
126
|
+
passed=$((passed + 1))
|
|
127
|
+
else
|
|
128
|
+
exit_code=$?
|
|
129
|
+
end_time=$(date +%s)
|
|
130
|
+
duration=$((end_time - start_time))
|
|
131
|
+
echo ""
|
|
132
|
+
if [ $exit_code -eq 124 ]; then
|
|
133
|
+
echo " [FAIL] $test (timeout after ${TIMEOUT}s)"
|
|
134
|
+
else
|
|
135
|
+
echo " [FAIL] $test (${duration}s)"
|
|
136
|
+
fi
|
|
137
|
+
failed=$((failed + 1))
|
|
138
|
+
fi
|
|
139
|
+
else
|
|
140
|
+
# Capture output for non-verbose mode
|
|
141
|
+
if output=$(timeout "$TIMEOUT" bash "$test_path" 2>&1); then
|
|
142
|
+
end_time=$(date +%s)
|
|
143
|
+
duration=$((end_time - start_time))
|
|
144
|
+
echo " [PASS] (${duration}s)"
|
|
145
|
+
passed=$((passed + 1))
|
|
146
|
+
else
|
|
147
|
+
exit_code=$?
|
|
148
|
+
end_time=$(date +%s)
|
|
149
|
+
duration=$((end_time - start_time))
|
|
150
|
+
if [ $exit_code -eq 124 ]; then
|
|
151
|
+
echo " [FAIL] (timeout after ${TIMEOUT}s)"
|
|
152
|
+
else
|
|
153
|
+
echo " [FAIL] (${duration}s)"
|
|
154
|
+
fi
|
|
155
|
+
echo ""
|
|
156
|
+
echo " Output:"
|
|
157
|
+
echo "$output" | sed 's/^/ /'
|
|
158
|
+
failed=$((failed + 1))
|
|
159
|
+
fi
|
|
160
|
+
fi
|
|
161
|
+
|
|
162
|
+
echo ""
|
|
163
|
+
done
|
|
164
|
+
|
|
165
|
+
# Print summary
|
|
166
|
+
echo "========================================"
|
|
167
|
+
echo " Test Results Summary"
|
|
168
|
+
echo "========================================"
|
|
169
|
+
echo ""
|
|
170
|
+
echo " Passed: $passed"
|
|
171
|
+
echo " Failed: $failed"
|
|
172
|
+
echo " Skipped: $skipped"
|
|
173
|
+
echo ""
|
|
174
|
+
|
|
175
|
+
if [ "$RUN_INTEGRATION" = false ] && [ ${#integration_tests[@]} -gt 0 ]; then
|
|
176
|
+
echo "Note: Integration tests were not run (they take 10-30 minutes)."
|
|
177
|
+
echo "Use --integration flag to run full workflow execution tests."
|
|
178
|
+
echo ""
|
|
179
|
+
fi
|
|
180
|
+
|
|
181
|
+
if [ $failed -gt 0 ]; then
|
|
182
|
+
echo "STATUS: FAILED"
|
|
183
|
+
exit 1
|
|
184
|
+
else
|
|
185
|
+
echo "STATUS: PASSED"
|
|
186
|
+
exit 0
|
|
187
|
+
fi
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Integration Test: Document Review System
|
|
3
|
+
# Actually runs spec/plan review and verifies reviewers catch issues
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
7
|
+
source "$SCRIPT_DIR/test-helpers.sh"
|
|
8
|
+
|
|
9
|
+
echo "========================================"
|
|
10
|
+
echo " Integration Test: Document Review System"
|
|
11
|
+
echo "========================================"
|
|
12
|
+
echo ""
|
|
13
|
+
echo "This test verifies the document review system by:"
|
|
14
|
+
echo " 1. Creating a spec with intentional errors"
|
|
15
|
+
echo " 2. Running the spec document reviewer"
|
|
16
|
+
echo " 3. Verifying the reviewer catches the errors"
|
|
17
|
+
echo ""
|
|
18
|
+
|
|
19
|
+
# Create test project
|
|
20
|
+
TEST_PROJECT=$(create_test_project)
|
|
21
|
+
echo "Test project: $TEST_PROJECT"
|
|
22
|
+
|
|
23
|
+
# Trap to cleanup
|
|
24
|
+
trap "cleanup_test_project $TEST_PROJECT" EXIT
|
|
25
|
+
|
|
26
|
+
cd "$TEST_PROJECT"
|
|
27
|
+
|
|
28
|
+
# Create directory structure
|
|
29
|
+
mkdir -p docs/superpowers/specs
|
|
30
|
+
|
|
31
|
+
# Create a spec document WITH INTENTIONAL ERRORS for the reviewer to catch
|
|
32
|
+
cat > docs/superpowers/specs/test-feature-design.md <<'EOF'
|
|
33
|
+
# Test Feature Design
|
|
34
|
+
|
|
35
|
+
## Overview
|
|
36
|
+
|
|
37
|
+
This is a test feature that does something useful.
|
|
38
|
+
|
|
39
|
+
## Requirements
|
|
40
|
+
|
|
41
|
+
1. The feature should work correctly
|
|
42
|
+
2. It should be fast
|
|
43
|
+
3. TODO: Add more requirements here
|
|
44
|
+
|
|
45
|
+
## Architecture
|
|
46
|
+
|
|
47
|
+
The feature will use a simple architecture with:
|
|
48
|
+
- A frontend component
|
|
49
|
+
- A backend service
|
|
50
|
+
- Error handling will be specified later once we understand the failure modes better
|
|
51
|
+
|
|
52
|
+
## Data Flow
|
|
53
|
+
|
|
54
|
+
Data flows from the frontend to the backend.
|
|
55
|
+
|
|
56
|
+
## Testing Strategy
|
|
57
|
+
|
|
58
|
+
Tests will be written to cover the main functionality.
|
|
59
|
+
EOF
|
|
60
|
+
|
|
61
|
+
# Initialize git repo
|
|
62
|
+
git init --quiet
|
|
63
|
+
git config user.email "test@test.com"
|
|
64
|
+
git config user.name "Test User"
|
|
65
|
+
git add .
|
|
66
|
+
git commit -m "Initial commit with test spec" --quiet
|
|
67
|
+
|
|
68
|
+
echo ""
|
|
69
|
+
echo "Created test spec with intentional errors:"
|
|
70
|
+
echo " - TODO placeholder in Requirements section"
|
|
71
|
+
echo " - 'specified later' deferral in Architecture section"
|
|
72
|
+
echo ""
|
|
73
|
+
echo "Running spec document reviewer..."
|
|
74
|
+
echo ""
|
|
75
|
+
|
|
76
|
+
# Run Claude to review the spec
|
|
77
|
+
OUTPUT_FILE="$TEST_PROJECT/claude-output.txt"
|
|
78
|
+
|
|
79
|
+
PROMPT="You are testing the spec document reviewer.
|
|
80
|
+
|
|
81
|
+
Read the spec-document-reviewer-prompt.md template in skills/brainstorming/ to understand the review format.
|
|
82
|
+
|
|
83
|
+
Then review the spec at $TEST_PROJECT/docs/superpowers/specs/test-feature-design.md using the criteria from that template.
|
|
84
|
+
|
|
85
|
+
Look for:
|
|
86
|
+
- TODOs, placeholders, 'TBD', incomplete sections
|
|
87
|
+
- Sections saying 'to be defined later' or 'will spec when X is done'
|
|
88
|
+
- Sections noticeably less detailed than others
|
|
89
|
+
|
|
90
|
+
Output your review in the format specified in the template."
|
|
91
|
+
|
|
92
|
+
echo "================================================================================"
|
|
93
|
+
cd "$SCRIPT_DIR/../.." && timeout 120 claude -p "$PROMPT" --permission-mode bypassPermissions 2>&1 | tee "$OUTPUT_FILE" || {
|
|
94
|
+
echo ""
|
|
95
|
+
echo "================================================================================"
|
|
96
|
+
echo "EXECUTION FAILED (exit code: $?)"
|
|
97
|
+
exit 1
|
|
98
|
+
}
|
|
99
|
+
echo "================================================================================"
|
|
100
|
+
|
|
101
|
+
echo ""
|
|
102
|
+
echo "Analyzing reviewer output..."
|
|
103
|
+
echo ""
|
|
104
|
+
|
|
105
|
+
# Verification tests
|
|
106
|
+
FAILED=0
|
|
107
|
+
|
|
108
|
+
echo "=== Verification Tests ==="
|
|
109
|
+
echo ""
|
|
110
|
+
|
|
111
|
+
# Test 1: Reviewer found the TODO
|
|
112
|
+
echo "Test 1: Reviewer found TODO..."
|
|
113
|
+
if grep -qi "TODO" "$OUTPUT_FILE" && grep -qi "requirements\|Requirements" "$OUTPUT_FILE"; then
|
|
114
|
+
echo " [PASS] Reviewer identified TODO in Requirements section"
|
|
115
|
+
else
|
|
116
|
+
echo " [FAIL] Reviewer did not identify TODO"
|
|
117
|
+
FAILED=$((FAILED + 1))
|
|
118
|
+
fi
|
|
119
|
+
echo ""
|
|
120
|
+
|
|
121
|
+
# Test 2: Reviewer found the "specified later" deferral
|
|
122
|
+
echo "Test 2: Reviewer found 'specified later' deferral..."
|
|
123
|
+
if grep -qi "specified later\|later\|defer\|incomplete\|error handling" "$OUTPUT_FILE"; then
|
|
124
|
+
echo " [PASS] Reviewer identified deferred content"
|
|
125
|
+
else
|
|
126
|
+
echo " [FAIL] Reviewer did not identify deferred content"
|
|
127
|
+
FAILED=$((FAILED + 1))
|
|
128
|
+
fi
|
|
129
|
+
echo ""
|
|
130
|
+
|
|
131
|
+
# Test 3: Reviewer output includes Issues section
|
|
132
|
+
echo "Test 3: Review output format..."
|
|
133
|
+
if grep -qi "issues\|Issues" "$OUTPUT_FILE"; then
|
|
134
|
+
echo " [PASS] Review includes Issues section"
|
|
135
|
+
else
|
|
136
|
+
echo " [FAIL] Review missing Issues section"
|
|
137
|
+
FAILED=$((FAILED + 1))
|
|
138
|
+
fi
|
|
139
|
+
echo ""
|
|
140
|
+
|
|
141
|
+
# Test 4: Reviewer did NOT approve (found issues)
|
|
142
|
+
echo "Test 4: Reviewer verdict..."
|
|
143
|
+
if grep -qi "Issues Found\|❌\|not approved\|issues found" "$OUTPUT_FILE"; then
|
|
144
|
+
echo " [PASS] Reviewer correctly found issues (not approved)"
|
|
145
|
+
elif grep -qi "Approved\|✅" "$OUTPUT_FILE" && ! grep -qi "Issues Found\|❌" "$OUTPUT_FILE"; then
|
|
146
|
+
echo " [FAIL] Reviewer incorrectly approved spec with errors"
|
|
147
|
+
FAILED=$((FAILED + 1))
|
|
148
|
+
else
|
|
149
|
+
echo " [PASS] Reviewer identified problems (ambiguous format but found issues)"
|
|
150
|
+
fi
|
|
151
|
+
echo ""
|
|
152
|
+
|
|
153
|
+
# Summary
|
|
154
|
+
echo "========================================"
|
|
155
|
+
echo " Test Summary"
|
|
156
|
+
echo "========================================"
|
|
157
|
+
echo ""
|
|
158
|
+
|
|
159
|
+
if [ $FAILED -eq 0 ]; then
|
|
160
|
+
echo "STATUS: PASSED"
|
|
161
|
+
echo "All verification tests passed!"
|
|
162
|
+
echo ""
|
|
163
|
+
echo "The spec document reviewer correctly:"
|
|
164
|
+
echo " ✓ Found TODO placeholder"
|
|
165
|
+
echo " ✓ Found 'specified later' deferral"
|
|
166
|
+
echo " ✓ Produced properly formatted review"
|
|
167
|
+
echo " ✓ Did not approve spec with errors"
|
|
168
|
+
exit 0
|
|
169
|
+
else
|
|
170
|
+
echo "STATUS: FAILED"
|
|
171
|
+
echo "Failed $FAILED verification tests"
|
|
172
|
+
echo ""
|
|
173
|
+
echo "Output saved to: $OUTPUT_FILE"
|
|
174
|
+
echo ""
|
|
175
|
+
echo "Review the output to see what went wrong."
|
|
176
|
+
exit 1
|
|
177
|
+
fi
|