@arimakouyou/spec-workflow-mcp 2.2.7
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/.claude-plugin/.mcp.json +8 -0
- package/.claude-plugin/agents/code-simplifier.md +80 -0
- package/.claude-plugin/agents/integ-test-auditor.md +91 -0
- package/.claude-plugin/agents/integ-test-worker.md +73 -0
- package/.claude-plugin/agents/parallel-worker.md +136 -0
- package/.claude-plugin/agents/review-worker.md +279 -0
- package/.claude-plugin/agents/unit-test-engineer.md +148 -0
- package/.claude-plugin/agents/wave-harness-worker.md +158 -0
- package/.claude-plugin/hooks/hooks.json +16 -0
- package/.claude-plugin/hooks/tasks-read-guard.sh +17 -0
- package/.claude-plugin/marketplace.json +33 -0
- package/.claude-plugin/plugin.json +11 -0
- package/.claude-plugin/rules/axum.md +154 -0
- package/.claude-plugin/rules/cargo-toml.md +63 -0
- package/.claude-plugin/rules/context7.md +17 -0
- package/.claude-plugin/rules/design-conformance.md +82 -0
- package/.claude-plugin/rules/design-principles.md +53 -0
- package/.claude-plugin/rules/diesel.md +176 -0
- package/.claude-plugin/rules/feedback-loop.md +33 -0
- package/.claude-plugin/rules/leptos.md +319 -0
- package/.claude-plugin/rules/project-architecture.md +134 -0
- package/.claude-plugin/rules/quality-checks.md +265 -0
- package/.claude-plugin/rules/rust-style.md +242 -0
- package/.claude-plugin/rules/security.md +67 -0
- package/.claude-plugin/rules/spec-workflow-enforcement.md +47 -0
- package/.claude-plugin/rules/valkey.md +167 -0
- package/.claude-plugin/skills/integration-test/SKILL.md +230 -0
- package/.claude-plugin/skills/integration-test/references/auditor-prompt.md +78 -0
- package/.claude-plugin/skills/integration-test/references/external-api-mock.md +98 -0
- package/.claude-plugin/skills/integration-test/references/fixture-catalog.md +155 -0
- package/.claude-plugin/skills/integration-test/references/parallel-execution.md +124 -0
- package/.claude-plugin/skills/integration-test/references/quality-gate.md +80 -0
- package/.claude-plugin/skills/integration-test/references/test-case-design.md +88 -0
- package/.claude-plugin/skills/integration-test/references/test-patterns.md +215 -0
- package/.claude-plugin/skills/integration-test/references/whiteboard-template.md +81 -0
- package/.claude-plugin/skills/integration-test/references/worker-prompt.md +70 -0
- package/.claude-plugin/skills/knowhow-capture/SKILL.md +143 -0
- package/.claude-plugin/skills/phase-review-team/SKILL.md +380 -0
- package/.claude-plugin/skills/spec-design/SKILL.md +282 -0
- package/.claude-plugin/skills/spec-e2e-implement/SKILL.md +259 -0
- package/.claude-plugin/skills/spec-impl-code/SKILL.md +101 -0
- package/.claude-plugin/skills/spec-impl-review/SKILL.md +115 -0
- package/.claude-plugin/skills/spec-impl-test-run/SKILL.md +98 -0
- package/.claude-plugin/skills/spec-impl-test-write/SKILL.md +121 -0
- package/.claude-plugin/skills/spec-implement/SKILL.md +822 -0
- package/.claude-plugin/skills/spec-requirements/SKILL.md +130 -0
- package/.claude-plugin/skills/spec-review/SKILL.md +274 -0
- package/.claude-plugin/skills/spec-tasks/SKILL.md +372 -0
- package/.claude-plugin/skills/spec-test-design/SKILL.md +233 -0
- package/.claude-plugin/skills/tdd-skills/SKILL.md +95 -0
- package/.claude-plugin/skills/tdd-skills/references/advanced-techniques.md +49 -0
- package/.claude-plugin/skills/tdd-skills/references/green-strategies.md +70 -0
- package/.claude-plugin/skills/tdd-skills/references/tdd-and-design.md +48 -0
- package/.claude-plugin/skills/tdd-skills/references/test-design.md +43 -0
- package/.claude-plugin/skills/tdd-skills/references/test-doubles.md +53 -0
- package/.claude-plugin/skills/tdd-skills/references/test-patterns.md +40 -0
- package/.claude-plugin/skills/tdd-skills-rust/SKILL.md +128 -0
- package/.claude-plugin/skills/tdd-skills-rust/references/advanced-techniques.md +205 -0
- package/.claude-plugin/skills/tdd-skills-rust/references/green-strategies.md +166 -0
- package/.claude-plugin/skills/tdd-skills-rust/references/tdd-and-design.md +215 -0
- package/.claude-plugin/skills/tdd-skills-rust/references/test-design.md +128 -0
- package/.claude-plugin/skills/tdd-skills-rust/references/test-doubles.md +208 -0
- package/.claude-plugin/skills/tdd-skills-rust/references/test-patterns.md +223 -0
- package/.claude-plugin/with-dashboard/.mcp.json +8 -0
- package/.claude-plugin/with-dashboard/plugin.json +10 -0
- package/CHANGELOG.md +1007 -0
- package/LICENSE +674 -0
- package/README.ja.md +380 -0
- package/README.md +437 -0
- package/dist/__tests__/config.test.d.ts +2 -0
- package/dist/__tests__/config.test.d.ts.map +1 -0
- package/dist/__tests__/config.test.js +264 -0
- package/dist/__tests__/config.test.js.map +1 -0
- package/dist/__tests__/index-args.test.d.ts +2 -0
- package/dist/__tests__/index-args.test.d.ts.map +1 -0
- package/dist/__tests__/index-args.test.js +43 -0
- package/dist/__tests__/index-args.test.js.map +1 -0
- package/dist/__tests__/index-entrypoint.test.d.ts +2 -0
- package/dist/__tests__/index-entrypoint.test.d.ts.map +1 -0
- package/dist/__tests__/index-entrypoint.test.js +23 -0
- package/dist/__tests__/index-entrypoint.test.js.map +1 -0
- package/dist/config.d.ts +26 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +188 -0
- package/dist/config.js.map +1 -0
- package/dist/core/__tests__/git-utils.test.d.ts +2 -0
- package/dist/core/__tests__/git-utils.test.d.ts.map +1 -0
- package/dist/core/__tests__/git-utils.test.js +179 -0
- package/dist/core/__tests__/git-utils.test.js.map +1 -0
- package/dist/core/__tests__/mdx-validator.test.d.ts +2 -0
- package/dist/core/__tests__/mdx-validator.test.d.ts.map +1 -0
- package/dist/core/__tests__/mdx-validator.test.js +42 -0
- package/dist/core/__tests__/mdx-validator.test.js.map +1 -0
- package/dist/core/__tests__/path-utils.test.d.ts +2 -0
- package/dist/core/__tests__/path-utils.test.d.ts.map +1 -0
- package/dist/core/__tests__/path-utils.test.js +342 -0
- package/dist/core/__tests__/path-utils.test.js.map +1 -0
- package/dist/core/__tests__/project-registry.test.d.ts +2 -0
- package/dist/core/__tests__/project-registry.test.d.ts.map +1 -0
- package/dist/core/__tests__/project-registry.test.js +62 -0
- package/dist/core/__tests__/project-registry.test.js.map +1 -0
- package/dist/core/__tests__/security-utils.test.d.ts +2 -0
- package/dist/core/__tests__/security-utils.test.d.ts.map +1 -0
- package/dist/core/__tests__/security-utils.test.js +657 -0
- package/dist/core/__tests__/security-utils.test.js.map +1 -0
- package/dist/core/__tests__/task-parser.test.d.ts +2 -0
- package/dist/core/__tests__/task-parser.test.d.ts.map +1 -0
- package/dist/core/__tests__/task-parser.test.js +222 -0
- package/dist/core/__tests__/task-parser.test.js.map +1 -0
- package/dist/core/__tests__/task-validator.test.d.ts +2 -0
- package/dist/core/__tests__/task-validator.test.d.ts.map +1 -0
- package/dist/core/__tests__/task-validator.test.js +308 -0
- package/dist/core/__tests__/task-validator.test.js.map +1 -0
- package/dist/core/archive-service.d.ts +10 -0
- package/dist/core/archive-service.d.ts.map +1 -0
- package/dist/core/archive-service.js +99 -0
- package/dist/core/archive-service.js.map +1 -0
- package/dist/core/dashboard-session.d.ts +49 -0
- package/dist/core/dashboard-session.d.ts.map +1 -0
- package/dist/core/dashboard-session.js +132 -0
- package/dist/core/dashboard-session.js.map +1 -0
- package/dist/core/git-utils.d.ts +25 -0
- package/dist/core/git-utils.d.ts.map +1 -0
- package/dist/core/git-utils.js +87 -0
- package/dist/core/git-utils.js.map +1 -0
- package/dist/core/global-dir.d.ts +44 -0
- package/dist/core/global-dir.d.ts.map +1 -0
- package/dist/core/global-dir.js +74 -0
- package/dist/core/global-dir.js.map +1 -0
- package/dist/core/implementation-log-migrator.d.ts +41 -0
- package/dist/core/implementation-log-migrator.d.ts.map +1 -0
- package/dist/core/implementation-log-migrator.js +258 -0
- package/dist/core/implementation-log-migrator.js.map +1 -0
- package/dist/core/mdx-validator.d.ts +14 -0
- package/dist/core/mdx-validator.d.ts.map +1 -0
- package/dist/core/mdx-validator.js +34 -0
- package/dist/core/mdx-validator.js.map +1 -0
- package/dist/core/parser.d.ts +11 -0
- package/dist/core/parser.d.ts.map +1 -0
- package/dist/core/parser.js +128 -0
- package/dist/core/parser.js.map +1 -0
- package/dist/core/path-utils.d.ts +68 -0
- package/dist/core/path-utils.d.ts.map +1 -0
- package/dist/core/path-utils.js +302 -0
- package/dist/core/path-utils.js.map +1 -0
- package/dist/core/project-registry.d.ts +94 -0
- package/dist/core/project-registry.d.ts.map +1 -0
- package/dist/core/project-registry.js +297 -0
- package/dist/core/project-registry.js.map +1 -0
- package/dist/core/security-utils.d.ts +99 -0
- package/dist/core/security-utils.d.ts.map +1 -0
- package/dist/core/security-utils.js +275 -0
- package/dist/core/security-utils.js.map +1 -0
- package/dist/core/task-parser.d.ts +90 -0
- package/dist/core/task-parser.d.ts.map +1 -0
- package/dist/core/task-parser.js +477 -0
- package/dist/core/task-parser.js.map +1 -0
- package/dist/core/task-validator.d.ts +37 -0
- package/dist/core/task-validator.d.ts.map +1 -0
- package/dist/core/task-validator.js +499 -0
- package/dist/core/task-validator.js.map +1 -0
- package/dist/core/workspace-initializer.d.ts +16 -0
- package/dist/core/workspace-initializer.d.ts.map +1 -0
- package/dist/core/workspace-initializer.js +168 -0
- package/dist/core/workspace-initializer.js.map +1 -0
- package/dist/dashboard/__tests__/approval-storage-path-resolution.test.d.ts +2 -0
- package/dist/dashboard/__tests__/approval-storage-path-resolution.test.d.ts.map +1 -0
- package/dist/dashboard/__tests__/approval-storage-path-resolution.test.js +78 -0
- package/dist/dashboard/__tests__/approval-storage-path-resolution.test.js.map +1 -0
- package/dist/dashboard/__tests__/multi-server-approvals-content.test.d.ts +2 -0
- package/dist/dashboard/__tests__/multi-server-approvals-content.test.d.ts.map +1 -0
- package/dist/dashboard/__tests__/multi-server-approvals-content.test.js +115 -0
- package/dist/dashboard/__tests__/multi-server-approvals-content.test.js.map +1 -0
- package/dist/dashboard/__tests__/watcher-error-handling.test.d.ts +2 -0
- package/dist/dashboard/__tests__/watcher-error-handling.test.d.ts.map +1 -0
- package/dist/dashboard/__tests__/watcher-error-handling.test.js +118 -0
- package/dist/dashboard/__tests__/watcher-error-handling.test.js.map +1 -0
- package/dist/dashboard/approval-storage.d.ts +139 -0
- package/dist/dashboard/approval-storage.d.ts.map +1 -0
- package/dist/dashboard/approval-storage.js +608 -0
- package/dist/dashboard/approval-storage.js.map +1 -0
- package/dist/dashboard/execution-history-manager.d.ts +52 -0
- package/dist/dashboard/execution-history-manager.d.ts.map +1 -0
- package/dist/dashboard/execution-history-manager.js +161 -0
- package/dist/dashboard/execution-history-manager.js.map +1 -0
- package/dist/dashboard/implementation-log-manager.d.ts +97 -0
- package/dist/dashboard/implementation-log-manager.d.ts.map +1 -0
- package/dist/dashboard/implementation-log-manager.js +617 -0
- package/dist/dashboard/implementation-log-manager.js.map +1 -0
- package/dist/dashboard/job-scheduler.d.ts +91 -0
- package/dist/dashboard/job-scheduler.d.ts.map +1 -0
- package/dist/dashboard/job-scheduler.js +321 -0
- package/dist/dashboard/job-scheduler.js.map +1 -0
- package/dist/dashboard/multi-server.d.ts +42 -0
- package/dist/dashboard/multi-server.d.ts.map +1 -0
- package/dist/dashboard/multi-server.js +1460 -0
- package/dist/dashboard/multi-server.js.map +1 -0
- package/dist/dashboard/parser.d.ts +18 -0
- package/dist/dashboard/parser.d.ts.map +1 -0
- package/dist/dashboard/parser.js +269 -0
- package/dist/dashboard/parser.js.map +1 -0
- package/dist/dashboard/project-manager.d.ts +82 -0
- package/dist/dashboard/project-manager.d.ts.map +1 -0
- package/dist/dashboard/project-manager.js +257 -0
- package/dist/dashboard/project-manager.js.map +1 -0
- package/dist/dashboard/public/assets/Inter-Bold-CD3Pr7BX.woff2 +0 -0
- package/dist/dashboard/public/assets/Inter-Medium-B_8v_WHh.woff2 +0 -0
- package/dist/dashboard/public/assets/Inter-Regular-DRVdRqcI.woff2 +0 -0
- package/dist/dashboard/public/assets/Inter-SemiBold-CtskMddL.woff2 +0 -0
- package/dist/dashboard/public/assets/JetBrainsMono-Bold-D4WEaHbo.woff2 +0 -0
- package/dist/dashboard/public/assets/JetBrainsMono-Medium-3S3k2nMz.woff2 +0 -0
- package/dist/dashboard/public/assets/JetBrainsMono-Regular-BQaDgvhP.woff2 +0 -0
- package/dist/dashboard/public/assets/Tableau10-B-NsZVaP.js +1 -0
- package/dist/dashboard/public/assets/apl-B4CMkyY2.js +1 -0
- package/dist/dashboard/public/assets/arc-a5wW942W.js +1 -0
- package/dist/dashboard/public/assets/array-BKyUJesY.js +1 -0
- package/dist/dashboard/public/assets/asciiarmor-Df11BRmG.js +1 -0
- package/dist/dashboard/public/assets/asn1-EdZsLKOL.js +1 -0
- package/dist/dashboard/public/assets/asterisk-B-8jnY81.js +1 -0
- package/dist/dashboard/public/assets/blockDiagram-c4efeb88-CvjTuK-w.js +118 -0
- package/dist/dashboard/public/assets/brainfuck-C4LP7Hcl.js +1 -0
- package/dist/dashboard/public/assets/c4Diagram-c83219d4-NwVQo5kf.js +10 -0
- package/dist/dashboard/public/assets/channel-Bi16YZhk.js +1 -0
- package/dist/dashboard/public/assets/classDiagram-beda092f-BmSeXDdU.js +2 -0
- package/dist/dashboard/public/assets/classDiagram-v2-2358418a-D7GvvuPr.js +2 -0
- package/dist/dashboard/public/assets/clike-B9uivgTg.js +1 -0
- package/dist/dashboard/public/assets/clojure-BMjYHr_A.js +1 -0
- package/dist/dashboard/public/assets/clone-BpKTiq7P.js +1 -0
- package/dist/dashboard/public/assets/cmake-BQqOBYOt.js +1 -0
- package/dist/dashboard/public/assets/cobol-CWcv1MsR.js +1 -0
- package/dist/dashboard/public/assets/coffeescript-S37ZYGWr.js +1 -0
- package/dist/dashboard/public/assets/commonlisp-DBKNyK5s.js +1 -0
- package/dist/dashboard/public/assets/createText-1719965b-qASbqHUP.js +7 -0
- package/dist/dashboard/public/assets/crystal-SjHAIU92.js +1 -0
- package/dist/dashboard/public/assets/css-BnMrqG3P.js +1 -0
- package/dist/dashboard/public/assets/cypher-C_CwsFkJ.js +1 -0
- package/dist/dashboard/public/assets/d-pRatUO7H.js +1 -0
- package/dist/dashboard/public/assets/diff-DbItnlRl.js +1 -0
- package/dist/dashboard/public/assets/dockerfile-BKs6k2Af.js +1 -0
- package/dist/dashboard/public/assets/dtd-DF_7sFjM.js +1 -0
- package/dist/dashboard/public/assets/dylan-DwRh75JA.js +1 -0
- package/dist/dashboard/public/assets/ebnf-CDyGwa7X.js +1 -0
- package/dist/dashboard/public/assets/ecl-Cabwm37j.js +1 -0
- package/dist/dashboard/public/assets/edges-96097737-BItTSnH7.js +4 -0
- package/dist/dashboard/public/assets/eiffel-CnydiIhH.js +1 -0
- package/dist/dashboard/public/assets/elm-vLlmbW-K.js +1 -0
- package/dist/dashboard/public/assets/erDiagram-0228fc6a-DT224olg.js +51 -0
- package/dist/dashboard/public/assets/erlang-BNw1qcRV.js +1 -0
- package/dist/dashboard/public/assets/factor-kuTfRLto.js +1 -0
- package/dist/dashboard/public/assets/fcl-Kvtd6kyn.js +1 -0
- package/dist/dashboard/public/assets/flowDb-c6c81e3f-D9_ukKtv.js +10 -0
- package/dist/dashboard/public/assets/flowDiagram-50d868cf-CylE8siG.js +4 -0
- package/dist/dashboard/public/assets/flowDiagram-v2-4f6560a1-B2O3JN7Y.js +1 -0
- package/dist/dashboard/public/assets/flowchart-elk-definition-6af322e1-BCaqFKf3.js +139 -0
- package/dist/dashboard/public/assets/forth-Ffai-XNe.js +1 -0
- package/dist/dashboard/public/assets/fortran-DYz_wnZ1.js +1 -0
- package/dist/dashboard/public/assets/ganttDiagram-a2739b55-WQUL1QW_.js +257 -0
- package/dist/dashboard/public/assets/gas-Bneqetm1.js +1 -0
- package/dist/dashboard/public/assets/gherkin-heZmZLOM.js +1 -0
- package/dist/dashboard/public/assets/gitGraphDiagram-82fe8481-CttZrdmr.js +70 -0
- package/dist/dashboard/public/assets/graph-Ch-rVueN.js +1 -0
- package/dist/dashboard/public/assets/groovy-D9Dt4D0W.js +1 -0
- package/dist/dashboard/public/assets/haskell-Cw1EW3IL.js +1 -0
- package/dist/dashboard/public/assets/haxe-H-WmDvRZ.js +1 -0
- package/dist/dashboard/public/assets/http-DBlCnlav.js +1 -0
- package/dist/dashboard/public/assets/idl-BEugSyMb.js +1 -0
- package/dist/dashboard/public/assets/index--kbPpDKv.js +1 -0
- package/dist/dashboard/public/assets/index-3scDwWm6.js +1 -0
- package/dist/dashboard/public/assets/index-5325376f-BL2zVOJU.js +1 -0
- package/dist/dashboard/public/assets/index-BZdjbO25.js +1 -0
- package/dist/dashboard/public/assets/index-BmA_batZ.js +1 -0
- package/dist/dashboard/public/assets/index-Bu0u99kF.js +2 -0
- package/dist/dashboard/public/assets/index-Ch-lr7F4.js +1 -0
- package/dist/dashboard/public/assets/index-ClgWbdoq.js +1 -0
- package/dist/dashboard/public/assets/index-CzLwOMQ_.js +3 -0
- package/dist/dashboard/public/assets/index-DAOEjGO7.js +1 -0
- package/dist/dashboard/public/assets/index-DXqf0B9c.js +1 -0
- package/dist/dashboard/public/assets/index-DegWdR16.js +1 -0
- package/dist/dashboard/public/assets/index-DiHyYGim.js +1 -0
- package/dist/dashboard/public/assets/index-DlZtG7I5.js +1 -0
- package/dist/dashboard/public/assets/index-DmhGE2M8.js +1 -0
- package/dist/dashboard/public/assets/index-QEGvld4x.js +1 -0
- package/dist/dashboard/public/assets/index-RfZPGAJu.js +1 -0
- package/dist/dashboard/public/assets/index-UybBj_7u.js +319 -0
- package/dist/dashboard/public/assets/index-bVekzPnl.js +7 -0
- package/dist/dashboard/public/assets/index-f5bysQzW.css +1 -0
- package/dist/dashboard/public/assets/infoDiagram-8eee0895-DjzkkE3o.js +7 -0
- package/dist/dashboard/public/assets/init-Gi6I4Gst.js +1 -0
- package/dist/dashboard/public/assets/javascript-iXu5QeM3.js +1 -0
- package/dist/dashboard/public/assets/journeyDiagram-c64418c1-CxPZkNdB.js +139 -0
- package/dist/dashboard/public/assets/julia-DuME0IfC.js +1 -0
- package/dist/dashboard/public/assets/katex-XbL3y5x-.js +261 -0
- package/dist/dashboard/public/assets/layout-DX7DNTRm.js +1 -0
- package/dist/dashboard/public/assets/line-DfvpmKOn.js +1 -0
- package/dist/dashboard/public/assets/linear-gQbBPHO5.js +1 -0
- package/dist/dashboard/public/assets/livescript-BwQOo05w.js +1 -0
- package/dist/dashboard/public/assets/lua-BgMRiT3U.js +1 -0
- package/dist/dashboard/public/assets/mathematica-DTrFuWx2.js +1 -0
- package/dist/dashboard/public/assets/mbox-CNhZ1qSd.js +1 -0
- package/dist/dashboard/public/assets/mindmap-definition-8da855dc-CNxmpyG6.js +415 -0
- package/dist/dashboard/public/assets/mirc-CjQqDB4T.js +1 -0
- package/dist/dashboard/public/assets/mllike-CXdrOF99.js +1 -0
- package/dist/dashboard/public/assets/modelica-Dc1JOy9r.js +1 -0
- package/dist/dashboard/public/assets/mscgen-BA5vi2Kp.js +1 -0
- package/dist/dashboard/public/assets/mumps-BT43cFF4.js +1 -0
- package/dist/dashboard/public/assets/nginx-DdIZxoE0.js +1 -0
- package/dist/dashboard/public/assets/nsis-LdVXkNf5.js +1 -0
- package/dist/dashboard/public/assets/ntriples-BfvgReVJ.js +1 -0
- package/dist/dashboard/public/assets/octave-Ck1zUtKM.js +1 -0
- package/dist/dashboard/public/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/dashboard/public/assets/oz-BzwKVEFT.js +1 -0
- package/dist/dashboard/public/assets/pascal--L3eBynH.js +1 -0
- package/dist/dashboard/public/assets/path-CbwjOpE9.js +1 -0
- package/dist/dashboard/public/assets/perl-CdXCOZ3F.js +1 -0
- package/dist/dashboard/public/assets/pieDiagram-a8764435-D-xy_NSA.js +35 -0
- package/dist/dashboard/public/assets/pig-CevX1Tat.js +1 -0
- package/dist/dashboard/public/assets/powershell-CFHJl5sT.js +1 -0
- package/dist/dashboard/public/assets/properties-C78fOPTZ.js +1 -0
- package/dist/dashboard/public/assets/protobuf-ChK-085T.js +1 -0
- package/dist/dashboard/public/assets/pug-DeIclll2.js +1 -0
- package/dist/dashboard/public/assets/puppet-DMA9R1ak.js +1 -0
- package/dist/dashboard/public/assets/python-BuPzkPfP.js +1 -0
- package/dist/dashboard/public/assets/q-pXgVlZs6.js +1 -0
- package/dist/dashboard/public/assets/quadrantDiagram-1e28029f-BoL2wzz0.js +7 -0
- package/dist/dashboard/public/assets/r-B6wPVr8A.js +1 -0
- package/dist/dashboard/public/assets/requirementDiagram-08caed73-BujFz0q1.js +52 -0
- package/dist/dashboard/public/assets/rpm-CTu-6PCP.js +1 -0
- package/dist/dashboard/public/assets/ruby-B2Rjki9n.js +1 -0
- package/dist/dashboard/public/assets/sankeyDiagram-a04cb91d-D03_NARm.js +8 -0
- package/dist/dashboard/public/assets/sas-B4kiWyti.js +1 -0
- package/dist/dashboard/public/assets/scheme-C41bIUwD.js +1 -0
- package/dist/dashboard/public/assets/sequenceDiagram-c5b8d532-B65eFcaT.js +122 -0
- package/dist/dashboard/public/assets/shell-CjFT_Tl9.js +1 -0
- package/dist/dashboard/public/assets/sieve-C3Gn_uJK.js +1 -0
- package/dist/dashboard/public/assets/simple-mode-GW_nhZxv.js +1 -0
- package/dist/dashboard/public/assets/smalltalk-CnHTOXQT.js +1 -0
- package/dist/dashboard/public/assets/solr-DehyRSwq.js +1 -0
- package/dist/dashboard/public/assets/sparql-DkYu6x3z.js +1 -0
- package/dist/dashboard/public/assets/spreadsheet-BCZA_wO0.js +1 -0
- package/dist/dashboard/public/assets/sql-D0XecflT.js +1 -0
- package/dist/dashboard/public/assets/stateDiagram-1ecb1508-BDbqu0Vl.js +1 -0
- package/dist/dashboard/public/assets/stateDiagram-v2-c2b004d7-CBHvk4b8.js +1 -0
- package/dist/dashboard/public/assets/stex-C3f8Ysf7.js +1 -0
- package/dist/dashboard/public/assets/styles-b4e223ce-CELsPqaO.js +160 -0
- package/dist/dashboard/public/assets/styles-ca3715f6-BRqMqT6F.js +207 -0
- package/dist/dashboard/public/assets/styles-d45a18b0-e8N-oLPy.js +116 -0
- package/dist/dashboard/public/assets/stylus-B533Al4x.js +1 -0
- package/dist/dashboard/public/assets/svgDrawCommon-b86b1483-vNDtmQc-.js +1 -0
- package/dist/dashboard/public/assets/swift-BzpIVaGY.js +1 -0
- package/dist/dashboard/public/assets/tcl-DVfN8rqt.js +1 -0
- package/dist/dashboard/public/assets/textile-CnDTJFAw.js +1 -0
- package/dist/dashboard/public/assets/tiddlywiki-DO-Gjzrf.js +1 -0
- package/dist/dashboard/public/assets/tiki-DGYXhP31.js +1 -0
- package/dist/dashboard/public/assets/timeline-definition-faaaa080-Dh2_A5VU.js +61 -0
- package/dist/dashboard/public/assets/toml-Bm5Em-hy.js +1 -0
- package/dist/dashboard/public/assets/troff-wAsdV37c.js +1 -0
- package/dist/dashboard/public/assets/ttcn-CfJYG6tj.js +1 -0
- package/dist/dashboard/public/assets/ttcn-cfg-B9xdYoR4.js +1 -0
- package/dist/dashboard/public/assets/turtle-B1tBg_DP.js +1 -0
- package/dist/dashboard/public/assets/vb-CmGdzxic.js +1 -0
- package/dist/dashboard/public/assets/vbscript-BuJXcnF6.js +1 -0
- package/dist/dashboard/public/assets/velocity-D8B20fx6.js +1 -0
- package/dist/dashboard/public/assets/verilog-C6RDOZhf.js +1 -0
- package/dist/dashboard/public/assets/vhdl-lSbBsy5d.js +1 -0
- package/dist/dashboard/public/assets/webidl-ZXfAyPTL.js +1 -0
- package/dist/dashboard/public/assets/xquery-DzFWVndE.js +1 -0
- package/dist/dashboard/public/assets/xychartDiagram-f5964ef8-B76v1AVF.js +7 -0
- package/dist/dashboard/public/assets/yacas-BJ4BC0dw.js +1 -0
- package/dist/dashboard/public/assets/z80-Hz9HOZM7.js +1 -0
- package/dist/dashboard/public/claude-icon-dark.svg +1 -0
- package/dist/dashboard/public/claude-icon.svg +1 -0
- package/dist/dashboard/public/index.html +16 -0
- package/dist/dashboard/settings-manager.d.ts +47 -0
- package/dist/dashboard/settings-manager.d.ts.map +1 -0
- package/dist/dashboard/settings-manager.js +180 -0
- package/dist/dashboard/settings-manager.js.map +1 -0
- package/dist/dashboard/utils.d.ts +31 -0
- package/dist/dashboard/utils.d.ts.map +1 -0
- package/dist/dashboard/utils.js +102 -0
- package/dist/dashboard/utils.js.map +1 -0
- package/dist/dashboard/watcher.d.ts +32 -0
- package/dist/dashboard/watcher.d.ts.map +1 -0
- package/dist/dashboard/watcher.js +173 -0
- package/dist/dashboard/watcher.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +380 -0
- package/dist/index.js.map +1 -0
- package/dist/markdown/templates/design-template.md +126 -0
- package/dist/markdown/templates/product-template.md +51 -0
- package/dist/markdown/templates/requirements-template.md +50 -0
- package/dist/markdown/templates/structure-template.md +145 -0
- package/dist/markdown/templates/tasks-template.md +100 -0
- package/dist/markdown/templates/tech-template.md +99 -0
- package/dist/markdown/templates/test-design-template.md +221 -0
- package/dist/prompts/create-spec.d.ts +3 -0
- package/dist/prompts/create-spec.d.ts.map +1 -0
- package/dist/prompts/create-spec.js +97 -0
- package/dist/prompts/create-spec.js.map +1 -0
- package/dist/prompts/create-steering-doc.d.ts +3 -0
- package/dist/prompts/create-steering-doc.d.ts.map +1 -0
- package/dist/prompts/create-steering-doc.js +75 -0
- package/dist/prompts/create-steering-doc.js.map +1 -0
- package/dist/prompts/implement-task.d.ts +3 -0
- package/dist/prompts/implement-task.d.ts.map +1 -0
- package/dist/prompts/implement-task.js +174 -0
- package/dist/prompts/implement-task.js.map +1 -0
- package/dist/prompts/index.d.ts +20 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +103 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/inject-spec-workflow-guide.d.ts +3 -0
- package/dist/prompts/inject-spec-workflow-guide.d.ts.map +1 -0
- package/dist/prompts/inject-spec-workflow-guide.js +60 -0
- package/dist/prompts/inject-spec-workflow-guide.js.map +1 -0
- package/dist/prompts/inject-steering-guide.d.ts +3 -0
- package/dist/prompts/inject-steering-guide.d.ts.map +1 -0
- package/dist/prompts/inject-steering-guide.js +64 -0
- package/dist/prompts/inject-steering-guide.js.map +1 -0
- package/dist/prompts/refresh-tasks.d.ts +3 -0
- package/dist/prompts/refresh-tasks.d.ts.map +1 -0
- package/dist/prompts/refresh-tasks.js +237 -0
- package/dist/prompts/refresh-tasks.js.map +1 -0
- package/dist/prompts/spec-status.d.ts +3 -0
- package/dist/prompts/spec-status.d.ts.map +1 -0
- package/dist/prompts/spec-status.js +77 -0
- package/dist/prompts/spec-status.js.map +1 -0
- package/dist/prompts/types.d.ts +13 -0
- package/dist/prompts/types.d.ts.map +1 -0
- package/dist/prompts/types.js +2 -0
- package/dist/prompts/types.js.map +1 -0
- package/dist/server.d.ts +17 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +175 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/__tests__/log-implementation-review-process.test.d.ts +2 -0
- package/dist/tools/__tests__/log-implementation-review-process.test.d.ts.map +1 -0
- package/dist/tools/__tests__/log-implementation-review-process.test.js +190 -0
- package/dist/tools/__tests__/log-implementation-review-process.test.js.map +1 -0
- package/dist/tools/__tests__/projectPath.test.d.ts +2 -0
- package/dist/tools/__tests__/projectPath.test.d.ts.map +1 -0
- package/dist/tools/__tests__/projectPath.test.js +187 -0
- package/dist/tools/__tests__/projectPath.test.js.map +1 -0
- package/dist/tools/approvals.d.ts +14 -0
- package/dist/tools/approvals.d.ts.map +1 -0
- package/dist/tools/approvals.js +505 -0
- package/dist/tools/approvals.js.map +1 -0
- package/dist/tools/index.d.ts +5 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +52 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/log-implementation.d.ts +5 -0
- package/dist/tools/log-implementation.d.ts.map +1 -0
- package/dist/tools/log-implementation.js +498 -0
- package/dist/tools/log-implementation.js.map +1 -0
- package/dist/tools/spec-status.d.ts +5 -0
- package/dist/tools/spec-status.d.ts.map +1 -0
- package/dist/tools/spec-status.js +192 -0
- package/dist/tools/spec-status.js.map +1 -0
- package/dist/tools/spec-workflow-guide.d.ts +5 -0
- package/dist/tools/spec-workflow-guide.d.ts.map +1 -0
- package/dist/tools/spec-workflow-guide.js +116 -0
- package/dist/tools/spec-workflow-guide.js.map +1 -0
- package/dist/tools/steering-guide.d.ts +5 -0
- package/dist/tools/steering-guide.d.ts.map +1 -0
- package/dist/tools/steering-guide.js +192 -0
- package/dist/tools/steering-guide.js.map +1 -0
- package/dist/types.d.ts +183 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +13 -0
- package/dist/types.js.map +1 -0
- package/package.json +106 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd-skills
|
|
3
|
+
description: "TDD principles and practices based on t-wada's teachings. Covers Red-Green-Refactor cycle, test structure, test doubles, boundary value testing, and design through TDD. Use when implementing tests, designing test strategies, or practicing TDD — regardless of language or framework."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**TDD Skills Active**
|
|
7
|
+
|
|
8
|
+
# TDD Skills
|
|
9
|
+
|
|
10
|
+
TDD principles and practices based on t-wada's (Takuto Wada) teachings.
|
|
11
|
+
|
|
12
|
+
## Core Principle
|
|
13
|
+
|
|
14
|
+
**TDD is a programming technique, not a testing technique.**
|
|
15
|
+
|
|
16
|
+
> "TDD transforms anxiety into boredom." — t-wada
|
|
17
|
+
|
|
18
|
+
## Red-Green-Refactor Cycle
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
RED: Write a failing test
|
|
22
|
+
↓
|
|
23
|
+
GREEN: Make it pass with minimal code
|
|
24
|
+
↓
|
|
25
|
+
REFACTOR: Clean up without changing behavior
|
|
26
|
+
↓
|
|
27
|
+
RED: Next test...
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Green Strategies
|
|
31
|
+
|
|
32
|
+
1. **Fake It**: Return a constant first (safest)
|
|
33
|
+
2. **Triangulation**: Generalize from multiple test cases
|
|
34
|
+
3. **Obvious Implementation**: Implement directly when the solution is clear
|
|
35
|
+
|
|
36
|
+
Details: [references/green-strategies.md](references/green-strategies.md)
|
|
37
|
+
|
|
38
|
+
## Test Structure (Given-When-Then)
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
// Given — set up preconditions
|
|
42
|
+
// When — perform the action
|
|
43
|
+
// Then — verify the outcome
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Test Naming
|
|
47
|
+
|
|
48
|
+
| Pattern | Example |
|
|
49
|
+
|---------|---------|
|
|
50
|
+
| `test_{action}_when_{condition}` | `test_returns_empty_when_no_users` |
|
|
51
|
+
| `test_{action}_raises_{error}_when_{condition}` | `test_raises_not_found_when_invalid_id` |
|
|
52
|
+
|
|
53
|
+
## Test Types
|
|
54
|
+
|
|
55
|
+
| Type | Target | Mocking | Speed |
|
|
56
|
+
|------|--------|---------|-------|
|
|
57
|
+
| Unit | Domain, Use Case | All deps | Fast |
|
|
58
|
+
| Integration | API, Repository | DB connection | Slow |
|
|
59
|
+
|
|
60
|
+
## Test Doubles
|
|
61
|
+
|
|
62
|
+
| Type | Purpose |
|
|
63
|
+
|------|---------|
|
|
64
|
+
| Stub | Return fixed values |
|
|
65
|
+
| Mock | Verify interactions |
|
|
66
|
+
| Fake | Lightweight implementation (e.g., in-memory store) |
|
|
67
|
+
|
|
68
|
+
Details: [references/test-doubles.md](references/test-doubles.md)
|
|
69
|
+
|
|
70
|
+
## F.I.R.S.T Principles
|
|
71
|
+
|
|
72
|
+
- **F**ast: Tests run quickly
|
|
73
|
+
- **I**ndependent: No test depends on another
|
|
74
|
+
- **R**epeatable: Same result every run
|
|
75
|
+
- **S**elf-Validating: Pass/fail without manual inspection
|
|
76
|
+
- **T**imely: Written before production code
|
|
77
|
+
|
|
78
|
+
## Troubleshooting
|
|
79
|
+
|
|
80
|
+
| Problem | Solution |
|
|
81
|
+
|---------|----------|
|
|
82
|
+
| Can't verify mock calls | Use spec-based mocks (e.g., `Mock(spec=Port)` in Python, typed mocks in TS) |
|
|
83
|
+
| Fixture loading errors | Ensure test config files are in the correct directory |
|
|
84
|
+
| Async test failures | Use the appropriate async test decorator/runner for your framework |
|
|
85
|
+
|
|
86
|
+
## References
|
|
87
|
+
|
|
88
|
+
| Priority | Document |
|
|
89
|
+
|----------|----------|
|
|
90
|
+
| High | [green-strategies.md](references/green-strategies.md) — Green strategies |
|
|
91
|
+
| High | [test-design.md](references/test-design.md) — Boundary value analysis |
|
|
92
|
+
| Mid | [test-patterns.md](references/test-patterns.md) — Test patterns |
|
|
93
|
+
| Mid | [test-doubles.md](references/test-doubles.md) — Test doubles |
|
|
94
|
+
| Low | [advanced-techniques.md](references/advanced-techniques.md) — Advanced techniques |
|
|
95
|
+
| Low | [tdd-and-design.md](references/tdd-and-design.md) — TDD and design |
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Advanced TDD Techniques
|
|
2
|
+
|
|
3
|
+
## Dealing with Uncertain Specifications
|
|
4
|
+
|
|
5
|
+
When specs are vague, start with concrete examples rather than abstract tests. Write a test for the simplest specific case, then expand.
|
|
6
|
+
|
|
7
|
+
**Bad**: `test_calculate_price` (too abstract, unclear what to assert)
|
|
8
|
+
**Good**: `test_calculate_price_single_item_no_discount` (concrete, actionable)
|
|
9
|
+
|
|
10
|
+
## Applying TDD to Legacy Code
|
|
11
|
+
|
|
12
|
+
1. Write characterization tests that capture current behavior
|
|
13
|
+
2. Refactor in small steps under test protection
|
|
14
|
+
3. Add new features using TDD
|
|
15
|
+
|
|
16
|
+
Characterization tests don't assert "correct" behavior — they assert "current" behavior, creating a safety net for refactoring.
|
|
17
|
+
|
|
18
|
+
## When Tests Get Complex
|
|
19
|
+
|
|
20
|
+
Complex tests signal complex code. Respond by:
|
|
21
|
+
1. Extracting test helper methods
|
|
22
|
+
2. Using Builder / Factory patterns for test data
|
|
23
|
+
3. Splitting the class under test (Single Responsibility)
|
|
24
|
+
|
|
25
|
+
## Anti-patterns
|
|
26
|
+
|
|
27
|
+
### 1. Skipping the test
|
|
28
|
+
Write the test first. Always.
|
|
29
|
+
|
|
30
|
+
### 2. Steps too large
|
|
31
|
+
If a test requires implementing multiple things at once, break it into smaller tests.
|
|
32
|
+
|
|
33
|
+
### 3. Testing trivial getters/setters
|
|
34
|
+
Test behavior, not data access. If a getter just returns a field, it doesn't need a dedicated test.
|
|
35
|
+
|
|
36
|
+
### 4. Testing private methods directly
|
|
37
|
+
Test through the public API. If a private method is complex enough to need its own test, it likely belongs in a separate class.
|
|
38
|
+
|
|
39
|
+
### 5. Test interdependence
|
|
40
|
+
Each test must work in isolation. No shared mutable state between tests.
|
|
41
|
+
|
|
42
|
+
## TODO List Technique
|
|
43
|
+
|
|
44
|
+
Keep a running list of test cases to write. Check them off as you go. Add new ideas as they arise during implementation.
|
|
45
|
+
|
|
46
|
+
Benefits:
|
|
47
|
+
- Stay focused on the current test
|
|
48
|
+
- Don't lose ideas
|
|
49
|
+
- Visible progress
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Green Strategies
|
|
2
|
+
|
|
3
|
+
Three strategies to make a failing test pass as quickly as possible.
|
|
4
|
+
|
|
5
|
+
## 1. Fake It
|
|
6
|
+
|
|
7
|
+
**Safest approach. Return a constant to make the test pass first.**
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
// Test: empty collection should have zero total
|
|
11
|
+
// Implementation: return 0 (hardcoded constant)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
When to use:
|
|
15
|
+
- Implementation path is unclear
|
|
16
|
+
- Complex logic is needed
|
|
17
|
+
- Building confidence in small steps
|
|
18
|
+
|
|
19
|
+
## 2. Triangulation
|
|
20
|
+
|
|
21
|
+
**Generalize from multiple test cases.**
|
|
22
|
+
|
|
23
|
+
Process:
|
|
24
|
+
1. First test → Fake It (return constant)
|
|
25
|
+
2. Add second test that breaks the constant
|
|
26
|
+
3. Generalize to pass both tests
|
|
27
|
+
4. Add more tests if needed
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
Test 1: empty → total is 0 → return 0
|
|
31
|
+
Test 2: one item(100) → total 100 → return sum(items)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
When to use:
|
|
35
|
+
- Unclear how to generalize
|
|
36
|
+
- Want tests to drive the design
|
|
37
|
+
- Need to avoid premature abstraction
|
|
38
|
+
|
|
39
|
+
## 3. Obvious Implementation
|
|
40
|
+
|
|
41
|
+
**Fastest but riskiest. Implement the real solution directly.**
|
|
42
|
+
|
|
43
|
+
When to use:
|
|
44
|
+
- Solution is trivially clear
|
|
45
|
+
- Simple logic
|
|
46
|
+
- Experienced with the problem domain
|
|
47
|
+
|
|
48
|
+
**If the test fails after "obvious" implementation, immediately fall back to Fake It.**
|
|
49
|
+
|
|
50
|
+
## Decision Flow
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Is the implementation obvious?
|
|
54
|
+
├─ Yes → Try Obvious Implementation
|
|
55
|
+
│ ├─ Passes → Done
|
|
56
|
+
│ └─ Fails → Fall back to Fake It
|
|
57
|
+
└─ No → Start with Fake It
|
|
58
|
+
├─ One test → Keep the fake
|
|
59
|
+
└─ Multiple tests → Triangulate to generalize
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Summary
|
|
63
|
+
|
|
64
|
+
| Strategy | Speed | Safety | When |
|
|
65
|
+
|----------|-------|--------|------|
|
|
66
|
+
| Fake It | Slow | High | Default choice, when unsure |
|
|
67
|
+
| Triangulation | Medium | High | Complex generalization |
|
|
68
|
+
| Obvious Implementation | Fast | Low | Only when trivially clear |
|
|
69
|
+
|
|
70
|
+
**When in doubt, Fake It. When experienced, go Obvious. When complex, Triangulate.**
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# TDD and Design
|
|
2
|
+
|
|
3
|
+
## TDD Is Also a Design Technique
|
|
4
|
+
|
|
5
|
+
Practicing TDD naturally leads to:
|
|
6
|
+
|
|
7
|
+
1. **YAGNI**: Only implement what tests require
|
|
8
|
+
2. **Single Responsibility**: Testable classes have clear responsibilities
|
|
9
|
+
3. **Dependency Inversion**: Test doubles push you toward interface-based design
|
|
10
|
+
4. **Loose Coupling**: Testable code has low coupling
|
|
11
|
+
|
|
12
|
+
## Testable vs Untestable Design
|
|
13
|
+
|
|
14
|
+
**Untestable** — direct dependencies on external systems (DB connections, HTTP clients, file system, clock) created inside the class.
|
|
15
|
+
|
|
16
|
+
**Testable** — dependencies injected through constructor/method parameters, allowing test doubles to be substituted.
|
|
17
|
+
|
|
18
|
+
## Design Benefits from TDD
|
|
19
|
+
|
|
20
|
+
### 1. Clear Interfaces
|
|
21
|
+
Writing tests first forces you to design a usable API from the caller's perspective.
|
|
22
|
+
|
|
23
|
+
### 2. Responsibility Separation
|
|
24
|
+
When a test becomes complex, the class under test has too many responsibilities. Split it.
|
|
25
|
+
|
|
26
|
+
### 3. Loose Coupling
|
|
27
|
+
Using test doubles naturally decouples components through interfaces/protocols.
|
|
28
|
+
|
|
29
|
+
## Testability Principles
|
|
30
|
+
|
|
31
|
+
### Inject external dependencies
|
|
32
|
+
Don't create dependencies internally. Accept them via constructor or parameters.
|
|
33
|
+
|
|
34
|
+
### Separate side effects from logic
|
|
35
|
+
Pure computation in one function, I/O in another. Test the pure part directly.
|
|
36
|
+
|
|
37
|
+
### Make behavior deterministic
|
|
38
|
+
Inject sources of non-determinism (time, randomness, UUIDs) so tests can control them.
|
|
39
|
+
|
|
40
|
+
## Design Patterns That Emerge from TDD
|
|
41
|
+
|
|
42
|
+
- **Strategy**: Injected behavior → naturally testable with different strategies
|
|
43
|
+
- **Repository**: Abstracted data access → swap real DB for in-memory Fake
|
|
44
|
+
- **Factory**: Complex object creation → isolated and testable
|
|
45
|
+
|
|
46
|
+
> "Writing good tests naturally leads to good design." — t-wada
|
|
47
|
+
|
|
48
|
+
**TDD = Design-Driven Development**
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Test Design
|
|
2
|
+
|
|
3
|
+
## Boundary Value Analysis
|
|
4
|
+
|
|
5
|
+
Bugs cluster around boundaries. Always test values at and around each boundary.
|
|
6
|
+
|
|
7
|
+
Example — age categories (0-17: minor, 18-64: adult, 65+: senior):
|
|
8
|
+
- Test 17, 18 (minor/adult boundary)
|
|
9
|
+
- Test 64, 65 (adult/senior boundary)
|
|
10
|
+
|
|
11
|
+
## Equivalence Partitioning
|
|
12
|
+
|
|
13
|
+
Group inputs that produce the same behavior, then test one representative from each group plus all boundary values.
|
|
14
|
+
|
|
15
|
+
Example — discount tiers (0-999: 0%, 1000-4999: 5%, 5000+: 10%):
|
|
16
|
+
- Representative: 500, 3000, 10000
|
|
17
|
+
- Boundaries: 999, 1000, 4999, 5000
|
|
18
|
+
|
|
19
|
+
## Test Naming
|
|
20
|
+
|
|
21
|
+
Use a consistent pattern that makes the test's purpose clear from the name:
|
|
22
|
+
|
|
23
|
+
| Pattern | Example |
|
|
24
|
+
|---------|---------|
|
|
25
|
+
| `test_{subject}_{condition}_{expected}` | `test_total_when_cart_empty_returns_zero` |
|
|
26
|
+
| `test_{action}_raises_{error}_when_{condition}` | `test_add_item_raises_error_when_negative_price` |
|
|
27
|
+
|
|
28
|
+
The name should explain what went wrong when the test fails.
|
|
29
|
+
|
|
30
|
+
## Error / Exception Testing
|
|
31
|
+
|
|
32
|
+
Always test error paths, not just happy paths:
|
|
33
|
+
- Invalid inputs
|
|
34
|
+
- Boundary violations
|
|
35
|
+
- Resource unavailability
|
|
36
|
+
- Verify both error type and error message content
|
|
37
|
+
|
|
38
|
+
## Summary
|
|
39
|
+
|
|
40
|
+
- Always test boundary values
|
|
41
|
+
- Use equivalence partitioning for efficiency
|
|
42
|
+
- Clear, descriptive naming
|
|
43
|
+
- Don't forget error cases
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Test Doubles
|
|
2
|
+
|
|
3
|
+
Isolate external dependencies to make tests fast and deterministic.
|
|
4
|
+
|
|
5
|
+
## Five Types
|
|
6
|
+
|
|
7
|
+
### 1. Dummy
|
|
8
|
+
Fills a required parameter but is never actually used.
|
|
9
|
+
|
|
10
|
+
### 2. Stub
|
|
11
|
+
Returns fixed values. Use when you need to control what a dependency returns.
|
|
12
|
+
|
|
13
|
+
Use for: DB results, API responses, config values.
|
|
14
|
+
|
|
15
|
+
### 3. Spy
|
|
16
|
+
Records calls for later verification. Use when you need to check that something happened (e.g., email sent, event emitted).
|
|
17
|
+
|
|
18
|
+
### 4. Mock
|
|
19
|
+
Sets expectations upfront and verifies interactions. Use when call verification is the point of the test.
|
|
20
|
+
|
|
21
|
+
**Mock vs Spy**: Mock verifies behavior expectations. Spy records and you assert later.
|
|
22
|
+
|
|
23
|
+
### 5. Fake
|
|
24
|
+
A lightweight working implementation (e.g., in-memory repository). Use for complex state interactions where stubs are too simple.
|
|
25
|
+
|
|
26
|
+
## Selection Guide
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
What are you testing?
|
|
30
|
+
├─ Return value only → Stub
|
|
31
|
+
├─ Was it called? → Mock
|
|
32
|
+
├─ Call history/details → Spy
|
|
33
|
+
├─ Complex state transitions → Fake
|
|
34
|
+
└─ Unused parameter → Dummy
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
| Scenario | Recommended | Reason |
|
|
38
|
+
|----------|-------------|--------|
|
|
39
|
+
| External API call | Stub / Mock | Fixed response, call verification |
|
|
40
|
+
| Database access | Fake / Stub | Speed, state management |
|
|
41
|
+
| Side effects (email, logs) | Spy / Mock | Verify it happened |
|
|
42
|
+
| Random values / time | Stub | Deterministic results |
|
|
43
|
+
| Complex business logic | Fake | Realistic behavior |
|
|
44
|
+
|
|
45
|
+
## Anti-pattern: Over-mocking
|
|
46
|
+
|
|
47
|
+
When everything is a mock, the test verifies nothing meaningful. Use real objects for the code under test; only mock external boundaries (I/O, network, time).
|
|
48
|
+
|
|
49
|
+
> "Prefer Stubs over Mocks. State verification is superior to behavior verification." — Martin Fowler
|
|
50
|
+
|
|
51
|
+
## Principle
|
|
52
|
+
|
|
53
|
+
**Use the simplest test double that works. When in doubt, start with a Stub.**
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Test Patterns
|
|
2
|
+
|
|
3
|
+
## Test Fixtures
|
|
4
|
+
|
|
5
|
+
Shared setup for tests. Use your framework's fixture mechanism (e.g., `@pytest.fixture`, `beforeEach`, `@BeforeEach`) to create common test data.
|
|
6
|
+
|
|
7
|
+
## Test Data Builder
|
|
8
|
+
|
|
9
|
+
Build complex objects fluently with sensible defaults. Only specify the fields relevant to each test.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
builder = UserBuilder().with_name("Alice").with_role("admin").build()
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Benefits:
|
|
16
|
+
- Tests highlight what matters, hide what doesn't
|
|
17
|
+
- Easy to create variations
|
|
18
|
+
- Centralized default values
|
|
19
|
+
|
|
20
|
+
## Parameterized Tests
|
|
21
|
+
|
|
22
|
+
Run the same test logic with multiple inputs. Use your framework's parameterization support (e.g., `@pytest.mark.parametrize`, `test.each`, `@ParameterizedTest`).
|
|
23
|
+
|
|
24
|
+
Best for: boundary values, equivalence classes, truth tables.
|
|
25
|
+
|
|
26
|
+
## One Concept Per Test
|
|
27
|
+
|
|
28
|
+
Each test should verify one logical concept. Multiple assertions are fine if they all verify the same concept.
|
|
29
|
+
|
|
30
|
+
**Bad**: One test that checks creation, update, and deletion.
|
|
31
|
+
**Good**: Separate tests for each operation.
|
|
32
|
+
|
|
33
|
+
**Exception**: Multiple assertions verifying one concept (e.g., checking both status code and response body of a single API call) are fine in one test.
|
|
34
|
+
|
|
35
|
+
## Summary
|
|
36
|
+
|
|
37
|
+
- Fixtures for shared setup
|
|
38
|
+
- Builder pattern for flexible test data
|
|
39
|
+
- Parameterization to reduce duplication
|
|
40
|
+
- One concept per test
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd-skills-rust
|
|
3
|
+
description: >
|
|
4
|
+
Rust-specific version of tdd-skills. Provides TDD principles and Rust implementation patterns based on t-wada's teachings.
|
|
5
|
+
Covers the Red-Green-Refactor cycle, test implementation using Rust testing features (#[test], mockall, rstest),
|
|
6
|
+
trait-based test double design, and boundary value test design.
|
|
7
|
+
Use when implementing tests, designing tests, or practicing TDD in Rust projects.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# TDD Skills (Rust)
|
|
11
|
+
|
|
12
|
+
> For foundational principles, see the language-agnostic `/tdd-skills`. This skill focuses on Rust-specific implementation patterns.
|
|
13
|
+
|
|
14
|
+
Provides TDD principles and practices based on the teachings of t-wada (Takuto Wada), aligned with Rust language features.
|
|
15
|
+
|
|
16
|
+
## Pre-check: Know-how Reference
|
|
17
|
+
|
|
18
|
+
Read relevant know-how such as testing from the Know-how INDEX under the `feedback-loop` rule.
|
|
19
|
+
Incorporate checklists and counter-examples into your test design.
|
|
20
|
+
|
|
21
|
+
## The Essence of TDD
|
|
22
|
+
|
|
23
|
+
TDD is a "programming technique," not a "technique for writing tests."
|
|
24
|
+
|
|
25
|
+
> "TDD is the art of turning anxiety into boredom." - t-wada
|
|
26
|
+
|
|
27
|
+
## Red-Green-Refactor Cycle
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
Red: Write a failing test
|
|
31
|
+
↓
|
|
32
|
+
Green: Make it pass with minimal code
|
|
33
|
+
↓
|
|
34
|
+
Refactor: Refactor
|
|
35
|
+
↓
|
|
36
|
+
Red: Next test...
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Green Strategies (3 Types)
|
|
40
|
+
|
|
41
|
+
1. **Fake It**: Return a constant first (safest)
|
|
42
|
+
2. **Triangulation**: Generalize from multiple tests
|
|
43
|
+
3. **Obvious Implementation**: Implement directly when the solution is clear
|
|
44
|
+
|
|
45
|
+
Details: [references/green-strategies.md](references/green-strategies.md)
|
|
46
|
+
|
|
47
|
+
## Test Structure (Given-When-Then)
|
|
48
|
+
|
|
49
|
+
```rust
|
|
50
|
+
#[cfg(test)]
|
|
51
|
+
mod tests {
|
|
52
|
+
use super::*;
|
|
53
|
+
use mockall::predicate::*;
|
|
54
|
+
|
|
55
|
+
#[test]
|
|
56
|
+
fn get_user_returns_entity_when_exists() {
|
|
57
|
+
// Given
|
|
58
|
+
let mut mock_repo = MockUserRepository::new();
|
|
59
|
+
mock_repo
|
|
60
|
+
.expect_find_by_id()
|
|
61
|
+
.with(eq(123))
|
|
62
|
+
.returning(|_| Ok(Some(User { id: 123, name: "Alice".into() })));
|
|
63
|
+
let query = UserQueryService::new(Box::new(mock_repo));
|
|
64
|
+
|
|
65
|
+
// When
|
|
66
|
+
let result = query.get_user_by_id(123).unwrap();
|
|
67
|
+
|
|
68
|
+
// Then
|
|
69
|
+
assert_eq!(result.id, 123);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Test Naming Conventions
|
|
75
|
+
|
|
76
|
+
| Pattern | Example |
|
|
77
|
+
|----------|-----|
|
|
78
|
+
| `{action}_when_{condition}` | `returns_empty_when_no_users` |
|
|
79
|
+
| `{action}_with_{input}` | `calculates_total_with_multiple_items` |
|
|
80
|
+
| `fails_when_{condition}` | `fails_when_invalid_id` |
|
|
81
|
+
|
|
82
|
+
In Rust, test functions do not require a `test_` prefix (identified by the `#[test]` attribute).
|
|
83
|
+
However, if used by convention, apply it consistently.
|
|
84
|
+
|
|
85
|
+
## Test Types
|
|
86
|
+
|
|
87
|
+
| Type | Target | Test Doubles | Speed |
|
|
88
|
+
|------|------|-------------|------|
|
|
89
|
+
| Unit | Domain, UseCase | trait-based mock/fake | Fast |
|
|
90
|
+
| Integration | API, Repository | Test DB + transaction | Slow |
|
|
91
|
+
|
|
92
|
+
## Test Doubles
|
|
93
|
+
|
|
94
|
+
| Type | Purpose | Rust Implementation |
|
|
95
|
+
|------|------|-------------|
|
|
96
|
+
| Stub | Return fixed values | trait impl or `mockall`'s `returning()` |
|
|
97
|
+
| Mock | Verify calls | `mockall`'s `expect_*()` |
|
|
98
|
+
| Fake | Lightweight implementation | `HashMap`-based InMemoryRepository |
|
|
99
|
+
|
|
100
|
+
Details: [references/test-doubles.md](references/test-doubles.md)
|
|
101
|
+
|
|
102
|
+
## F.I.R.S.T Principles
|
|
103
|
+
|
|
104
|
+
- **F**ast: Fast
|
|
105
|
+
- **I**ndependent: Independent
|
|
106
|
+
- **R**epeatable: Repeatable
|
|
107
|
+
- **S**elf-Validating: Self-validating
|
|
108
|
+
- **T**imely: Write before production code
|
|
109
|
+
|
|
110
|
+
## Troubleshooting
|
|
111
|
+
|
|
112
|
+
| Problem | Solution |
|
|
113
|
+
|------|--------|
|
|
114
|
+
| Mock type mismatch | Apply `#[automock]` to the trait, inject via `Box<dyn Trait>` |
|
|
115
|
+
| async tests not running | Use `#[tokio::test]` |
|
|
116
|
+
| Data interference between tests | Use `test_transaction` to rollback |
|
|
117
|
+
| Slow compilation | Isolate test-only code with `#[cfg(test)]` |
|
|
118
|
+
|
|
119
|
+
## Detailed References
|
|
120
|
+
|
|
121
|
+
| Document | Contents |
|
|
122
|
+
|------------|------|
|
|
123
|
+
| [green-strategies.md](references/green-strategies.md) | Green strategy details and practical examples |
|
|
124
|
+
| [test-design.md](references/test-design.md) | Boundary value analysis and equivalence partitioning |
|
|
125
|
+
| [test-patterns.md](references/test-patterns.md) | Fixtures and parameterized tests |
|
|
126
|
+
| [test-doubles.md](references/test-doubles.md) | Types of test doubles and when to use them |
|
|
127
|
+
| [tdd-and-design.md](references/tdd-and-design.md) | The effect of TDD on design |
|
|
128
|
+
| [advanced-techniques.md](references/advanced-techniques.md) | Legacy code handling and anti-patterns |
|