@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,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.rs"
|
|
4
|
+
- "**/Cargo.toml"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Project Architecture (Axum + Diesel + Valkey)
|
|
8
|
+
|
|
9
|
+
This rule defines the base architecture for a REST API backend configuration.
|
|
10
|
+
When using a Leptos full-stack configuration, the rules in `leptos.md` take precedence.
|
|
11
|
+
|
|
12
|
+
## Directory Structure
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
src/
|
|
16
|
+
├── main.rs # Entry point, server startup
|
|
17
|
+
├── config.rs # Environment variable and configuration loading
|
|
18
|
+
├── app_state.rs # AppState definition
|
|
19
|
+
├── error.rs # AppError definition (IntoResponse implementation)
|
|
20
|
+
├── db/
|
|
21
|
+
│ ├── mod.rs # DB pool initialization
|
|
22
|
+
│ └── repository/ # Repository layer (abstracts DB access)
|
|
23
|
+
│ ├── mod.rs
|
|
24
|
+
│ └── users.rs
|
|
25
|
+
├── cache/
|
|
26
|
+
│ ├── mod.rs # Valkey connection initialization
|
|
27
|
+
│ └── keys.rs # Key generation helpers
|
|
28
|
+
├── models/
|
|
29
|
+
│ ├── mod.rs
|
|
30
|
+
│ └── user.rs # Diesel models (Queryable, Insertable, etc.)
|
|
31
|
+
├── handlers/
|
|
32
|
+
│ ├── mod.rs
|
|
33
|
+
│ └── users.rs # Axum handlers
|
|
34
|
+
├── routes/
|
|
35
|
+
│ ├── mod.rs # Router configuration
|
|
36
|
+
│ └── users.rs
|
|
37
|
+
├── middleware/
|
|
38
|
+
│ ├── mod.rs
|
|
39
|
+
│ └── auth.rs # Authentication middleware
|
|
40
|
+
├── schema.rs # Diesel auto-generated
|
|
41
|
+
└── dto/
|
|
42
|
+
├── mod.rs
|
|
43
|
+
└── user.rs # Request/response types (Serialize, Deserialize)
|
|
44
|
+
migrations/
|
|
45
|
+
└── ...
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Layer Structure
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Handler (Axum) → Repository (Diesel/Valkey) → Database/Cache
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- **Handler**: Receives HTTP requests, performs validation, builds responses
|
|
55
|
+
- **Repository**: Data access logic. Encapsulates DB queries and cache operations
|
|
56
|
+
- **Model**: Diesel table mappings
|
|
57
|
+
- **DTO**: API request/response types (kept separate from Model)
|
|
58
|
+
|
|
59
|
+
## AppState
|
|
60
|
+
|
|
61
|
+
```rust
|
|
62
|
+
use diesel_async::pooled_connection::deadpool::Pool;
|
|
63
|
+
use diesel_async::AsyncPgConnection;
|
|
64
|
+
use redis::aio::ConnectionManager;
|
|
65
|
+
|
|
66
|
+
pub type DbPool = Pool<AsyncPgConnection>;
|
|
67
|
+
|
|
68
|
+
#[derive(Clone)]
|
|
69
|
+
pub struct AppState {
|
|
70
|
+
pub db_pool: DbPool,
|
|
71
|
+
pub valkey: ConnectionManager,
|
|
72
|
+
pub config: Arc<AppConfig>,
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Unified Error Type
|
|
77
|
+
|
|
78
|
+
```rust
|
|
79
|
+
use axum::http::StatusCode;
|
|
80
|
+
use axum::response::{IntoResponse, Response};
|
|
81
|
+
|
|
82
|
+
pub enum AppError {
|
|
83
|
+
NotFound,
|
|
84
|
+
BadRequest(String),
|
|
85
|
+
Unauthorized,
|
|
86
|
+
Conflict(String),
|
|
87
|
+
Internal(anyhow::Error),
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
impl From<diesel::result::Error> for AppError { /* ... */ }
|
|
91
|
+
impl From<redis::RedisError> for AppError { /* ... */ }
|
|
92
|
+
impl From<deadpool::managed::PoolError<deadpool_diesel::postgres::Manager>> for AppError { /* ... */ }
|
|
93
|
+
impl IntoResponse for AppError { /* ... */ }
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Dependency Guidelines
|
|
97
|
+
|
|
98
|
+
```toml
|
|
99
|
+
[dependencies]
|
|
100
|
+
axum = "0.8"
|
|
101
|
+
diesel = { version = "2.2", features = ["postgres"] }
|
|
102
|
+
diesel-async = { version = "0.5", features = ["postgres", "deadpool"] }
|
|
103
|
+
redis = { version = "0.27", features = ["tokio-comp", "connection-manager"] }
|
|
104
|
+
tokio = { version = "1", features = ["full"] }
|
|
105
|
+
tower = "0.5"
|
|
106
|
+
tower-http = { version = "0.6", features = ["trace", "cors", "timeout"] }
|
|
107
|
+
serde = { version = "1", features = ["derive"] }
|
|
108
|
+
serde_json = "1"
|
|
109
|
+
tracing = "0.1"
|
|
110
|
+
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
111
|
+
anyhow = "1"
|
|
112
|
+
dotenvy = "0.15"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Configuration Management
|
|
116
|
+
|
|
117
|
+
- Load from environment variables (`dotenvy` + `std::env`)
|
|
118
|
+
- Consolidate `DATABASE_URL`, `VALKEY_URL`, `HOST`, `PORT`, etc. into `AppConfig`
|
|
119
|
+
- Do not hardcode secrets (DB passwords, etc.) in code
|
|
120
|
+
- Switch configuration per environment using environment variables
|
|
121
|
+
|
|
122
|
+
## Logging and Tracing
|
|
123
|
+
|
|
124
|
+
- Use `tracing` + `tracing-subscriber`
|
|
125
|
+
- Output request logs with `tower_http::trace::TraceLayer`
|
|
126
|
+
- Control the log level with the `RUST_LOG` environment variable
|
|
127
|
+
- Use structured logging (`tracing::info!(user_id = %id, "User created")`)
|
|
128
|
+
|
|
129
|
+
## Testing Strategy
|
|
130
|
+
|
|
131
|
+
- Unit tests: Test the repository layer directly (test DB + transaction rollback)
|
|
132
|
+
- Integration tests: Test the full Axum app with `tower::ServiceExt`
|
|
133
|
+
- Provide a helper function to construct `AppState` for tests
|
|
134
|
+
- Use `test_transaction` to roll back the test DB
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.rs"
|
|
4
|
+
- "**/Cargo.toml"
|
|
5
|
+
- "**/package.json"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Quality Check Commands
|
|
9
|
+
|
|
10
|
+
Unified command specification for quality checks run by parallel-worker, review-worker, and other agents. All agents must use the commands defined in this rule.
|
|
11
|
+
|
|
12
|
+
## rustfmt
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
cargo fmt --all -- --check
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- Targets both `src` and `tests` (do not check only one of them)
|
|
19
|
+
- To auto-fix, run without `--check`: `cargo fmt --all`
|
|
20
|
+
|
|
21
|
+
## clippy
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
cargo clippy --quiet --all-targets -- -D warnings
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- `--all-targets`: Includes test code, benchmarks, and examples in the check
|
|
28
|
+
- `-D warnings`: Treats all warnings as errors
|
|
29
|
+
- `--quiet`: Suppresses progress output
|
|
30
|
+
|
|
31
|
+
## test
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
cargo test --quiet
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- Runs all tests (unit + integration)
|
|
38
|
+
- To run a specific test only: `cargo test --test {test_name} -- --nocapture`
|
|
39
|
+
|
|
40
|
+
## Leptos Full-Stack (WASM Frontend) Build Verification
|
|
41
|
+
|
|
42
|
+
When the project uses `cargo-leptos` (detected by `[package.metadata.leptos]` in `Cargo.toml`), the following additional checks are **required** after the standard checks above.
|
|
43
|
+
|
|
44
|
+
### cargo-leptos build (preferred)
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
cargo leptos build
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- Builds both SSR (server) and WASM (client) targets in a single command
|
|
51
|
+
- Catches WASM compilation errors that `cargo build` / `cargo test` alone cannot detect (they only compile for the host target)
|
|
52
|
+
- Must pass before any commit
|
|
53
|
+
|
|
54
|
+
### WASM-specific clippy (required fallback when cargo-leptos is unavailable)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
cargo clippy --target wasm32-unknown-unknown --no-default-features --features hydrate --quiet -- -D warnings
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- **Required** when `cargo-leptos` is not installed — WASM verification must not be skipped
|
|
61
|
+
- `--features hydrate`: Compiles only the client-side code path
|
|
62
|
+
- Detects WASM-incompatible API usage (e.g., `std::fs`, `std::net`, `tokio::spawn`)
|
|
63
|
+
|
|
64
|
+
### Detection and availability check for agents
|
|
65
|
+
|
|
66
|
+
Before running quality checks, agents must check for a Leptos full-stack configuration and tool availability:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Step 1: Detect Leptos project(ブラケット付きヘッダでマッチ)
|
|
70
|
+
grep -q '\[package.metadata.leptos\]' Cargo.toml 2>/dev/null
|
|
71
|
+
|
|
72
|
+
# Step 2: If Leptos detected, check cargo-leptos availability
|
|
73
|
+
cargo leptos --version 2>/dev/null
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
| Leptos detected | cargo-leptos available | Action |
|
|
77
|
+
|-----------------|----------------------|--------|
|
|
78
|
+
| No | — | Skip WASM checks |
|
|
79
|
+
| Yes | Yes | Run `cargo leptos build` |
|
|
80
|
+
| Yes | No | Run WASM-specific clippy as required fallback |
|
|
81
|
+
|
|
82
|
+
The full check order becomes:
|
|
83
|
+
|
|
84
|
+
1. `cargo fmt --all -- --check`
|
|
85
|
+
2. `cargo clippy --quiet --all-targets -- -D warnings`
|
|
86
|
+
3. `cargo test --quiet`
|
|
87
|
+
4. `cargo leptos build` OR WASM-specific clippy fallback (Leptos projects only)
|
|
88
|
+
|
|
89
|
+
## Node.js Task-Level Quality Checks
|
|
90
|
+
|
|
91
|
+
When the project is Node.js-based (detected by `package.json` existence without Rust indicators), use the following task-level quality checks.
|
|
92
|
+
|
|
93
|
+
### lint
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npx eslint . --max-warnings=0
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
- Falls back to `npx tsc --noEmit` if eslint is not configured
|
|
100
|
+
- If neither eslint nor TypeScript is configured, skip this check
|
|
101
|
+
|
|
102
|
+
### format
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npx prettier --check .
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
- Skip if prettier is not configured in the project
|
|
109
|
+
|
|
110
|
+
### test
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npm test
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
- Or `npx vitest run` / `npx jest` depending on the project's test runner
|
|
117
|
+
- To run a specific test: `npm test -- --testPathPattern={test_name}`
|
|
118
|
+
|
|
119
|
+
The full check order for Node.js projects:
|
|
120
|
+
|
|
121
|
+
1. `npx eslint . --max-warnings=0` (or `npx tsc --noEmit` fallback)
|
|
122
|
+
2. `npx prettier --check .`
|
|
123
|
+
3. `npm test`
|
|
124
|
+
|
|
125
|
+
## Integration Verification (Phase Review / Final E2E Gate)
|
|
126
|
+
|
|
127
|
+
Phase Review (3.5.1.5) および全Phase完了後の Final E2E Gate (セクション9) で実行する統合レベルの検証。
|
|
128
|
+
タスク単位の品質チェック(rustfmt, clippy, cargo test)とは独立したステップとして実行する。
|
|
129
|
+
|
|
130
|
+
### プロジェクトタイプ検出
|
|
131
|
+
|
|
132
|
+
以下の順で検出し、最初にマッチしたタイプを採用する:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# 1. Leptos フルスタック検出(ブラケット付きヘッダで誤検出を防止)
|
|
136
|
+
if grep -q '\[package.metadata.leptos\]' Cargo.toml 2>/dev/null; then
|
|
137
|
+
echo "leptos"
|
|
138
|
+
# 2. Rust API 検出(axum, actix-web, rocket 等)
|
|
139
|
+
elif grep -qE '(axum|actix-web|rocket)' Cargo.toml 2>/dev/null; then
|
|
140
|
+
echo "rust-api"
|
|
141
|
+
# 3. Node.js 検出
|
|
142
|
+
elif test -f package.json; then
|
|
143
|
+
echo "nodejs"
|
|
144
|
+
# 4. いずれにも該当しない
|
|
145
|
+
else
|
|
146
|
+
echo "generic"
|
|
147
|
+
fi
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Step B: ビルド検証(全プロジェクト共通・必須)
|
|
151
|
+
|
|
152
|
+
成果物のビルドが成功することを確認する。ビルド失敗は即座に FAIL とする。
|
|
153
|
+
|
|
154
|
+
| タイプ | コマンド | 備考 |
|
|
155
|
+
|--------|---------|------|
|
|
156
|
+
| Leptos | `cargo leptos build` | SSR + WASM 両方をビルド |
|
|
157
|
+
| Rust API | `cargo build` | リリースビルドは不要(デバッグビルドで十分) |
|
|
158
|
+
| Node.js | `npm run build` | `build` スクリプトが package.json に存在する場合のみ。存在しない場合は SKIP(FAIL ではない)とし、ログに「build スクリプトなし」と記録 |
|
|
159
|
+
| Generic | `cargo build` or `npm run build` | 検出可能なビルドコマンドを実行。該当コマンドがない場合は SKIP とする |
|
|
160
|
+
|
|
161
|
+
### Step C: 統合テスト実行(テストが存在する場合のみ)
|
|
162
|
+
|
|
163
|
+
統合テストファイルが存在する場合にのみ実行する。存在しない場合は SKIP(FAIL ではない)。
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Rust: 統合テストの存在確認(tests/ ディレクトリ内の .rs ファイル。e2e/ と unit/ は再帰的に除外)
|
|
167
|
+
# 検出対象: tests/integration*/ 配下の .rs ファイル、または tests/ 直下の .rs ファイル
|
|
168
|
+
find tests -type f -name '*.rs' ! -regex '.*/tests/\(e2e\|unit\)/.*' -print -quit 2>/dev/null
|
|
169
|
+
|
|
170
|
+
# Node.js: 統合テストスクリプトまたはファイルの存在確認
|
|
171
|
+
grep -q '"test:integration"' package.json 2>/dev/null || \
|
|
172
|
+
find tests test __tests__ -type f -name 'integration*' -print -quit 2>/dev/null
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
| タイプ | コマンド |
|
|
176
|
+
|--------|---------|
|
|
177
|
+
| Rust | `cargo test --tests --quiet` |
|
|
178
|
+
| Node.js(スクリプトあり) | `npm run test:integration` |
|
|
179
|
+
| Node.js(ファイルのみ) | `npm test -- --testPathPattern=integration` |
|
|
180
|
+
|
|
181
|
+
### Step D: スモークテスト(API プロジェクトのみ)
|
|
182
|
+
|
|
183
|
+
API サーバを一時的に起動し、ヘルスチェックエンドポイントへの疎通を確認する。
|
|
184
|
+
|
|
185
|
+
**コンテナベース(docker-compose.yml が存在する場合 — 優先):**
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# docker-compose でサービスを起動
|
|
189
|
+
docker-compose up -d
|
|
190
|
+
sleep 10
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
ヘルスチェック実行後:
|
|
194
|
+
```bash
|
|
195
|
+
docker-compose down
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**直接起動(docker-compose.yml が存在しない場合 — フォールバック):**
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# プロジェクトタイプに応じてサーバ起動コマンドを切り替え
|
|
202
|
+
if [ -f Cargo.toml ]; then
|
|
203
|
+
START_CMD="cargo run"
|
|
204
|
+
elif [ -f package.json ]; then
|
|
205
|
+
# package.json に dev スクリプトがあれば優先的に使用し、なければ start スクリプトを確認
|
|
206
|
+
if command -v node >/dev/null 2>&1 && \
|
|
207
|
+
node -e "const p=require('./package.json'); process.exit(p.scripts && p.scripts.dev ? 0 : 1)" >/dev/null 2>&1; then
|
|
208
|
+
START_CMD="npm run dev"
|
|
209
|
+
elif command -v node >/dev/null 2>&1 && \
|
|
210
|
+
node -e "const p=require('./package.json'); process.exit(p.scripts && p.scripts.start ? 0 : 1)" >/dev/null 2>&1; then
|
|
211
|
+
START_CMD="npm start"
|
|
212
|
+
else
|
|
213
|
+
echo "Step D: Node.js プロジェクトで start / dev スクリプトが存在しないため、スモークテストをスキップします。" >&2
|
|
214
|
+
exit 0
|
|
215
|
+
fi
|
|
216
|
+
else
|
|
217
|
+
echo "Step D: 対応するプロジェクトタイプ(Rust/Node.js)が見つからないため、スモークテストをスキップします。" >&2
|
|
218
|
+
exit 0
|
|
219
|
+
fi
|
|
220
|
+
|
|
221
|
+
# バックグラウンドでサーバ起動(新しいセッションで確実に停止可能にする)
|
|
222
|
+
setsid sh -c "$START_CMD" &
|
|
223
|
+
SERVER_PID=$!
|
|
224
|
+
trap "kill -- -$SERVER_PID 2>/dev/null; wait $SERVER_PID 2>/dev/null" EXIT
|
|
225
|
+
sleep 5
|
|
226
|
+
|
|
227
|
+
# ヘルスチェック(/health と /api/health を順に試行)
|
|
228
|
+
HEALTH_STATUS="000"
|
|
229
|
+
for ENDPOINT in "/health" "/api/health" "/healthz"; do
|
|
230
|
+
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:${PORT:-3000}${ENDPOINT}" 2>/dev/null)
|
|
231
|
+
if [ "$STATUS" = "200" ]; then
|
|
232
|
+
HEALTH_STATUS="200"
|
|
233
|
+
break
|
|
234
|
+
fi
|
|
235
|
+
done
|
|
236
|
+
|
|
237
|
+
# クリーンアップ
|
|
238
|
+
kill -- -$SERVER_PID 2>/dev/null
|
|
239
|
+
wait $SERVER_PID 2>/dev/null
|
|
240
|
+
|
|
241
|
+
# PASS/FAIL 判定
|
|
242
|
+
if [ "$HEALTH_STATUS" != "200" ]; then
|
|
243
|
+
echo "Step D: ヘルスチェック失敗 — いずれのエンドポイントからも 200 が返りませんでした。" >&2
|
|
244
|
+
exit 1
|
|
245
|
+
fi
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**スモークテストの SKIP 条件**(FAIL ではなく SKIP として扱う):
|
|
249
|
+
- ヘルスチェックエンドポイントが定義されていない(設計書に記載なし)
|
|
250
|
+
- 外部依存(DB、キャッシュ等)が必要でローカル起動できない
|
|
251
|
+
- サーバ起動コマンドが不明(Cargo.toml に `[[bin]]` セクションがない等)
|
|
252
|
+
- Node.js プロジェクトで `start` / `dev` スクリプトが存在しない
|
|
253
|
+
- 対応するプロジェクトタイプ(Rust/Node.js)が検出されない
|
|
254
|
+
|
|
255
|
+
SKIP 時は必ずログに理由を記録し、Expert Team Review で補完する。
|
|
256
|
+
|
|
257
|
+
### 統合検証の結果判定
|
|
258
|
+
|
|
259
|
+
| 結果 | 条件 | アクション |
|
|
260
|
+
|------|------|----------|
|
|
261
|
+
| **PASS** | ビルド成功 + 統合テスト全パス(or SKIP)+ スモーク OK(or SKIP) | 次ステップに進む |
|
|
262
|
+
| **FAIL (ビルド)** | ビルド失敗 | ビルドエラーを分析し、根本原因タスクを特定して差し戻し |
|
|
263
|
+
| **FAIL (統合テスト)** | 統合テスト失敗 | 失敗テストのエラーを分析。Phase内タスク → 差し戻し、前Phase → ユーザーエスカレート |
|
|
264
|
+
| **FAIL (スモーク)** | ヘルスチェック失敗(SKIP条件に該当しない場合) | 起動ログを分析し根本原因を特定して差し戻し |
|
|
265
|
+
| **SKIP** | 環境依存で実行不可 | ログに SKIP 理由を記録し、次ステップに進む。Expert Team Review で補完 |
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.rs"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Rust Coding Style Rules
|
|
7
|
+
|
|
8
|
+
Follow the official Rust Style Guide (https://doc.rust-lang.org/style-guide/).
|
|
9
|
+
Use `rustfmt` defaults as the baseline and adhere to the rules below.
|
|
10
|
+
|
|
11
|
+
## Formatting Basics
|
|
12
|
+
|
|
13
|
+
- Indentation: 4 spaces (no tabs)
|
|
14
|
+
- Max line width: 100 characters
|
|
15
|
+
- Comment lines: 80 characters (excluding indentation) or max width, whichever is smaller
|
|
16
|
+
- Use block indent, not visual indent
|
|
17
|
+
- No trailing whitespace
|
|
18
|
+
- Newline at end of file
|
|
19
|
+
|
|
20
|
+
## Trailing Commas
|
|
21
|
+
|
|
22
|
+
Use trailing commas in multi-line comma-separated lists. Omit them on single lines.
|
|
23
|
+
|
|
24
|
+
```rust
|
|
25
|
+
// Multi-line: trailing comma
|
|
26
|
+
function_call(
|
|
27
|
+
argument,
|
|
28
|
+
another_argument,
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
// Single line: no trailing comma
|
|
32
|
+
function_call(argument, another_argument)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Naming Conventions
|
|
36
|
+
|
|
37
|
+
| Item | Style | Example |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| Types, Traits, Enums | `UpperCamelCase` | `MyStruct`, `MyTrait` |
|
|
40
|
+
| Enum variants | `UpperCamelCase` | `Some`, `None` |
|
|
41
|
+
| Functions, Methods | `snake_case` | `do_something` |
|
|
42
|
+
| Local variables | `snake_case` | `my_var` |
|
|
43
|
+
| Struct fields | `snake_case` | `field_name` |
|
|
44
|
+
| Constants, immutable statics | `SCREAMING_SNAKE_CASE` | `MAX_SIZE` |
|
|
45
|
+
| Macros | `snake_case` | `my_macro!` |
|
|
46
|
+
| Modules | `snake_case` | `my_module` |
|
|
47
|
+
|
|
48
|
+
When a reserved word is needed as a name, use raw identifiers (`r#type`) or a trailing underscore (`type_`). Avoid misspelling (`typ`).
|
|
49
|
+
|
|
50
|
+
## Item Order in Files
|
|
51
|
+
|
|
52
|
+
1. `extern crate` statements
|
|
53
|
+
2. `use` statements (`self`/`super` first, glob imports last)
|
|
54
|
+
3. Module declarations (`mod foo;`)
|
|
55
|
+
4. Other items
|
|
56
|
+
|
|
57
|
+
## Function Definitions
|
|
58
|
+
|
|
59
|
+
```rust
|
|
60
|
+
// Fits on one line
|
|
61
|
+
fn foo(arg1: i32, arg2: i32) -> i32 {
|
|
62
|
+
...
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Does not fit: each argument on its own line
|
|
66
|
+
fn foo(
|
|
67
|
+
arg1: i32,
|
|
68
|
+
arg2: i32,
|
|
69
|
+
) -> i32 {
|
|
70
|
+
...
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
- No comments inside signatures
|
|
75
|
+
- When the argument list is multi-line, place each argument on its own line with a trailing comma
|
|
76
|
+
|
|
77
|
+
## Structs and Enums
|
|
78
|
+
|
|
79
|
+
```rust
|
|
80
|
+
struct Foo {
|
|
81
|
+
a: A,
|
|
82
|
+
b: B,
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
enum FooBar {
|
|
86
|
+
First(u32),
|
|
87
|
+
Second,
|
|
88
|
+
Error {
|
|
89
|
+
err: Box<Error>,
|
|
90
|
+
line: u32,
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
- Prefer unit structs: `struct Foo;` over `struct Foo {}` or `struct Foo()`
|
|
96
|
+
- When a field type is long, break after `:` with block indent
|
|
97
|
+
|
|
98
|
+
## Traits and Impls
|
|
99
|
+
|
|
100
|
+
```rust
|
|
101
|
+
trait Foo: Debug + Bar {}
|
|
102
|
+
|
|
103
|
+
impl Bar for Foo {
|
|
104
|
+
...
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
- When trait bounds are long, break before `+` with block indent
|
|
109
|
+
|
|
110
|
+
## Where Clauses
|
|
111
|
+
|
|
112
|
+
```rust
|
|
113
|
+
fn function<T, U>(args)
|
|
114
|
+
where
|
|
115
|
+
T: Bound,
|
|
116
|
+
U: AnotherBound,
|
|
117
|
+
{
|
|
118
|
+
body
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
- Place `where` right after the closing parenthesis (same line)
|
|
123
|
+
- Each constraint on its own line with block indent
|
|
124
|
+
- Use trailing commas
|
|
125
|
+
|
|
126
|
+
## Use Statements
|
|
127
|
+
|
|
128
|
+
```rust
|
|
129
|
+
use std::collections::HashMap;
|
|
130
|
+
use std::io::{self, Read, Write};
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
- Sort alphabetically (version sort) within groups
|
|
134
|
+
- Place `self` and `super` before other names
|
|
135
|
+
- Normalize unnecessary nesting: `use a::{b};` → `use a::b;`
|
|
136
|
+
|
|
137
|
+
## Expressions
|
|
138
|
+
|
|
139
|
+
### Block Expressions
|
|
140
|
+
- Empty blocks: `{}`
|
|
141
|
+
- Single-expression blocks may be one line in expression context: `let foo = { expr };`
|
|
142
|
+
|
|
143
|
+
### Closures
|
|
144
|
+
- Omit `{}` when possible
|
|
145
|
+
- `|arg1, arg2| expr`
|
|
146
|
+
|
|
147
|
+
### Method Chains
|
|
148
|
+
- When multi-line, break before `.` with block indent
|
|
149
|
+
|
|
150
|
+
```rust
|
|
151
|
+
let foo = bar
|
|
152
|
+
.baz?
|
|
153
|
+
.qux();
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Match Expressions
|
|
157
|
+
- Do not place `|` at the beginning of patterns
|
|
158
|
+
- Block indent each arm
|
|
159
|
+
- Single-expression arms on the same line; multiple statements use a block
|
|
160
|
+
|
|
161
|
+
```rust
|
|
162
|
+
match foo {
|
|
163
|
+
Foo::Bar => value,
|
|
164
|
+
Foo::Baz(x) => {
|
|
165
|
+
let y = process(x);
|
|
166
|
+
y.result()
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### If/Else
|
|
172
|
+
- Prefer expression form when possible
|
|
173
|
+
|
|
174
|
+
```rust
|
|
175
|
+
// Preferred
|
|
176
|
+
let x = if y { 1 } else { 0 };
|
|
177
|
+
|
|
178
|
+
// Avoid
|
|
179
|
+
let x;
|
|
180
|
+
if y { x = 1; } else { x = 0; }
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Types
|
|
184
|
+
|
|
185
|
+
- Break type expressions at the outermost scope
|
|
186
|
+
- Break trait bounds before `+`
|
|
187
|
+
|
|
188
|
+
```rust
|
|
189
|
+
// Preferred
|
|
190
|
+
Foo<
|
|
191
|
+
Bar,
|
|
192
|
+
Baz<Type1, Type2>,
|
|
193
|
+
>
|
|
194
|
+
|
|
195
|
+
// Avoid
|
|
196
|
+
Foo<Bar, Baz<
|
|
197
|
+
Type1,
|
|
198
|
+
Type2,
|
|
199
|
+
>>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Let Statements
|
|
203
|
+
|
|
204
|
+
```rust
|
|
205
|
+
let pattern: Type = expr;
|
|
206
|
+
|
|
207
|
+
// Long expression: break after =
|
|
208
|
+
let pattern: Type =
|
|
209
|
+
expr;
|
|
210
|
+
|
|
211
|
+
// Long type too: break after :
|
|
212
|
+
let pattern:
|
|
213
|
+
Type =
|
|
214
|
+
expr;
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Comments
|
|
218
|
+
|
|
219
|
+
- Prefer line comments (`//`) over block comments (`/* */`)
|
|
220
|
+
- Use `///` for doc comments (outer) and `//!` for module/crate-level docs only
|
|
221
|
+
- Single space after `//`
|
|
222
|
+
|
|
223
|
+
## Attributes
|
|
224
|
+
|
|
225
|
+
- Place each attribute on its own line
|
|
226
|
+
- Merge multiple `#[derive(...)]` into one
|
|
227
|
+
|
|
228
|
+
```rust
|
|
229
|
+
#[derive(Debug, Clone, PartialEq)]
|
|
230
|
+
#[repr(C)]
|
|
231
|
+
struct Foo { ... }
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Extern
|
|
235
|
+
|
|
236
|
+
- Always specify the ABI explicitly: `extern "C" fn` (avoid bare `extern fn`)
|
|
237
|
+
|
|
238
|
+
## General Advice
|
|
239
|
+
|
|
240
|
+
- Avoid `#[path]` attribute on modules
|
|
241
|
+
- Leverage expression-oriented programming (return values from `if`, `match`, etc.)
|
|
242
|
+
- Use `rustfmt` and `clippy` actively
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
always_apply: true
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Security Coding Standards
|
|
6
|
+
|
|
7
|
+
Security standards to apply during code reviews and implementation. Based on OWASP Top 10, including authentication and authorization.
|
|
8
|
+
|
|
9
|
+
## A1: Injection
|
|
10
|
+
|
|
11
|
+
- SQL: Build queries through an ORM query builder (e.g., Diesel). Do not embed external input into raw SQL via string concatenation
|
|
12
|
+
- Command injection: Do not pass user input directly to `Command::new()` or `exec`-style calls. Pass arguments individually using `.arg()`
|
|
13
|
+
- Path traversal: When including user input in file paths, validate against directory traversal (`../`)
|
|
14
|
+
|
|
15
|
+
## A2: Broken Authentication
|
|
16
|
+
|
|
17
|
+
- Apply authentication middleware to endpoints that require authentication (e.g., `route_layer`)
|
|
18
|
+
- Do not store passwords in plain text. Use hash functions such as bcrypt / argon2
|
|
19
|
+
- Generate session tokens / JWT using cryptographically secure random values
|
|
20
|
+
- Set token expiration and reject expired tokens
|
|
21
|
+
|
|
22
|
+
## A3: Broken Access Control
|
|
23
|
+
|
|
24
|
+
- Implement owner checks for resource access (users may only view/update their own data)
|
|
25
|
+
- IDOR (Insecure Direct Object Reference): Do not grant access based solely on the ID in path parameters. Validate the association with the authenticated user
|
|
26
|
+
- When role-based authorization is needed, centralize it in middleware or guard functions
|
|
27
|
+
- Verify that admin-only endpoints are inaccessible to regular users
|
|
28
|
+
|
|
29
|
+
## A4: Sensitive Data Exposure
|
|
30
|
+
|
|
31
|
+
- Do not include password hashes, internal IDs, stack traces, or DB error details in responses
|
|
32
|
+
- Explicitly define response types using DTOs; do not return Model objects directly
|
|
33
|
+
- Do not output sensitive information (passwords, tokens, personal data) to logs
|
|
34
|
+
- In production, use generic error messages that do not allow clients to infer internal implementation details
|
|
35
|
+
|
|
36
|
+
## A5: Input Validation
|
|
37
|
+
|
|
38
|
+
- Validate all input from request bodies, path parameters, and query parameters
|
|
39
|
+
- Set upper limits on string length (to prevent DoS)
|
|
40
|
+
- Return 400 Bad Request for type conversion errors (e.g., string → number)
|
|
41
|
+
- Use dedicated libraries for format validation of email addresses, URLs, dates, etc.
|
|
42
|
+
|
|
43
|
+
## A6: Security Headers and CORS
|
|
44
|
+
|
|
45
|
+
- Configure allowed origins explicitly for CORS (`CorsLayer::permissive()` is for development only)
|
|
46
|
+
- Validate Content-Type and reject requests with unexpected formats
|
|
47
|
+
|
|
48
|
+
## A7: Mass Assignment
|
|
49
|
+
|
|
50
|
+
- When converting DTO → Model, ensure that fields the client should not be able to update (`id`, `created_at`, `role`, etc.) are not modified
|
|
51
|
+
- When using `AsChangeset`, explicitly specify the fields to be updated
|
|
52
|
+
|
|
53
|
+
## A8: Rate Limiting
|
|
54
|
+
|
|
55
|
+
- Design rate limiting for public endpoints (login, registration, password reset)
|
|
56
|
+
- Consider lockout after repeated failures as a brute-force protection measure
|
|
57
|
+
|
|
58
|
+
## A9: Dependency Vulnerabilities
|
|
59
|
+
|
|
60
|
+
- Regularly check for known vulnerabilities using `cargo audit`
|
|
61
|
+
- Remove unused dependencies
|
|
62
|
+
|
|
63
|
+
## A10: Logging and Monitoring
|
|
64
|
+
|
|
65
|
+
- Log authentication failures, authorization failures, and validation errors
|
|
66
|
+
- Include sufficient context in logs (request ID, user ID)
|
|
67
|
+
- However, mask sensitive information (see A4)
|