@dsmm/dsmm 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -24
- package/agent-presets/dsmm-builder/agent.cordis.yml +1949 -39
- package/agent-presets/dsmm-builder/preset.yml +1 -1
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +436 -14
- package/agent-presets/dsmm-clarifier/preset.yml +1 -1
- package/agent-presets/dsmm-code-search/agent.cordis.yml +56 -14
- package/agent-presets/dsmm-code-search/preset.yml +1 -1
- package/agent-presets/dsmm-coding/agent.cordis.yml +588 -0
- package/agent-presets/dsmm-coding/preset.yml +3 -0
- package/agent-presets/dsmm-complex/agent.cordis.yml +1140 -0
- package/agent-presets/dsmm-complex/preset.yml +3 -0
- package/agent-presets/dsmm-creative/agent.cordis.yml +536 -12
- package/agent-presets/dsmm-creative/preset.yml +1 -1
- package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +1163 -0
- package/agent-presets/dsmm-cross-cutting/preset.yml +3 -0
- package/agent-presets/dsmm-deep/agent.cordis.yml +1173 -0
- package/agent-presets/dsmm-deep/preset.yml +3 -0
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +56 -14
- package/agent-presets/dsmm-doc-search/preset.yml +1 -1
- package/agent-presets/dsmm-documenting/agent.cordis.yml +581 -0
- package/agent-presets/dsmm-documenting/preset.yml +3 -0
- package/agent-presets/dsmm-frontend/agent.cordis.yml +580 -0
- package/agent-presets/dsmm-frontend/preset.yml +3 -0
- package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +572 -0
- package/agent-presets/dsmm-hard-reasoning/preset.yml +3 -0
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +56 -14
- package/agent-presets/dsmm-media-reader/preset.yml +1 -1
- package/agent-presets/dsmm-normal-task/agent.cordis.yml +546 -0
- package/agent-presets/dsmm-normal-task/preset.yml +3 -0
- package/agent-presets/dsmm-oracle/agent.cordis.yml +421 -12
- package/agent-presets/dsmm-oracle/preset.yml +1 -1
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +421 -12
- package/agent-presets/dsmm-oracle-2nd/preset.yml +1 -1
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +2023 -43
- package/agent-presets/dsmm-orchestrator/preset.yml +1 -1
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +416 -13
- package/agent-presets/dsmm-plan-critic/preset.yml +1 -1
- package/agent-presets/dsmm-planner/agent.cordis.yml +462 -13
- package/agent-presets/dsmm-planner/preset.yml +1 -1
- package/agent-presets/dsmm-quick/agent.cordis.yml +119 -0
- package/agent-presets/dsmm-quick/preset.yml +3 -0
- package/agent-presets/dsmm-research/agent.cordis.yml +141 -0
- package/agent-presets/dsmm-research/preset.yml +3 -0
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +420 -13
- package/agent-presets/dsmm-reviewer/preset.yml +1 -1
- package/cordis.patch.yml +1 -5
- package/docs/agent-presets.md +64 -15
- package/docs/compatibility.md +61 -13
- package/docs/design.md +41 -0
- package/docs/lsp.md +12 -2
- package/docs/migration-from-ocmm.md +8 -0
- package/docs/profiles.md +41 -15
- package/docs/releasing.md +78 -8
- package/docs/roadmap.md +6 -0
- package/docs/runtime-recovery.md +12 -0
- package/docs/safety-guards.md +7 -3
- package/docs/settings-status.md +148 -7
- package/docs/skill-sync.md +52 -14
- package/lib/client/DeploymentPage.d.ts +18 -0
- package/lib/client/DeploymentPage.js +120 -0
- package/lib/client/ProfilesSection.js +4 -2
- package/lib/client/deployment-controller.d.ts +50 -0
- package/lib/client/deployment-controller.js +193 -0
- package/lib/client/deployment-data.d.ts +16 -0
- package/lib/client/deployment-data.js +109 -0
- package/lib/client/deployment-locales.d.ts +66 -0
- package/lib/client/deployment-locales.js +72 -0
- package/lib/client/index.js +50 -0
- package/lib/client/locales.d.ts +4 -0
- package/lib/client/locales.js +4 -2
- package/lib/client/plugins-contract.d.ts +27 -0
- package/lib/client/plugins-contract.js +2 -0
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +16 -0
- package/lib/client.js +1048 -29
- package/lib/commands.js +3 -0
- package/lib/config-file-store.d.ts +23 -0
- package/lib/config-file-store.js +67 -0
- package/lib/deployment-config.d.ts +37 -0
- package/lib/deployment-config.js +184 -0
- package/lib/dsh-home.d.ts +3 -0
- package/lib/dsh-home.js +10 -0
- package/lib/dsh-types.d.ts +12 -65
- package/lib/guards.d.ts +2 -1
- package/lib/guards.js +19 -2
- package/lib/index.d.ts +8 -1
- package/lib/index.js +115 -25
- package/lib/lsp.d.ts +13 -0
- package/lib/lsp.js +60 -0
- package/lib/mode.js +42 -47
- package/lib/model-routing.js +5 -2
- package/lib/modules.d.ts +27 -0
- package/lib/modules.js +21 -0
- package/lib/native-scope.d.ts +9 -0
- package/lib/native-scope.js +20 -0
- package/lib/plan-validation.js +6 -44
- package/lib/preset-materializer.js +2 -0
- package/lib/preset-registry.d.ts +1 -1
- package/lib/preset-registry.js +7 -4
- package/lib/preset-skills.d.ts +4 -1
- package/lib/preset-skills.js +60 -19
- package/lib/profile-remote.d.ts +14 -0
- package/lib/profile-remote.js +197 -4
- package/lib/profile-rpc.d.ts +24 -1
- package/lib/profile-rpc.js +139 -1
- package/lib/profile-runtime.d.ts +24 -0
- package/lib/profile-runtime.js +177 -33
- package/lib/profile-store.d.ts +45 -1
- package/lib/profile-store.js +236 -102
- package/lib/profile-types.d.ts +55 -0
- package/lib/prompt-content.d.ts +25 -0
- package/lib/prompt-content.js +27 -0
- package/lib/prompts.d.ts +8 -2
- package/lib/prompts.js +46 -34
- package/lib/role-policy.d.ts +51 -0
- package/lib/role-policy.js +224 -0
- package/lib/role-providers.d.ts +6 -2
- package/lib/role-providers.js +72 -39
- package/lib/role-subagents.d.ts +6 -2
- package/lib/role-subagents.js +187 -48
- package/lib/roles.d.ts +16 -4
- package/lib/roles.js +86 -186
- package/lib/runtime-recovery.js +16 -5
- package/lib/session-scope.js +2 -0
- package/lib/settings.d.ts +69 -1
- package/lib/settings.js +262 -91
- package/lib/skills.d.ts +24 -9
- package/lib/skills.js +114 -35
- package/lib/state.d.ts +10 -6
- package/lib/state.js +48 -49
- package/lib/status.d.ts +25 -0
- package/lib/status.js +47 -9
- package/locale/en.json +2 -2
- package/locale/zh.json +2 -2
- package/package.json +19 -2
- package/prompts/deepwork.md +144 -20
- package/prompts/source/agents/clarifier.md +45 -0
- package/prompts/source/agents/orchestrator.md +63 -0
- package/prompts/source/agents/plan-critic.md +25 -0
- package/prompts/source/agents/planner.md +19 -0
- package/prompts/source/agents/reviewer.md +17 -0
- package/prompts/source/catalog.json +548 -0
- package/prompts/source/category/coding.md +46 -0
- package/prompts/source/category/complex.md +29 -0
- package/prompts/source/category/creative.md +38 -0
- package/prompts/source/category/cross-cutting.md +52 -0
- package/prompts/source/category/deep.md +62 -0
- package/prompts/source/category/documenting.md +62 -0
- package/prompts/source/category/frontend.md +38 -0
- package/prompts/source/category/hard-reasoning.md +53 -0
- package/prompts/source/category/normal-task.md +27 -0
- package/prompts/source/category/quick.md +34 -0
- package/prompts/source/category/research.md +56 -0
- package/prompts/source/deepwork/claude-opus-5.md +28 -0
- package/prompts/source/deepwork/codex.md +9 -0
- package/prompts/source/deepwork/default.md +129 -0
- package/prompts/source/deepwork/gemini.md +184 -0
- package/prompts/source/deepwork/glm.md +256 -0
- package/prompts/source/deepwork/gpt.md +43 -0
- package/prompts/source/deepwork/kimi-k27.md +13 -0
- package/prompts/source/deepwork/planner.md +41 -0
- package/prompts/source/deepwork/swe-2.md +13 -0
- package/prompts/source/manifest.json +3118 -0
- package/prompts/source/shared/dsh-host-contract.md +6 -0
- package/prompts/source/shared/locale.md +8 -0
- package/prompts/source/shared/shell-safety.md +7 -0
- package/prompts/source/terminal/builder.md +13 -0
- package/prompts/source/terminal/clarifier.md +41 -0
- package/prompts/source/terminal/code-search.md +39 -0
- package/prompts/source/terminal/coding.md +41 -0
- package/prompts/source/terminal/complex.md +43 -0
- package/prompts/source/terminal/creative.md +41 -0
- package/prompts/source/terminal/cross-cutting.md +43 -0
- package/prompts/source/terminal/deep.md +43 -0
- package/prompts/source/terminal/doc-search.md +39 -0
- package/prompts/source/terminal/documenting.md +41 -0
- package/prompts/source/terminal/frontend.md +41 -0
- package/prompts/source/terminal/hard-reasoning.md +41 -0
- package/prompts/source/terminal/media-reader.md +39 -0
- package/prompts/source/terminal/normal-task.md +41 -0
- package/prompts/source/terminal/oracle-2nd.md +53 -0
- package/prompts/source/terminal/oracle.md +53 -0
- package/prompts/source/terminal/orchestrator.md +26 -0
- package/prompts/source/terminal/plan-critic.md +41 -0
- package/prompts/source/terminal/planner.md +42 -0
- package/prompts/source/terminal/quick.md +39 -0
- package/prompts/source/terminal/research.md +39 -0
- package/prompts/source/terminal/reviewer.md +53 -0
- package/skills/ast-grep/LICENSE +21 -0
- package/skills/ast-grep/README.md +138 -0
- package/skills/ast-grep/SKILL.md +284 -0
- package/skills/ast-grep/SOURCE +1 -0
- package/skills/ast-grep/install.ps1 +235 -0
- package/skills/ast-grep/install.sh +286 -0
- package/skills/ast-grep/references/cli.md +233 -0
- package/skills/ast-grep/references/install.md +168 -0
- package/skills/ast-grep/references/patterns.md +149 -0
- package/skills/ast-grep/references/pitfalls.md +305 -0
- package/skills/ast-grep/references/recipes.md +404 -0
- package/skills/ast-grep/references/sgconfig.md +250 -0
- package/skills/ast-grep/references/yaml-rules.md +511 -0
- package/skills/ast-grep/scripts/ast_grep_helper.py +760 -0
- package/skills/ast-grep/tests/smoke.ps1 +129 -0
- package/skills/ast-grep/tests/smoke.sh +212 -0
- package/skills/ast-grep/tests/test_resolver.py +154 -0
- package/skills/brainstorming/SKILL.md +102 -9
- package/skills/coding-agent-sessions/LICENSE-UPSTREAM.md +82 -0
- package/skills/coding-agent-sessions/NOTICE.md +24 -0
- package/skills/coding-agent-sessions/SKILL.md +144 -0
- package/skills/coding-agent-sessions/agents/openai.yaml +4 -0
- package/skills/coding-agent-sessions/pyrightconfig.json +5 -0
- package/skills/coding-agent-sessions/references/all-platforms.md +77 -0
- package/skills/coding-agent-sessions/references/claude.md +34 -0
- package/skills/coding-agent-sessions/references/codex.md +32 -0
- package/skills/coding-agent-sessions/references/opencode.md +45 -0
- package/skills/coding-agent-sessions/references/senpi.md +29 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/__init__.py +1 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/aside_scanner.py +140 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/claude.py +66 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +283 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/codex.py +105 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/file_scanners.py +275 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/jsonio.py +55 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/kiro_scanner.py +91 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/opencode.py +289 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +104 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_optional_scanners.py +203 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_scanners.py +177 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/timeparse.py +51 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/transcript.py +149 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/types.py +57 -0
- package/skills/coding-agent-sessions/scripts/find-agent-sessions.py +19 -0
- package/skills/coding-agent-sessions/scripts/tests/test_agent_sessions.py +322 -0
- package/skills/coding-agent-sessions/scripts/tests/test_aside_scanner.py +131 -0
- package/skills/coding-agent-sessions/scripts/tests/test_cli_contract.py +126 -0
- package/skills/coding-agent-sessions/scripts/tests/test_extended_scanners.py +262 -0
- package/skills/coding-agent-sessions/scripts/tests/test_optional_sqlite_scanners.py +79 -0
- package/skills/coding-agent-sessions/scripts/tests/test_pi_family_scanners.py +130 -0
- package/skills/debugging/SKILL.md +125 -4
- package/skills/debugging/references/logging.md +2 -0
- package/skills/debugging/references/methodology/00-setup.md +2 -0
- package/skills/debugging/references/methodology/02-investigate.md +8 -2
- package/skills/debugging/references/methodology/03-flaky-triage.md +3 -1
- package/skills/debugging/references/methodology/04-hard-reasoning-escalation.md +4 -2
- package/skills/debugging/references/methodology/05-escalate.md +2 -0
- package/skills/debugging/references/methodology/06-fix.md +2 -0
- package/skills/debugging/references/methodology/08-qa.md +2 -0
- package/skills/debugging/references/methodology/09-cleanup.md +2 -0
- package/skills/debugging/references/methodology/partial-runtime-evidence.md +4 -2
- package/skills/debugging/references/runtimes/bundled-js-binary.md +2 -0
- package/skills/debugging/references/runtimes/go.md +2 -0
- package/skills/debugging/references/runtimes/native-binary.md +2 -0
- package/skills/debugging/references/runtimes/node.md +2 -0
- package/skills/debugging/references/runtimes/python.md +2 -0
- package/skills/debugging/references/runtimes/rust.md +2 -0
- package/skills/debugging/references/scripts/dap.test.mjs +539 -0
- package/skills/debugging/references/scripts/fixture-adapter.mjs +164 -0
- package/skills/debugging/references/tools/dap.md +3 -1
- package/skills/debugging/references/tools/ghidra.md +2 -0
- package/skills/debugging/references/tools/playwright-cli.md +2 -0
- package/skills/debugging/references/tools/pwndbg.md +2 -0
- package/skills/debugging/references/tools/pwntools.md +2 -0
- package/skills/dispatching-parallel-agents/SKILL.md +94 -7
- package/skills/frontend/.frontend-materialized.json +856 -0
- package/skills/frontend/ATTRIBUTION.md +37 -0
- package/skills/frontend/LICENSE-Apache-2.0.txt +201 -0
- package/skills/frontend/LICENSE-taste-skill.txt +21 -0
- package/skills/frontend/LICENSE-ui-ux-pro-max.txt +21 -0
- package/skills/frontend/SKILL.md +142 -0
- package/skills/frontend/references/design/README.md +256 -0
- package/skills/frontend/references/design/_INDEX.md +206 -0
- package/skills/frontend/references/design/airbnb.md +393 -0
- package/skills/frontend/references/design/airtable.md +92 -0
- package/skills/frontend/references/design/apple.md +250 -0
- package/skills/frontend/references/design/aside.md +211 -0
- package/skills/frontend/references/design/binance.md +348 -0
- package/skills/frontend/references/design/bmw.md +183 -0
- package/skills/frontend/references/design/brutalist-skill.md +92 -0
- package/skills/frontend/references/design/bugatti.md +271 -0
- package/skills/frontend/references/design/cal.md +262 -0
- package/skills/frontend/references/design/claude.md +315 -0
- package/skills/frontend/references/design/clay.md +307 -0
- package/skills/frontend/references/design/clickhouse.md +284 -0
- package/skills/frontend/references/design/clone-from-url.md +69 -0
- package/skills/frontend/references/design/cohere.md +269 -0
- package/skills/frontend/references/design/coinbase.md +132 -0
- package/skills/frontend/references/design/composio.md +310 -0
- package/skills/frontend/references/design/cursor.md +312 -0
- package/skills/frontend/references/design/design-system-architecture.md +250 -0
- package/skills/frontend/references/design/elevenlabs.md +268 -0
- package/skills/frontend/references/design/expo.md +284 -0
- package/skills/frontend/references/design/ferrari.md +317 -0
- package/skills/frontend/references/design/figma.md +223 -0
- package/skills/frontend/references/design/framer.md +249 -0
- package/skills/frontend/references/design/gpt-tasteskill.md +74 -0
- package/skills/frontend/references/design/hashicorp.md +281 -0
- package/skills/frontend/references/design/ibm.md +335 -0
- package/skills/frontend/references/design/image-to-code-skill.md +1228 -0
- package/skills/frontend/references/design/imagegen-brandkit.md +798 -0
- package/skills/frontend/references/design/imagegen-frontend-mobile.md +1465 -0
- package/skills/frontend/references/design/imagegen-frontend-web.md +987 -0
- package/skills/frontend/references/design/interaction-skill.md +52 -0
- package/skills/frontend/references/design/intercom.md +149 -0
- package/skills/frontend/references/design/kraken.md +128 -0
- package/skills/frontend/references/design/lamborghini.md +291 -0
- package/skills/frontend/references/design/linear.app.md +370 -0
- package/skills/frontend/references/design/lovable.md +301 -0
- package/skills/frontend/references/design/mastercard.md +368 -0
- package/skills/frontend/references/design/meta.md +369 -0
- package/skills/frontend/references/design/minimalist-skill.md +85 -0
- package/skills/frontend/references/design/minimax.md +260 -0
- package/skills/frontend/references/design/mintlify.md +329 -0
- package/skills/frontend/references/design/miro.md +111 -0
- package/skills/frontend/references/design/mistral.ai.md +264 -0
- package/skills/frontend/references/design/mongodb.md +269 -0
- package/skills/frontend/references/design/nike.md +366 -0
- package/skills/frontend/references/design/notion.md +312 -0
- package/skills/frontend/references/design/nvidia.md +296 -0
- package/skills/frontend/references/design/ollama.md +270 -0
- package/skills/frontend/references/design/opencode.ai.md +284 -0
- package/skills/frontend/references/design/output-skill.md +49 -0
- package/skills/frontend/references/design/pinterest.md +233 -0
- package/skills/frontend/references/design/playstation.md +367 -0
- package/skills/frontend/references/design/posthog.md +259 -0
- package/skills/frontend/references/design/raycast.md +271 -0
- package/skills/frontend/references/design/react-dev-tooling-skill.md +232 -0
- package/skills/frontend/references/design/redesign-skill.md +178 -0
- package/skills/frontend/references/design/renault.md +314 -0
- package/skills/frontend/references/design/replicate.md +264 -0
- package/skills/frontend/references/design/resend.md +306 -0
- package/skills/frontend/references/design/revolut.md +188 -0
- package/skills/frontend/references/design/runwayml.md +247 -0
- package/skills/frontend/references/design/sanity.md +360 -0
- package/skills/frontend/references/design/sentry.md +265 -0
- package/skills/frontend/references/design/shopify.md +353 -0
- package/skills/frontend/references/design/soft-skill.md +98 -0
- package/skills/frontend/references/design/spacex.md +197 -0
- package/skills/frontend/references/design/spotify.md +249 -0
- package/skills/frontend/references/design/starbucks.md +583 -0
- package/skills/frontend/references/design/stitch-design-example.md +121 -0
- package/skills/frontend/references/design/stitch-skill.md +184 -0
- package/skills/frontend/references/design/stripe.md +325 -0
- package/skills/frontend/references/design/supabase.md +258 -0
- package/skills/frontend/references/design/superhuman.md +255 -0
- package/skills/frontend/references/design/taste-skill.md +1206 -0
- package/skills/frontend/references/design/tesla.md +289 -0
- package/skills/frontend/references/design/theverge.md +342 -0
- package/skills/frontend/references/design/together.ai.md +266 -0
- package/skills/frontend/references/design/uber.md +298 -0
- package/skills/frontend/references/design/vercel.md +313 -0
- package/skills/frontend/references/design/vodafone.md +426 -0
- package/skills/frontend/references/design/voltagent.md +326 -0
- package/skills/frontend/references/design/warp.md +256 -0
- package/skills/frontend/references/design/webflow.md +95 -0
- package/skills/frontend/references/design/wired.md +281 -0
- package/skills/frontend/references/design/wise.md +176 -0
- package/skills/frontend/references/design/x.ai.md +260 -0
- package/skills/frontend/references/design/zapier.md +331 -0
- package/skills/frontend/references/perfection/README.md +264 -0
- package/skills/frontend/references/perfection/react-perf-tooling.md +234 -0
- package/skills/frontend/references/ui-ux-db/README.md +659 -0
- package/skills/frontend/references/ui-ux-db/data/app-interface.csv +31 -0
- package/skills/frontend/references/ui-ux-db/data/charts.csv +26 -0
- package/skills/frontend/references/ui-ux-db/data/colors.csv +162 -0
- package/skills/frontend/references/ui-ux-db/data/google-fonts.csv +1924 -0
- package/skills/frontend/references/ui-ux-db/data/icons.csv +106 -0
- package/skills/frontend/references/ui-ux-db/data/landing.csv +35 -0
- package/skills/frontend/references/ui-ux-db/data/products.csv +162 -0
- package/skills/frontend/references/ui-ux-db/data/react-performance.csv +45 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/angular.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/astro.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/jetpack-compose.csv +53 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/laravel.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/nuxt-ui.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/nuxtjs.csv +59 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/react-native.csv +52 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/shadcn.csv +61 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/threejs.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -0
- package/skills/frontend/references/ui-ux-db/data/styles.csv +85 -0
- package/skills/frontend/references/ui-ux-db/data/typography.csv +74 -0
- package/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +162 -0
- package/skills/frontend/references/ui-ux-db/data/ux-guidelines.csv +100 -0
- package/skills/frontend/references/ui-ux-db/data/web-interface.csv +31 -0
- package/skills/frontend/references/ui-ux-db/scripts/core.py +262 -0
- package/skills/frontend/references/ui-ux-db/scripts/design_system.py +1148 -0
- package/skills/frontend/references/ui-ux-db/scripts/search.py +114 -0
- package/skills/frontend/scripts/perfection/lighthouse-audit.py +201 -0
- package/skills/git-master/SKILL.md +112 -0
- package/skills/git-master/agents/openai.yaml +13 -0
- package/skills/init-deep/SKILL.md +279 -0
- package/skills/receiving-code-review/SKILL.md +112 -7
- package/skills/remove-ai-slops/SKILL.md +159 -8
- package/skills/requesting-code-review/SKILL.md +96 -3
- package/skills/requesting-code-review/code-reviewer.md +47 -0
- package/skills/subagent-driven-development/SKILL.md +176 -6
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +23 -0
- package/skills/subagent-driven-development/implementer-prompt.md +69 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +32 -0
- package/skills/using-git-worktrees/SKILL.md +141 -0
- package/skills/writing-plans/SKILL.md +121 -7
- package/skills/writing-plans/plan-document-reviewer-prompt.md +38 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
#Requires -Version 5.1
|
|
2
|
+
# Smoke test for the ast-grep skill on Windows (PowerShell 5.1+).
|
|
3
|
+
$ErrorActionPreference = 'Stop'
|
|
4
|
+
|
|
5
|
+
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
6
|
+
$SkillDir = Split-Path -Parent $ScriptDir
|
|
7
|
+
$Helper = Join-Path $SkillDir 'scripts/ast_grep_helper.py'
|
|
8
|
+
$Python = if (Get-Command py -ErrorAction SilentlyContinue) {
|
|
9
|
+
'py'
|
|
10
|
+
} elseif (Get-Command pyenv -ErrorAction SilentlyContinue) {
|
|
11
|
+
(& pyenv which python).Trim()
|
|
12
|
+
} else {
|
|
13
|
+
'python'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
$Output = Join-Path $env:TEMP ("ast-grep-skill-smoke-" + [guid]::NewGuid().ToString('N').Substring(0,8))
|
|
17
|
+
New-Item -ItemType Directory -Path $Output -Force | Out-Null
|
|
18
|
+
|
|
19
|
+
function Pass([string]$msg) { Write-Host "PASS: $msg" }
|
|
20
|
+
function Fail([string]$msg) { Write-Host "FAIL: $msg" -ForegroundColor Red; Remove-Item -Recurse -Force $Output -ErrorAction SilentlyContinue; exit 1 }
|
|
21
|
+
|
|
22
|
+
function Run([string[]]$ToolArgs) {
|
|
23
|
+
$output = & $Python @($Helper) @ToolArgs 2>&1
|
|
24
|
+
$exitCode = $LASTEXITCODE
|
|
25
|
+
$combined = ($output | ForEach-Object { $_.ToString() }) -join [Environment]::NewLine
|
|
26
|
+
if ($combined.Length -gt 0) { $combined += [Environment]::NewLine }
|
|
27
|
+
return [pscustomobject]@{
|
|
28
|
+
ExitCode = $exitCode
|
|
29
|
+
Stdout = $combined
|
|
30
|
+
Stderr = ''
|
|
31
|
+
Combined = $combined
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
# 1. --version
|
|
37
|
+
$r = Run @('--version')
|
|
38
|
+
if ($r.Combined -notmatch 'ast-grep-helper') { Fail '--version output missing' }
|
|
39
|
+
Pass '--version'
|
|
40
|
+
|
|
41
|
+
# 2. langs (must list >=25)
|
|
42
|
+
$r = Run @('langs')
|
|
43
|
+
$langCount = ($r.Stdout -split "`n" | Where-Object { $_ -match '^ [a-z]' }).Count
|
|
44
|
+
if ($langCount -lt 25) { Fail "langs listed only $langCount (expected >=25)" }
|
|
45
|
+
Pass 'langs lists at least 25 languages'
|
|
46
|
+
|
|
47
|
+
# 3. regex misuse: \w+
|
|
48
|
+
$r = Run @('validate', '\w+', '--lang', 'ts')
|
|
49
|
+
if ($r.ExitCode -ne 2) { Fail "validate '\w+' should exit 2, got $($r.ExitCode)" }
|
|
50
|
+
if ($r.Combined -notmatch 'regex') { Fail "validate '\w+' should mention regex" }
|
|
51
|
+
Pass 'validate detects \w regex misuse'
|
|
52
|
+
|
|
53
|
+
# 4. valid pattern
|
|
54
|
+
$r = Run @('validate', 'console.log($MSG)', '--lang', 'ts')
|
|
55
|
+
if ($r.ExitCode -ne 0) { Fail "validate 'console.log(`$MSG)' should exit 0, got $($r.ExitCode)" }
|
|
56
|
+
Pass 'validate accepts plausible pattern'
|
|
57
|
+
|
|
58
|
+
# 5. Python trailing colon
|
|
59
|
+
$r = Run @('validate', 'def $F($$$):', '--lang', 'py')
|
|
60
|
+
if ($r.ExitCode -ne 2) { Fail "validate 'def `$F(`$`$`$):' should exit 2, got $($r.ExitCode)" }
|
|
61
|
+
if ($r.Combined -notmatch 'colon|trailing') { Fail 'validate should mention trailing colon' }
|
|
62
|
+
Pass 'validate detects Python trailing colon'
|
|
63
|
+
|
|
64
|
+
# 6. Incomplete TS function
|
|
65
|
+
$r = Run @('validate', 'function $N', '--lang', 'ts')
|
|
66
|
+
if ($r.ExitCode -ne 2) { Fail "validate 'function `$N' should exit 2, got $($r.ExitCode)" }
|
|
67
|
+
if ($r.Combined -notmatch 'incomplete|params|body') { Fail 'validate should hint about params/body' }
|
|
68
|
+
Pass 'validate detects incomplete TS function'
|
|
69
|
+
|
|
70
|
+
# 7. Alternation pipe
|
|
71
|
+
$r = Run @('validate', 'foo|bar', '--lang', 'ts')
|
|
72
|
+
if ($r.ExitCode -ne 2) { Fail "validate 'foo|bar' should exit 2, got $($r.ExitCode)" }
|
|
73
|
+
if ($r.Combined -notmatch 'alternation|regex') { Fail 'validate should mention alternation' }
|
|
74
|
+
Pass 'validate detects literal | alternation'
|
|
75
|
+
|
|
76
|
+
# 8. doctor
|
|
77
|
+
$r = Run @('doctor')
|
|
78
|
+
if ($r.Combined -notmatch 'ast-grep-helper') { Fail 'doctor missing helper version line' }
|
|
79
|
+
Pass 'doctor produces output'
|
|
80
|
+
|
|
81
|
+
# 9. search w/o binary
|
|
82
|
+
$r = Run @('--quiet', 'search', 'foo()', 'C:/nonexistent-path-xyzzy', '--lang', 'ts')
|
|
83
|
+
switch ($r.ExitCode) {
|
|
84
|
+
{ $_ -in 0,1,4 } { Pass "search runs (rc=$($r.ExitCode), ast-grep available)" }
|
|
85
|
+
3 {
|
|
86
|
+
if ($r.Combined -notmatch 'install') { Fail 'search rc=3 should print install hint' }
|
|
87
|
+
Pass 'search without binary prints install hint'
|
|
88
|
+
}
|
|
89
|
+
default { Fail "search returned unexpected rc=$($r.ExitCode): $($r.Combined)" }
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
# 10. install.ps1 syntax (parse-check via PowerShell tokenizer)
|
|
93
|
+
$tokens = $null
|
|
94
|
+
$errors = $null
|
|
95
|
+
[System.Management.Automation.Language.Parser]::ParseFile(
|
|
96
|
+
(Join-Path $SkillDir 'install.ps1'), [ref]$tokens, [ref]$errors) | Out-Null
|
|
97
|
+
if ($errors -and $errors.Count -gt 0) { Fail "install.ps1 has parse errors: $($errors -join '; ')" }
|
|
98
|
+
Pass 'install.ps1 parses cleanly'
|
|
99
|
+
|
|
100
|
+
# 11. SKILL.md frontmatter
|
|
101
|
+
$skill = Get-Content (Join-Path $SkillDir 'SKILL.md') -Raw
|
|
102
|
+
if (-not $skill.StartsWith("---`n") -and -not $skill.StartsWith("---`r`n")) {
|
|
103
|
+
Fail 'SKILL.md must start with YAML frontmatter'
|
|
104
|
+
}
|
|
105
|
+
$endIdx = $skill.IndexOf("`n---`n", 4)
|
|
106
|
+
if ($endIdx -lt 0) { $endIdx = $skill.IndexOf("`r`n---`r`n", 4) }
|
|
107
|
+
if ($endIdx -lt 0) { Fail 'SKILL.md missing closing ---' }
|
|
108
|
+
$fm = $skill.Substring(4, $endIdx - 4)
|
|
109
|
+
if ($fm -notmatch '(?m)^name:\s*ast-grep\s*$') { Fail 'frontmatter missing name: ast-grep' }
|
|
110
|
+
if ($fm -notmatch '(?m)^description:') { Fail 'frontmatter missing description' }
|
|
111
|
+
Pass 'SKILL.md frontmatter shape'
|
|
112
|
+
|
|
113
|
+
# 12. All required reference files exist
|
|
114
|
+
$required = @(
|
|
115
|
+
'references/install.md', 'references/patterns.md', 'references/pitfalls.md',
|
|
116
|
+
'references/recipes.md', 'references/cli.md', 'references/yaml-rules.md',
|
|
117
|
+
'references/sgconfig.md'
|
|
118
|
+
)
|
|
119
|
+
foreach ($f in $required) {
|
|
120
|
+
if (-not (Test-Path (Join-Path $SkillDir $f))) { Fail "missing $f" }
|
|
121
|
+
}
|
|
122
|
+
Pass 'all references present'
|
|
123
|
+
|
|
124
|
+
Write-Host ''
|
|
125
|
+
Write-Host 'all smoke tests passed'
|
|
126
|
+
}
|
|
127
|
+
finally {
|
|
128
|
+
Remove-Item -Recurse -Force $Output -ErrorAction SilentlyContinue
|
|
129
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Smoke test for the ast-grep skill on POSIX (macOS / Linux / WSL / Git Bash).
|
|
3
|
+
#
|
|
4
|
+
# Tests:
|
|
5
|
+
# 1. helper --version
|
|
6
|
+
# 2. helper langs (lists 25 languages)
|
|
7
|
+
# 3. helper validate '\w+' --lang ts (must exit 2 with hint)
|
|
8
|
+
# 4. helper validate 'console.log($MSG)' (must exit 0 plausible)
|
|
9
|
+
# 5. helper validate 'def $F($$$):' --lang py (must exit 2 - trailing colon)
|
|
10
|
+
# 6. helper validate 'function $N' --lang ts (must exit 2 - incomplete)
|
|
11
|
+
# 7. helper validate 'foo|bar' --lang ts (must exit 2 - alternation)
|
|
12
|
+
# 8. helper doctor (informational; tolerates no-binary)
|
|
13
|
+
# 9. helper search w/o binary => exit 3 with install hint
|
|
14
|
+
# 10. install.sh --help (parses)
|
|
15
|
+
# 11. SKILL.md frontmatter shape (canonical)
|
|
16
|
+
#
|
|
17
|
+
# Runs against the helper using ONLY stdlib python3 - no ast-grep needed.
|
|
18
|
+
|
|
19
|
+
set -euo pipefail
|
|
20
|
+
|
|
21
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
22
|
+
SKILL_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
23
|
+
HELPER="python3 $SKILL_DIR/scripts/ast_grep_helper.py"
|
|
24
|
+
|
|
25
|
+
OUTPUT_DIR="$(mktemp -d -t ast-grep-skill-smoke-XXXXXX)"
|
|
26
|
+
trap 'rm -rf "$OUTPUT_DIR"' EXIT
|
|
27
|
+
|
|
28
|
+
fail() { echo "FAIL: $*" >&2; exit 1; }
|
|
29
|
+
pass() { echo "PASS: $*"; }
|
|
30
|
+
|
|
31
|
+
ocmm_runtime_slug() {
|
|
32
|
+
case "$(uname -s)" in
|
|
33
|
+
Darwin) local os_slug="darwin" ;;
|
|
34
|
+
MINGW*|MSYS*|CYGWIN*) local os_slug="win32" ;;
|
|
35
|
+
*) local os_slug="linux" ;;
|
|
36
|
+
esac
|
|
37
|
+
|
|
38
|
+
case "$(uname -m | tr '[:upper:]' '[:lower:]')" in
|
|
39
|
+
arm64|aarch64) local arch_slug="arm64" ;;
|
|
40
|
+
*) local arch_slug="x64" ;;
|
|
41
|
+
esac
|
|
42
|
+
|
|
43
|
+
printf '%s-%s' "$os_slug" "$arch_slug"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
fake_sg() {
|
|
47
|
+
local target="$1"
|
|
48
|
+
mkdir -p "$(dirname "$target")"
|
|
49
|
+
cat > "$target" <<'SH'
|
|
50
|
+
#!/usr/bin/env bash
|
|
51
|
+
if [ "${1:-}" = "--version" ]; then
|
|
52
|
+
printf 'ast-grep 0.45.0 fake\n'
|
|
53
|
+
else
|
|
54
|
+
printf 'fake ast-grep\n'
|
|
55
|
+
fi
|
|
56
|
+
SH
|
|
57
|
+
chmod +x "$target"
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
# 1. --version
|
|
61
|
+
$HELPER --version | grep -q "ast-grep-helper" || fail "--version output missing"
|
|
62
|
+
pass "--version"
|
|
63
|
+
|
|
64
|
+
# 2. langs (must list 25)
|
|
65
|
+
LANG_LINES=$($HELPER langs | grep -E '^ [a-z]' | wc -l | tr -d ' ')
|
|
66
|
+
[ "$LANG_LINES" -ge 25 ] || fail "langs listed only $LANG_LINES (expected >=25)"
|
|
67
|
+
pass "langs lists at least 25 languages"
|
|
68
|
+
|
|
69
|
+
# 3. regex misuse: \w+
|
|
70
|
+
set +e
|
|
71
|
+
$HELPER validate '\w+' --lang ts > "$OUTPUT_DIR/v1.out" 2>&1
|
|
72
|
+
RC=$?
|
|
73
|
+
set -e
|
|
74
|
+
[ $RC -eq 2 ] || fail "validate '\\w+' should exit 2, got $RC (output: $(cat $OUTPUT_DIR/v1.out))"
|
|
75
|
+
grep -qi 'regex' "$OUTPUT_DIR/v1.out" || fail "validate '\\w+' should mention regex (output: $(cat $OUTPUT_DIR/v1.out))"
|
|
76
|
+
pass "validate detects \\w regex misuse"
|
|
77
|
+
|
|
78
|
+
# 4. valid pattern
|
|
79
|
+
set +e
|
|
80
|
+
$HELPER validate 'console.log($MSG)' --lang ts > "$OUTPUT_DIR/v2.out" 2>&1
|
|
81
|
+
RC=$?
|
|
82
|
+
set -e
|
|
83
|
+
[ $RC -eq 0 ] || fail "validate 'console.log(\$MSG)' should exit 0, got $RC (output: $(cat $OUTPUT_DIR/v2.out))"
|
|
84
|
+
pass "validate accepts plausible pattern"
|
|
85
|
+
|
|
86
|
+
# 5. Python trailing colon
|
|
87
|
+
set +e
|
|
88
|
+
$HELPER validate 'def $F($$$):' --lang py > "$OUTPUT_DIR/v3.out" 2>&1
|
|
89
|
+
RC=$?
|
|
90
|
+
set -e
|
|
91
|
+
[ $RC -eq 2 ] || fail "validate 'def \$F(\$\$\$):' should exit 2, got $RC"
|
|
92
|
+
grep -qi 'colon\|trailing' "$OUTPUT_DIR/v3.out" || fail "validate should mention trailing colon"
|
|
93
|
+
pass "validate detects Python trailing colon"
|
|
94
|
+
|
|
95
|
+
# 6. Incomplete TS function
|
|
96
|
+
set +e
|
|
97
|
+
$HELPER validate 'function $N' --lang ts > "$OUTPUT_DIR/v4.out" 2>&1
|
|
98
|
+
RC=$?
|
|
99
|
+
set -e
|
|
100
|
+
[ $RC -eq 2 ] || fail "validate 'function \$N' should exit 2, got $RC"
|
|
101
|
+
grep -qi 'incomplete\|params\|body' "$OUTPUT_DIR/v4.out" || fail "validate should hint about params/body"
|
|
102
|
+
pass "validate detects incomplete TS function"
|
|
103
|
+
|
|
104
|
+
# 7. Alternation pipe
|
|
105
|
+
set +e
|
|
106
|
+
$HELPER validate 'foo|bar' --lang ts > "$OUTPUT_DIR/v5.out" 2>&1
|
|
107
|
+
RC=$?
|
|
108
|
+
set -e
|
|
109
|
+
[ $RC -eq 2 ] || fail "validate 'foo|bar' should exit 2, got $RC"
|
|
110
|
+
grep -qi 'alternation\|regex' "$OUTPUT_DIR/v5.out" || fail "validate should mention alternation"
|
|
111
|
+
pass "validate detects literal | alternation"
|
|
112
|
+
|
|
113
|
+
# 8. doctor (informational)
|
|
114
|
+
$HELPER doctor > "$OUTPUT_DIR/doc.out" 2>&1 || true
|
|
115
|
+
grep -q "ast-grep-helper" "$OUTPUT_DIR/doc.out" || fail "doctor missing helper version line"
|
|
116
|
+
pass "doctor produces output"
|
|
117
|
+
|
|
118
|
+
# Given OCMM_AST_GREP_SG_PATH points at a fake executable.
|
|
119
|
+
# When doctor resolves ast-grep, then it reports that exact path.
|
|
120
|
+
FAKE_ENV_SG="$OUTPUT_DIR/fake-env/sg"
|
|
121
|
+
fake_sg "$FAKE_ENV_SG"
|
|
122
|
+
OCMM_AST_GREP_SG_PATH="$FAKE_ENV_SG" $HELPER doctor > "$OUTPUT_DIR/ocmm-env.out" 2>&1
|
|
123
|
+
grep -Fq "ast-grep binary: $FAKE_ENV_SG" "$OUTPUT_DIR/ocmm-env.out" || fail "OCMM_AST_GREP_SG_PATH was not preferred: $(cat "$OUTPUT_DIR/ocmm-env.out")"
|
|
124
|
+
pass "OCMM_AST_GREP_SG_PATH resolves first"
|
|
125
|
+
|
|
126
|
+
# Given HOME has an ocmm runtime sg executable.
|
|
127
|
+
# When doctor resolves ast-grep, then it reports the HOME runtime path.
|
|
128
|
+
RUNTIME_HOME="$OUTPUT_DIR/home"
|
|
129
|
+
RUNTIME_SLUG="$(ocmm_runtime_slug)"
|
|
130
|
+
RUNTIME_BIN="sg"
|
|
131
|
+
case "$RUNTIME_SLUG" in
|
|
132
|
+
win32-*) RUNTIME_BIN="sg.exe" ;;
|
|
133
|
+
esac
|
|
134
|
+
FAKE_RUNTIME_SG="$RUNTIME_HOME/.ocmm/runtime/ast-grep/$RUNTIME_SLUG/$RUNTIME_BIN"
|
|
135
|
+
fake_sg "$FAKE_RUNTIME_SG"
|
|
136
|
+
HOME="$RUNTIME_HOME" CODEX_HOME= OCMM_AST_GREP_SG_PATH= $HELPER doctor > "$OUTPUT_DIR/ocmm-runtime.out" 2>&1
|
|
137
|
+
grep -Fq "ast-grep binary: $FAKE_RUNTIME_SG" "$OUTPUT_DIR/ocmm-runtime.out" || fail "ocmm HOME runtime was not resolved: $(cat "$OUTPUT_DIR/ocmm-runtime.out")"
|
|
138
|
+
pass "ocmm HOME runtime resolves before standalone fallback"
|
|
139
|
+
|
|
140
|
+
# 9. search w/o binary => either runs successfully (binary found) OR exits 3 with hint
|
|
141
|
+
# The CI may or may not have ast-grep installed; both are valid.
|
|
142
|
+
set +e
|
|
143
|
+
$HELPER -q search 'foo()' --lang ts /nonexistent-path-xyzzy > "$OUTPUT_DIR/s1.out" 2>&1
|
|
144
|
+
RC=$?
|
|
145
|
+
set -e
|
|
146
|
+
case "$RC" in
|
|
147
|
+
0|1|4)
|
|
148
|
+
# Binary present but no matches OR sg returned non-fatal error - both fine
|
|
149
|
+
pass "search runs (rc=$RC, ast-grep available)"
|
|
150
|
+
;;
|
|
151
|
+
3)
|
|
152
|
+
grep -qi 'install' "$OUTPUT_DIR/s1.out" || fail "search rc=3 should print install hint"
|
|
153
|
+
pass "search without binary prints install hint"
|
|
154
|
+
;;
|
|
155
|
+
*)
|
|
156
|
+
fail "search returned unexpected rc=$RC: $(cat $OUTPUT_DIR/s1.out)"
|
|
157
|
+
;;
|
|
158
|
+
esac
|
|
159
|
+
|
|
160
|
+
# 10. install.sh syntax check + --help
|
|
161
|
+
bash -n "$SKILL_DIR/install.sh" || fail "install.sh has syntax errors"
|
|
162
|
+
$SKILL_DIR/install.sh --help > "$OUTPUT_DIR/inst.out" 2>&1 || true
|
|
163
|
+
grep -qi 'install' "$OUTPUT_DIR/inst.out" || fail "install.sh --help missing keyword 'install'"
|
|
164
|
+
pass "install.sh syntax + --help"
|
|
165
|
+
|
|
166
|
+
# 11. SKILL.md frontmatter
|
|
167
|
+
python3 - <<PY
|
|
168
|
+
import re, sys
|
|
169
|
+
src = open("$SKILL_DIR/SKILL.md").read()
|
|
170
|
+
assert src.startswith("---\n"), "SKILL.md must start with YAML frontmatter"
|
|
171
|
+
end = src.find("\n---\n", 4)
|
|
172
|
+
assert end > 0, "SKILL.md missing closing ---"
|
|
173
|
+
fm = src[4:end]
|
|
174
|
+
assert re.search(r"^name:\s*ast-grep\s*$", fm, re.M), "frontmatter missing name: ast-grep"
|
|
175
|
+
assert re.search(r"^description:", fm, re.M), "frontmatter missing description"
|
|
176
|
+
PY
|
|
177
|
+
pass "SKILL.md frontmatter shape"
|
|
178
|
+
|
|
179
|
+
# 12. All required reference files exist
|
|
180
|
+
for f in references/install.md references/patterns.md references/pitfalls.md \
|
|
181
|
+
references/recipes.md references/cli.md references/yaml-rules.md \
|
|
182
|
+
references/sgconfig.md; do
|
|
183
|
+
test -f "$SKILL_DIR/$f" || fail "missing $f"
|
|
184
|
+
done
|
|
185
|
+
pass "all references present"
|
|
186
|
+
|
|
187
|
+
python3 - "$SKILL_DIR" <<'PY' || fail "Korean characters found in skill content"
|
|
188
|
+
import pathlib, re, sys
|
|
189
|
+
root = pathlib.Path(sys.argv[1])
|
|
190
|
+
hangul = re.compile(r"[\uac00-\ud7a3]")
|
|
191
|
+
targets = [root / "SKILL.md", root / "README.md"]
|
|
192
|
+
for d in ("references", "scripts", "tests", ".github"):
|
|
193
|
+
targets.extend((root / d).rglob("*"))
|
|
194
|
+
targets.extend([root / "install.sh", root / "install.ps1"])
|
|
195
|
+
hits = 0
|
|
196
|
+
for p in targets:
|
|
197
|
+
if not p.is_file():
|
|
198
|
+
continue
|
|
199
|
+
try:
|
|
200
|
+
text = p.read_text(encoding="utf-8")
|
|
201
|
+
except (UnicodeDecodeError, OSError):
|
|
202
|
+
continue
|
|
203
|
+
for n, line in enumerate(text.splitlines(), 1):
|
|
204
|
+
if hangul.search(line):
|
|
205
|
+
print(f"{p}:{n}: {line.rstrip()}")
|
|
206
|
+
hits += 1
|
|
207
|
+
sys.exit(1 if hits else 0)
|
|
208
|
+
PY
|
|
209
|
+
pass "no Korean in skill content"
|
|
210
|
+
|
|
211
|
+
echo ""
|
|
212
|
+
echo "all smoke tests passed"
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"""Regression tests for strict ast-grep binary resolution."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import importlib.util
|
|
6
|
+
import os
|
|
7
|
+
import stat
|
|
8
|
+
import subprocess
|
|
9
|
+
import tempfile
|
|
10
|
+
import unittest
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
from unittest.mock import patch
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
SKILL_ROOT = Path(__file__).resolve().parents[1]
|
|
16
|
+
HELPER_PATH = SKILL_ROOT / "scripts" / "ast_grep_helper.py"
|
|
17
|
+
INIT_DEEP_SKILL_PATH = SKILL_ROOT.parent / "init-deep" / "SKILL.md"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def load_helper():
|
|
21
|
+
spec = importlib.util.spec_from_file_location("ast_grep_helper_under_test", HELPER_PATH)
|
|
22
|
+
if spec is None or spec.loader is None:
|
|
23
|
+
raise RuntimeError(f"unable to load helper from {HELPER_PATH}")
|
|
24
|
+
module = importlib.util.module_from_spec(spec)
|
|
25
|
+
spec.loader.exec_module(module)
|
|
26
|
+
return module
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
HELPER = load_helper()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ProbeAstGrepCandidateTests(unittest.TestCase):
|
|
33
|
+
def make_candidate(self, directory: Path, name: str = "sg") -> Path:
|
|
34
|
+
candidate = directory / name
|
|
35
|
+
candidate.write_text("placeholder", encoding="utf-8")
|
|
36
|
+
candidate.chmod(candidate.stat().st_mode | stat.S_IXUSR)
|
|
37
|
+
return candidate
|
|
38
|
+
|
|
39
|
+
def test_accepts_valid_ast_grep_version_output(self) -> None:
|
|
40
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
41
|
+
candidate = self.make_candidate(Path(temp_dir))
|
|
42
|
+
completed = subprocess.CompletedProcess(
|
|
43
|
+
[str(candidate), "--version"], 0, "ast-grep 0.37.0\n", ""
|
|
44
|
+
)
|
|
45
|
+
with patch.object(HELPER.subprocess, "run", return_value=completed) as run:
|
|
46
|
+
self.assertEqual(HELPER.probe_ast_grep_candidate(candidate), candidate.resolve())
|
|
47
|
+
|
|
48
|
+
run.assert_called_once_with(
|
|
49
|
+
[str(candidate.resolve()), "--version"],
|
|
50
|
+
capture_output=True,
|
|
51
|
+
text=True,
|
|
52
|
+
timeout=5.0,
|
|
53
|
+
check=False,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
def test_rejects_nonzero_version_command(self) -> None:
|
|
57
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
58
|
+
candidate = self.make_candidate(Path(temp_dir))
|
|
59
|
+
completed = subprocess.CompletedProcess(
|
|
60
|
+
[str(candidate), "--version"], 1, "ast-grep 0.37.0\n", "error"
|
|
61
|
+
)
|
|
62
|
+
with patch.object(HELPER.subprocess, "run", return_value=completed):
|
|
63
|
+
self.assertIsNone(HELPER.probe_ast_grep_candidate(candidate))
|
|
64
|
+
|
|
65
|
+
def test_rejects_probe_timeout(self) -> None:
|
|
66
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
67
|
+
candidate = self.make_candidate(Path(temp_dir))
|
|
68
|
+
with patch.object(
|
|
69
|
+
HELPER.subprocess,
|
|
70
|
+
"run",
|
|
71
|
+
side_effect=subprocess.TimeoutExpired([str(candidate), "--version"], 5.0),
|
|
72
|
+
):
|
|
73
|
+
self.assertIsNone(HELPER.probe_ast_grep_candidate(candidate))
|
|
74
|
+
|
|
75
|
+
def test_rejects_unrelated_sg_version_output(self) -> None:
|
|
76
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
77
|
+
candidate = self.make_candidate(Path(temp_dir))
|
|
78
|
+
completed = subprocess.CompletedProcess(
|
|
79
|
+
[str(candidate), "--version"], 0, "setgroups (util-linux) 2.40\n", ""
|
|
80
|
+
)
|
|
81
|
+
with patch.object(HELPER.subprocess, "run", return_value=completed):
|
|
82
|
+
self.assertIsNone(HELPER.probe_ast_grep_candidate(candidate))
|
|
83
|
+
|
|
84
|
+
def test_relative_candidate_uses_path_lookup(self) -> None:
|
|
85
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
86
|
+
candidate = self.make_candidate(Path(temp_dir))
|
|
87
|
+
completed = subprocess.CompletedProcess(
|
|
88
|
+
[str(candidate), "--version"], 0, "", "AST-GREP 0.37.0\n"
|
|
89
|
+
)
|
|
90
|
+
with (
|
|
91
|
+
patch.object(HELPER.shutil, "which", return_value=str(candidate)) as which,
|
|
92
|
+
patch.object(HELPER.subprocess, "run", return_value=completed),
|
|
93
|
+
):
|
|
94
|
+
self.assertEqual(HELPER.probe_ast_grep_candidate("sg"), candidate.resolve())
|
|
95
|
+
|
|
96
|
+
which.assert_called_once_with("sg")
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class ResolverFallbackTests(unittest.TestCase):
|
|
100
|
+
def test_invalid_env_candidate_falls_through_runtime_cache_to_path(self) -> None:
|
|
101
|
+
expected = Path("C:/tools/ast-grep.exe")
|
|
102
|
+
with (
|
|
103
|
+
patch.dict(os.environ, {"OCMM_AST_GREP_SG_PATH": "C:/invalid/sg.exe"}),
|
|
104
|
+
patch.object(HELPER, "probe_ast_grep_candidate", return_value=None) as probe,
|
|
105
|
+
patch.object(HELPER, "ocmm_runtime_binary", return_value=None) as runtime,
|
|
106
|
+
patch.object(HELPER, "cached_binary", return_value=None) as cached,
|
|
107
|
+
patch.object(HELPER, "which_binary", return_value=expected) as path,
|
|
108
|
+
patch.object(HELPER, "homebrew_binary") as homebrew,
|
|
109
|
+
):
|
|
110
|
+
self.assertEqual(HELPER.resolve_binary(), expected)
|
|
111
|
+
|
|
112
|
+
probe.assert_called_once_with(Path("C:/invalid/sg.exe"))
|
|
113
|
+
runtime.assert_called_once_with()
|
|
114
|
+
cached.assert_called_once_with()
|
|
115
|
+
path.assert_called_once_with()
|
|
116
|
+
homebrew.assert_not_called()
|
|
117
|
+
|
|
118
|
+
def test_all_resolver_tiers_delegate_to_the_strict_probe(self) -> None:
|
|
119
|
+
source = HELPER_PATH.read_text(encoding="utf-8")
|
|
120
|
+
helper_start = source.index("def _first_valid_candidate(")
|
|
121
|
+
helper_end = source.index("\ndef cached_binary(", helper_start)
|
|
122
|
+
self.assertIn("probe_ast_grep_candidate", source[helper_start:helper_end])
|
|
123
|
+
for function_name in (
|
|
124
|
+
"ocmm_env_binary",
|
|
125
|
+
"ocmm_runtime_binary",
|
|
126
|
+
"cached_binary",
|
|
127
|
+
"which_binary",
|
|
128
|
+
"homebrew_binary",
|
|
129
|
+
):
|
|
130
|
+
start = source.index(f"def {function_name}(")
|
|
131
|
+
next_function = source.find("\ndef ", start + 1)
|
|
132
|
+
body = source[start:next_function if next_function != -1 else None]
|
|
133
|
+
self.assertIn("_first_valid_candidate", body, function_name)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class InitDeepSourceContractTests(unittest.TestCase):
|
|
137
|
+
def test_normal_discovery_uses_lsp_codegraph_rg_not_an_ast_baseline(self) -> None:
|
|
138
|
+
source = INIT_DEEP_SKILL_PATH.read_text(encoding="utf-8")
|
|
139
|
+
|
|
140
|
+
self.assertNotIn("AST-shaped first probe (exactly once)", source)
|
|
141
|
+
self.assertNotIn("ast-grep structural probe: unmeasured", source)
|
|
142
|
+
self.assertIn("Treat `codegraph_*` tools as optional", source)
|
|
143
|
+
self.assertIn("LSP tools and `rg` as the normal fallback evidence path", source)
|
|
144
|
+
self.assertIn("Do not run ast-grep as a baseline substitute", source)
|
|
145
|
+
|
|
146
|
+
def test_ast_grep_escalates_only_for_specific_unanswerable_syntax_questions(self) -> None:
|
|
147
|
+
source = INIT_DEEP_SKILL_PATH.read_text(encoding="utf-8")
|
|
148
|
+
|
|
149
|
+
self.assertIn("specific exact syntax-tree question", source)
|
|
150
|
+
self.assertIn("simpler evidence cannot answer reliably", source)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
if __name__ == "__main__":
|
|
154
|
+
unittest.main()
|
|
@@ -1,15 +1,108 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: brainstorming
|
|
3
|
-
description: Use before creative or materially ambiguous work to clarify outcomes, constraints, risks, and an implementation direction.
|
|
3
|
+
description: "Use before creative or materially ambiguous work to clarify outcomes, constraints, risks, and an appropriate implementation direction."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## DSH resource and authority contract
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
This is a full OCMM source adaptation for DSH 0.2.0-rc.2, not an OpenCode or Codex runtime. Source product names in transcript formats, examples, paths and attribution remain descriptive; they are not a host switch.
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
10
|
+
- Load this skill through the native skill tool only when its trigger matches. Resolve every relative reference/script/asset from the directory resourceBase returned with this skill, not from the project cwd or an OCMM checkout. Use available read/glob/grep to inspect resources; use write/edit and the active bash or pwsh only within the actual role and host permissions.
|
|
11
|
+
- External documentation uses actual web_search/web_fetch or an available documentation service. Context7, GitHub MCP, browser, image and LSP tools are optional catalog capabilities, not bundled calls. Use a real available equivalent or report unavailable evidence; never invent an MCP, Task, todo or compression API.
|
|
12
|
+
- Source role names are logical assignments: code-search/explore maps to dsmm-code-search, and other canonical roles/categories map to dsmm-<name>. Dispatch only through the actual role-specific native subagent tool in the current catalog, within the caller's effective policy, depth and authority. No generated file, metadata row or template proves callability. A missing permitted role is a blocker for a required formal stage, not permission to invent it or bypass planning.
|
|
13
|
+
- Templates describe assignment content, not a callable argument schema. Native continuation, background, message/interrupt and result handling are used only when actually exposed and supported; do not send task_id, subagent_type or guessed timeout fields. Otherwise perform permitted direct work or return the dependency to the stage owner.
|
|
14
|
+
- Use a concise response or an authorized project plan for tracking when no native tracking tool is exposed. Compression is unavailable unless a real tool is exposed; do not simulate it. Role responsibilities, explicit-off common/skill visibility, and the terminal delegation contract override broader examples in a resource.
|
|
15
|
+
- Installation, package-manager bootstrap, downloads, authentication/login, credential/profile access, Git writes and destructive actions require explicit authorization for the exact action. Reference commands are not automatic operations. Worktree consent does not authorize dependency installation or later branch deletion. Read before changing an existing file; preserve unrelated user work. Never silently restore/reset a working tree to repair a failed cleanup.
|
|
16
|
+
- Browser/debug QA uses run-owned isolated state, no imported credentials or browser profile, and only already available software unless separately authorized. Keep commands in the active shell dialect. Report unverified surfaces honestly.
|
|
17
|
+
|
|
18
|
+
<!-- v1 fork of superpowers/brainstorming.
|
|
19
|
+
Upstream: obra/superpowers v6.3.0.
|
|
20
|
+
Adjustments: removed visual-companion and excluded-skill references;
|
|
21
|
+
discovery and design now scale with actual uncertainty and risk. A clear,
|
|
22
|
+
authorized task does not require a separate design gate, rigid checklist,
|
|
23
|
+
fixed option count, or repeated approval loop; complex implementation still
|
|
24
|
+
follows the workflow planning policy. See docs/v1-maintenance.md
|
|
25
|
+
for sync rules. -->
|
|
26
|
+
|
|
27
|
+
# Brainstorming Outcomes Into Designs
|
|
28
|
+
|
|
29
|
+
Use discovery and design to remove material uncertainty before implementation. The durable objective is a shared understanding of the goal, constraints, acceptance criteria, interfaces, risks, and ideal end state—not completion of a prescribed ceremony.
|
|
30
|
+
|
|
31
|
+
## Authorization and Intent
|
|
32
|
+
|
|
33
|
+
Start from the user's request and current project evidence:
|
|
34
|
+
|
|
35
|
+
- Identify the requested goal and ideal end state.
|
|
36
|
+
- Preserve stated constraints, permissions, exclusions, and acceptance criteria.
|
|
37
|
+
- Treat a materially clear imperative as authorization to implement that stated scope. Do not require a separate design presentation or reapproval merely because implementation follows discovery.
|
|
38
|
+
- Honor an explicit request for a strict process, design review, approval checkpoint, artifact, or verification step.
|
|
39
|
+
- Ask or obtain specific authorization when a decision changes the requested scope or acceptance, weakens security or data guarantees, changes a public API/protocol, expands permissions, triggers an irreversible/destructive action, or causes an external side effect that requires consent.
|
|
40
|
+
|
|
41
|
+
An instruction to design, investigate, implement, or fix does not authorize unrelated work. Git authorization is operation-specific: implement/fix is not commit; commit is not push, tag, rebase, or release. A clear request for an exact Git operation authorizes that operation without a redundant confirmation, but never expands to another operation, repository, branch, or release action.
|
|
42
|
+
|
|
43
|
+
## Choose Proportional Discovery
|
|
44
|
+
|
|
45
|
+
Choose and revise the path based on actual uncertainty, coordination, and risk. Path labels are planning aids, not gates, and may become lighter or heavier as evidence resolves or reveals complexity.
|
|
46
|
+
|
|
47
|
+
- **Direct/bounded:** The goal, affected flow, constraints, and acceptance are materially clear. Read enough local context to match patterns, state any consequential assumption, and proceed without a separate design approval.
|
|
48
|
+
- **Spike:** Feasibility or missing facts determine the path. Use the cheapest valid investigation and return a recommendation; exploratory code is throwaway unless the user authorizes implementation.
|
|
49
|
+
- **Architectural:** Boundaries, interfaces, dependencies, or consequential trade-offs remain unresolved. Explore enough to make those decisions explicit, then present the useful design or choices before implementation when user input is materially required.
|
|
50
|
+
|
|
51
|
+
Do not default upward merely because work is multi-file, creative, or unfamiliar. Do not default downward when concrete security, data-loss, compatibility, protocol/API, migration, release, or irreversible-operation risks require additional care.
|
|
52
|
+
|
|
53
|
+
These paths size discovery and design; they do not replace workflow planning policy. Complex business or behavior implementation defaults to `planner` → `plan-critic` → implementation even when requirements are clear and evidence is strong. Planning or criticism may be skipped only for a limited, simple, low-risk, clearly bounded change, or when the user explicitly requests the skip; record the short reason. An explicit skip never permits an unapproved security, data, API/protocol, permission, or irreversible-action decision.
|
|
54
|
+
|
|
55
|
+
## Discovery
|
|
56
|
+
|
|
57
|
+
Inspect only enough project context to resolve material questions:
|
|
58
|
+
|
|
59
|
+
- current behavior and relevant local patterns;
|
|
60
|
+
- affected boundaries, dependencies, and interfaces;
|
|
61
|
+
- constraints and acceptance evidence;
|
|
62
|
+
- plausible failure, rollback, compatibility, security, data, and operational risks;
|
|
63
|
+
- independent work that can form separate waves.
|
|
64
|
+
|
|
65
|
+
Use a clarifier or ask the user only when missing information would change the deliverable, create material rework, or cross an escalation boundary. Ask the smallest useful question in the clearest form; there is no required question count, option count, or multiple-choice format.
|
|
66
|
+
|
|
67
|
+
## Explore Approaches When They Matter
|
|
68
|
+
|
|
69
|
+
Present alternatives only when there is a real decision with meaningful trade-offs. Give as many viable approaches as the decision warrants, including one when the evidence supports a single clear path. Explain the recommendation using project evidence, constraints, reversibility, risk, and cost.
|
|
70
|
+
|
|
71
|
+
Do not manufacture alternatives, architecture, or refactoring to make the process appear thorough. Follow established patterns and apply YAGNI.
|
|
72
|
+
|
|
73
|
+
## Outcome-Oriented Design
|
|
74
|
+
|
|
75
|
+
Scale the design artifact to the work. It may be a concise statement in chat, a contextual task outline, or a durable spec when coordination and risk justify one. A useful design makes the following discoverable without requiring fixed sections or order:
|
|
76
|
+
|
|
77
|
+
- goal and ideal end state;
|
|
78
|
+
- scope, exclusions, constraints, permissions, and acceptance criteria;
|
|
79
|
+
- current state and proposed approach;
|
|
80
|
+
- dependencies, interfaces, data/error flow, and ownership boundaries;
|
|
81
|
+
- material risks, rollback or safeguards where relevant;
|
|
82
|
+
- wave goals and useful acceptance evidence.
|
|
83
|
+
|
|
84
|
+
Organize waves by independently meaningful outcomes and dependency order. For each wave, state what becomes true and what evidence would demonstrate it. Do not require a task list, tiny sequential steps, or completion in a fixed order when work can safely proceed directly or in parallel.
|
|
85
|
+
|
|
86
|
+
## Bounded Rulings and Escalation
|
|
87
|
+
|
|
88
|
+
Resolve non-material ambiguity from the approved goal and repository evidence. Choose the smallest safe, reversible option that preserves the user's goal, constraints, permissions, and acceptance criteria.
|
|
89
|
+
|
|
90
|
+
Record significant rulings and assumptions in the active tracking surface or final report with:
|
|
91
|
+
|
|
92
|
+
- the decision or assumption;
|
|
93
|
+
- the evidence or reason;
|
|
94
|
+
- the cost if wrong.
|
|
95
|
+
|
|
96
|
+
Escalate rather than guess when a choice changes scope or acceptance, weakens security or data guarantees, changes a public API/protocol, expands permissions, creates an irreversible effect, conflicts with a specific user mandate, or has no evidence-based path. Strict process is otherwise justified only by an explicit user request or concrete risk.
|
|
97
|
+
|
|
98
|
+
## Review and Approval
|
|
99
|
+
|
|
100
|
+
Self-review a material design for requirement coverage, internal consistency, interfaces, risks, and acceptance evidence. Fix clear issues directly.
|
|
101
|
+
|
|
102
|
+
Request user review or approval only when their decision is needed, they explicitly requested the checkpoint, or a governing high-risk boundary requires it. Do not require approval section-by-section, repeat review because wording changed, or restart a design loop after a non-substantive edit. If substantive inputs change, revisit only the affected decisions and evidence.
|
|
103
|
+
|
|
104
|
+
A saved spec is not mandatory for a clear bounded change. Create one when the user requests it or durable coordination materially benefits from it. Do not create a separate design/spec commit by default.
|
|
105
|
+
|
|
106
|
+
## Implementation Handoff
|
|
107
|
+
|
|
108
|
+
Once the goal is authorized and material uncertainty is resolved, proceed through the applicable implementation workflow without asking for a second design approval. Hand off the goal, ideal end state, constraints, acceptance criteria, dependencies/interfaces, material risks, useful evidence, and recorded rulings. Use a file-backed plan when complex work needs the default planner/critic sequence or durable coordination; delegated workers remain conditional on execution value.
|