xtrm-tools 2.0.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/CHANGELOG.md +496 -0
- package/README.md +762 -0
- package/cli/dist/index.cjs +55245 -0
- package/cli/dist/index.cjs.map +1 -0
- package/cli/dist/index.d.cts +2 -0
- package/cli/package.json +43 -0
- package/config/.env.example +40 -0
- package/config/hooks.json +36 -0
- package/config/mcp_servers.json +46 -0
- package/config/mcp_servers_optional.json +53 -0
- package/config/settings.json +70 -0
- package/hooks/README.md +156 -0
- package/hooks/__pycache__/agent_context.cpython-314.pyc +0 -0
- package/hooks/agent_context.py +105 -0
- package/hooks/gitnexus/gitnexus-hook.cjs +133 -0
- package/hooks/serena-workflow-reminder.py +74 -0
- package/hooks/skill-discovery.py +90 -0
- package/hooks/skill-suggestion.py +112 -0
- package/hooks/test_agent_context.py +112 -0
- package/hooks/type-safety-enforcement.py +107 -0
- package/package.json +48 -0
- package/project-skills/main-guard/.claude/hooks/main-guard.cjs +188 -0
- package/project-skills/main-guard/.claude/settings.json +16 -0
- package/project-skills/main-guard/.claude/skills/using-main-guard/SKILL.md +135 -0
- package/project-skills/main-guard/README.md +163 -0
- package/project-skills/py-quality-gate/.claude/hooks/quality-check.py +311 -0
- package/project-skills/py-quality-gate/.claude/settings.json +16 -0
- package/project-skills/py-quality-gate/.claude/skills/using-py-quality-gate/SKILL.md +112 -0
- package/project-skills/py-quality-gate/README.md +147 -0
- package/project-skills/service-skills-set/.claude/git-hooks/__pycache__/doc_reminder.cpython-314.pyc +0 -0
- package/project-skills/service-skills-set/.claude/git-hooks/__pycache__/skill_staleness.cpython-314.pyc +0 -0
- package/project-skills/service-skills-set/.claude/git-hooks/doc_reminder.py +67 -0
- package/project-skills/service-skills-set/.claude/git-hooks/skill_staleness.py +194 -0
- package/project-skills/service-skills-set/.claude/service-registry.json +4 -0
- package/project-skills/service-skills-set/.claude/settings.json +37 -0
- package/project-skills/service-skills-set/.claude/skills/creating-service-skills/SKILL.md +433 -0
- package/project-skills/service-skills-set/.claude/skills/creating-service-skills/references/script_quality_standards.md +412 -0
- package/project-skills/service-skills-set/.claude/skills/creating-service-skills/references/service_skill_system_guide.md +264 -0
- package/project-skills/service-skills-set/.claude/skills/creating-service-skills/scripts/bootstrap.py +308 -0
- package/project-skills/service-skills-set/.claude/skills/creating-service-skills/scripts/deep_dive.py +304 -0
- package/project-skills/service-skills-set/.claude/skills/creating-service-skills/scripts/scaffolder.py +482 -0
- package/project-skills/service-skills-set/.claude/skills/scoping-service-skills/SKILL.md +231 -0
- package/project-skills/service-skills-set/.claude/skills/scoping-service-skills/scripts/scope.py +74 -0
- package/project-skills/service-skills-set/.claude/skills/updating-service-skills/SKILL.md +136 -0
- package/project-skills/service-skills-set/.claude/skills/updating-service-skills/scripts/__pycache__/drift_detector.cpython-314.pyc +0 -0
- package/project-skills/service-skills-set/.claude/skills/updating-service-skills/scripts/drift_detector.py +222 -0
- package/project-skills/service-skills-set/.claude/skills/using-service-skills/SKILL.md +108 -0
- package/project-skills/service-skills-set/.claude/skills/using-service-skills/scripts/__pycache__/cataloger.cpython-314.pyc +0 -0
- package/project-skills/service-skills-set/.claude/skills/using-service-skills/scripts/__pycache__/skill_activator.cpython-314.pyc +0 -0
- package/project-skills/service-skills-set/.claude/skills/using-service-skills/scripts/cataloger.py +74 -0
- package/project-skills/service-skills-set/.claude/skills/using-service-skills/scripts/skill_activator.py +152 -0
- package/project-skills/service-skills-set/README.md +93 -0
- package/project-skills/service-skills-set/__pycache__/install-service-skills.cpython-314.pyc +0 -0
- package/project-skills/service-skills-set/install-service-skills.py +163 -0
- package/project-skills/service-skills-set/service-skills-readme.md +236 -0
- package/project-skills/tdd-guard/.claude/settings.json +38 -0
- package/project-skills/tdd-guard/.claude/skills/using-tdd-guard/SKILL.md +74 -0
- package/project-skills/tdd-guard/CLAUDE.md +98 -0
- package/project-skills/tdd-guard/CONTRIBUTING.md +38 -0
- package/project-skills/tdd-guard/DEVELOPMENT.md +127 -0
- package/project-skills/tdd-guard/LICENSE +21 -0
- package/project-skills/tdd-guard/README.md +396 -0
- package/project-skills/tdd-guard/docs/adr/001-claude-session-subdirectory.md +52 -0
- package/project-skills/tdd-guard/docs/adr/002-secure-claude-binary-path.md +56 -0
- package/project-skills/tdd-guard/docs/adr/003-remove-configurable-data-directory.md +56 -0
- package/project-skills/tdd-guard/docs/adr/004-monorepo-architecture.md +64 -0
- package/project-skills/tdd-guard/docs/adr/005-claude-project-dir-support.md +55 -0
- package/project-skills/tdd-guard/docs/adr/006-phpunit-separate-repository.md +93 -0
- package/project-skills/tdd-guard/docs/adr/007-golangci-lint-path-support.md +83 -0
- package/project-skills/tdd-guard/docs/adr/008-storybook-reporter-design.md +182 -0
- package/project-skills/tdd-guard/docs/assets/tdd-guard-demo-screenshot.gif +0 -0
- package/project-skills/tdd-guard/docs/config-migration.md +143 -0
- package/project-skills/tdd-guard/docs/configuration.md +137 -0
- package/project-skills/tdd-guard/docs/custom-instructions.md +43 -0
- package/project-skills/tdd-guard/docs/enforcement.md +46 -0
- package/project-skills/tdd-guard/docs/ignore-patterns.md +81 -0
- package/project-skills/tdd-guard/docs/linting.md +109 -0
- package/project-skills/tdd-guard/docs/quick-commands.md +52 -0
- package/project-skills/tdd-guard/docs/session-management.md +75 -0
- package/project-skills/tdd-guard/docs/storybook-vitest-addon.md +120 -0
- package/project-skills/tdd-guard/docs/validation-model.md +63 -0
- package/project-skills/tdd-guard/eslint.config.mjs +140 -0
- package/project-skills/tdd-guard/package-lock.json +16937 -0
- package/project-skills/tdd-guard/package.json +102 -0
- package/project-skills/tdd-guard/reporters/go/README.md +67 -0
- package/project-skills/tdd-guard/reporters/go/cmd/tdd-guard-go/main.go +127 -0
- package/project-skills/tdd-guard/reporters/go/cmd/tdd-guard-go/main_test.go +280 -0
- package/project-skills/tdd-guard/reporters/go/go.mod +3 -0
- package/project-skills/tdd-guard/reporters/go/go.sum +0 -0
- package/project-skills/tdd-guard/reporters/go/internal/formatter/formatter.go +126 -0
- package/project-skills/tdd-guard/reporters/go/internal/formatter/formatter_test.go +264 -0
- package/project-skills/tdd-guard/reporters/go/internal/io/tee_reader.go +26 -0
- package/project-skills/tdd-guard/reporters/go/internal/io/tee_reader_test.go +37 -0
- package/project-skills/tdd-guard/reporters/go/internal/parser/mixed_reader.go +94 -0
- package/project-skills/tdd-guard/reporters/go/internal/parser/mixed_reader_test.go +198 -0
- package/project-skills/tdd-guard/reporters/go/internal/parser/parser.go +245 -0
- package/project-skills/tdd-guard/reporters/go/internal/parser/parser_test.go +547 -0
- package/project-skills/tdd-guard/reporters/go/internal/storage/storage.go +35 -0
- package/project-skills/tdd-guard/reporters/go/internal/storage/storage_test.go +113 -0
- package/project-skills/tdd-guard/reporters/go/internal/transformer/transformer.go +103 -0
- package/project-skills/tdd-guard/reporters/go/internal/transformer/transformer_test.go +303 -0
- package/project-skills/tdd-guard/reporters/jest/README.md +102 -0
- package/project-skills/tdd-guard/reporters/jest/package.json +38 -0
- package/project-skills/tdd-guard/reporters/phpunit/.php-cs-fixer.php +28 -0
- package/project-skills/tdd-guard/reporters/phpunit/README.md +97 -0
- package/project-skills/tdd-guard/reporters/phpunit/SYNC_README.md +29 -0
- package/project-skills/tdd-guard/reporters/phpunit/composer.json +55 -0
- package/project-skills/tdd-guard/reporters/phpunit/phpunit.xml.dist +19 -0
- package/project-skills/tdd-guard/reporters/phpunit/psalm.xml +44 -0
- package/project-skills/tdd-guard/reporters/phpunit/src/Event/ErroredTestSubscriber.php +28 -0
- package/project-skills/tdd-guard/reporters/phpunit/src/Event/FailedTestSubscriber.php +28 -0
- package/project-skills/tdd-guard/reporters/phpunit/src/Event/IncompleteTestSubscriber.php +28 -0
- package/project-skills/tdd-guard/reporters/phpunit/src/Event/PassedTestSubscriber.php +27 -0
- package/project-skills/tdd-guard/reporters/phpunit/src/Event/SkippedTestSubscriber.php +28 -0
- package/project-skills/tdd-guard/reporters/phpunit/src/Event/TestRunnerFinishedSubscriber.php +24 -0
- package/project-skills/tdd-guard/reporters/phpunit/src/PathValidator.php +88 -0
- package/project-skills/tdd-guard/reporters/phpunit/src/Storage.php +26 -0
- package/project-skills/tdd-guard/reporters/phpunit/src/TddGuardExtension.php +33 -0
- package/project-skills/tdd-guard/reporters/phpunit/src/TddGuardListener.php +158 -0
- package/project-skills/tdd-guard/reporters/phpunit/src/TddGuardSubscriber.php +35 -0
- package/project-skills/tdd-guard/reporters/phpunit/src/TestResultCollector.php +105 -0
- package/project-skills/tdd-guard/reporters/phpunit/tests/PathValidatorTest.php +74 -0
- package/project-skills/tdd-guard/reporters/phpunit/tests/TddGuardExtensionFailedTest.php +241 -0
- package/project-skills/tdd-guard/reporters/phpunit/tests/TddGuardExtensionTest.php +84 -0
- package/project-skills/tdd-guard/reporters/phpunit/tests/TddGuardStorageLocationTest.php +71 -0
- package/project-skills/tdd-guard/reporters/pytest/README.md +77 -0
- package/project-skills/tdd-guard/reporters/pytest/pyproject.toml +43 -0
- package/project-skills/tdd-guard/reporters/pytest/pytest.ini.example +7 -0
- package/project-skills/tdd-guard/reporters/pytest/tdd_guard_pytest/__init__.py +1 -0
- package/project-skills/tdd-guard/reporters/pytest/tdd_guard_pytest/pytest_reporter.py +134 -0
- package/project-skills/tdd-guard/reporters/pytest/tests/__init__.py +1 -0
- package/project-skills/tdd-guard/reporters/pytest/tests/conftest.py +3 -0
- package/project-skills/tdd-guard/reporters/pytest/tests/helpers.py +293 -0
- package/project-skills/tdd-guard/reporters/pytest/tests/test_config_option.py +38 -0
- package/project-skills/tdd-guard/reporters/pytest/tests/test_path_validation.py +59 -0
- package/project-skills/tdd-guard/reporters/pytest/tests/test_plugin_config.py +32 -0
- package/project-skills/tdd-guard/reporters/pytest/tests/test_project_root.py +296 -0
- package/project-skills/tdd-guard/reporters/pytest/tests/test_pytest_reporter.py +137 -0
- package/project-skills/tdd-guard/reporters/rspec/Gemfile +3 -0
- package/project-skills/tdd-guard/reporters/rust/Cargo.lock +458 -0
- package/project-skills/tdd-guard/reporters/rust/Cargo.toml +33 -0
- package/project-skills/tdd-guard/reporters/rust/Makefile.example +95 -0
- package/project-skills/tdd-guard/reporters/rust/README.md +88 -0
- package/project-skills/tdd-guard/reporters/rust/src/error_parser.rs +309 -0
- package/project-skills/tdd-guard/reporters/rust/src/main.rs +464 -0
- package/project-skills/tdd-guard/reporters/rust/src/parser.rs +225 -0
- package/project-skills/tdd-guard/reporters/rust/src/transformer.rs +409 -0
- package/project-skills/tdd-guard/reporters/storybook/README.md +108 -0
- package/project-skills/tdd-guard/reporters/storybook/package-lock.json +9482 -0
- package/project-skills/tdd-guard/reporters/storybook/package.json +43 -0
- package/project-skills/tdd-guard/reporters/storybook/src/StorybookReporter.test-data.ts +22 -0
- package/project-skills/tdd-guard/reporters/storybook/src/StorybookReporter.test.ts +190 -0
- package/project-skills/tdd-guard/reporters/storybook/src/StorybookReporter.ts +88 -0
- package/project-skills/tdd-guard/reporters/storybook/src/index.ts +12 -0
- package/project-skills/tdd-guard/reporters/storybook/src/types.ts +37 -0
- package/project-skills/tdd-guard/reporters/storybook/tsconfig.json +11 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/go/failing/go.mod +3 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/go/failing/single_failing_test.go +13 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/go/import/go.mod +3 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/go/import/single_import_error_test.go +17 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/go/passing/go.mod +3 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/go/passing/single_passing_test.go +13 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/jest/single-failing.test.js +5 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/jest/single-import-error.test.js +8 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/jest/single-passing.test.js +5 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/phpunit/SingleFailingTest.php +11 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/phpunit/SingleImportErrorTest.php +14 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/phpunit/SinglePassingTest.php +11 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/pytest/test_single_failing.py +3 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/pytest/test_single_import_error.py +6 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/pytest/test_single_passing.py +3 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/rust/failing/Cargo.lock +7 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/rust/failing/Cargo.toml +4 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/rust/failing/src/lib.rs +14 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/rust/import/Cargo.lock +7 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/rust/import/Cargo.toml +4 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/rust/import/src/lib.rs +13 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/rust/passing/Cargo.lock +7 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/rust/passing/Cargo.toml +4 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/rust/passing/src/lib.rs +14 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/storybook/Calculator.js +4 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/storybook/single-failing.stories.js +15 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/storybook/single-import-error.stories.js +14 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/storybook/single-passing.stories.js +15 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/vitest/single-failing.test.js +7 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/vitest/single-import-error.test.js +9 -0
- package/project-skills/tdd-guard/reporters/test/artifacts/vitest/single-passing.test.js +7 -0
- package/project-skills/tdd-guard/reporters/test/factories/go.ts +59 -0
- package/project-skills/tdd-guard/reporters/test/factories/helpers.ts +48 -0
- package/project-skills/tdd-guard/reporters/test/factories/index.ts +7 -0
- package/project-skills/tdd-guard/reporters/test/factories/jest.ts +51 -0
- package/project-skills/tdd-guard/reporters/test/factories/phpunit.ts +63 -0
- package/project-skills/tdd-guard/reporters/test/factories/pytest.ts +41 -0
- package/project-skills/tdd-guard/reporters/test/factories/rust.ts +158 -0
- package/project-skills/tdd-guard/reporters/test/factories/storybook.ts +198 -0
- package/project-skills/tdd-guard/reporters/test/factories/vitest.ts +51 -0
- package/project-skills/tdd-guard/reporters/test/reporters.integration.test.ts +735 -0
- package/project-skills/tdd-guard/reporters/test/types.ts +28 -0
- package/project-skills/tdd-guard/reporters/vitest/README.md +64 -0
- package/project-skills/tdd-guard/reporters/vitest/package.json +35 -0
- package/project-skills/tdd-guard/src/cli/buildContext.test.ts +200 -0
- package/project-skills/tdd-guard/src/cli/buildContext.ts +48 -0
- package/project-skills/tdd-guard/src/cli/tdd-guard.test.ts +159 -0
- package/project-skills/tdd-guard/src/cli/tdd-guard.ts +48 -0
- package/project-skills/tdd-guard/src/config/Config.test.ts +538 -0
- package/project-skills/tdd-guard/src/config/Config.ts +172 -0
- package/project-skills/tdd-guard/src/contracts/schemas/guardSchemas.test.ts +58 -0
- package/project-skills/tdd-guard/src/contracts/schemas/guardSchemas.ts +8 -0
- package/project-skills/tdd-guard/src/contracts/schemas/lintSchemas.test.ts +347 -0
- package/project-skills/tdd-guard/src/contracts/schemas/lintSchemas.ts +61 -0
- package/project-skills/tdd-guard/src/contracts/schemas/pytestSchemas.test.ts +24 -0
- package/project-skills/tdd-guard/src/contracts/schemas/pytestSchemas.ts +7 -0
- package/project-skills/tdd-guard/src/contracts/schemas/reporterSchemas.test.ts +377 -0
- package/project-skills/tdd-guard/src/contracts/schemas/reporterSchemas.ts +75 -0
- package/project-skills/tdd-guard/src/contracts/schemas/toolSchemas.test.ts +563 -0
- package/project-skills/tdd-guard/src/contracts/schemas/toolSchemas.ts +140 -0
- package/project-skills/tdd-guard/src/contracts/types/ClientType.ts +1 -0
- package/project-skills/tdd-guard/src/contracts/types/ConfigOptions.ts +12 -0
- package/project-skills/tdd-guard/src/contracts/types/Context.ts +16 -0
- package/project-skills/tdd-guard/src/contracts/types/ModelClient.ts +3 -0
- package/project-skills/tdd-guard/src/contracts/types/ValidationResult.ts +6 -0
- package/project-skills/tdd-guard/src/guard/GuardManager.test.ts +336 -0
- package/project-skills/tdd-guard/src/guard/GuardManager.ts +83 -0
- package/project-skills/tdd-guard/src/hooks/HookEvents.test.ts +107 -0
- package/project-skills/tdd-guard/src/hooks/HookEvents.ts +39 -0
- package/project-skills/tdd-guard/src/hooks/fileTypeDetection.ts +16 -0
- package/project-skills/tdd-guard/src/hooks/postToolLint.test.ts +327 -0
- package/project-skills/tdd-guard/src/hooks/postToolLint.ts +165 -0
- package/project-skills/tdd-guard/src/hooks/processHookData.test.ts +465 -0
- package/project-skills/tdd-guard/src/hooks/processHookData.ts +203 -0
- package/project-skills/tdd-guard/src/hooks/sessionHandler.test.ts +136 -0
- package/project-skills/tdd-guard/src/hooks/sessionHandler.ts +31 -0
- package/project-skills/tdd-guard/src/hooks/userPromptHandler.test.ts +131 -0
- package/project-skills/tdd-guard/src/hooks/userPromptHandler.ts +55 -0
- package/project-skills/tdd-guard/src/index.ts +19 -0
- package/project-skills/tdd-guard/src/linters/Linter.ts +5 -0
- package/project-skills/tdd-guard/src/linters/eslint/ESLint.test.ts +183 -0
- package/project-skills/tdd-guard/src/linters/eslint/ESLint.ts +82 -0
- package/project-skills/tdd-guard/src/linters/golangci/GolangciLint.test.ts +170 -0
- package/project-skills/tdd-guard/src/linters/golangci/GolangciLint.ts +148 -0
- package/project-skills/tdd-guard/src/processors/index.ts +1 -0
- package/project-skills/tdd-guard/src/processors/lintProcessor.ts +77 -0
- package/project-skills/tdd-guard/src/processors/testResults/TestResultsProcessor.test.ts +303 -0
- package/project-skills/tdd-guard/src/processors/testResults/TestResultsProcessor.ts +255 -0
- package/project-skills/tdd-guard/src/providers/LinterProvider.test.ts +43 -0
- package/project-skills/tdd-guard/src/providers/LinterProvider.ts +20 -0
- package/project-skills/tdd-guard/src/providers/ModelClientProvider.test.ts +68 -0
- package/project-skills/tdd-guard/src/providers/ModelClientProvider.ts +22 -0
- package/project-skills/tdd-guard/src/storage/FileStorage.test.ts +76 -0
- package/project-skills/tdd-guard/src/storage/FileStorage.ts +108 -0
- package/project-skills/tdd-guard/src/storage/MemoryStorage.ts +57 -0
- package/project-skills/tdd-guard/src/storage/Storage.test.ts +227 -0
- package/project-skills/tdd-guard/src/storage/Storage.ts +17 -0
- package/project-skills/tdd-guard/src/validation/context/context.test.ts +364 -0
- package/project-skills/tdd-guard/src/validation/context/context.ts +155 -0
- package/project-skills/tdd-guard/src/validation/models/AnthropicApi.test.ts +171 -0
- package/project-skills/tdd-guard/src/validation/models/AnthropicApi.ts +49 -0
- package/project-skills/tdd-guard/src/validation/models/ClaudeAgentSdk.test.ts +167 -0
- package/project-skills/tdd-guard/src/validation/models/ClaudeAgentSdk.ts +54 -0
- package/project-skills/tdd-guard/src/validation/models/ClaudeCli.test.ts +239 -0
- package/project-skills/tdd-guard/src/validation/models/ClaudeCli.ts +57 -0
- package/project-skills/tdd-guard/src/validation/prompts/file-types.ts +52 -0
- package/project-skills/tdd-guard/src/validation/prompts/operations/edit.ts +58 -0
- package/project-skills/tdd-guard/src/validation/prompts/operations/multi-edit.ts +54 -0
- package/project-skills/tdd-guard/src/validation/prompts/operations/write.ts +54 -0
- package/project-skills/tdd-guard/src/validation/prompts/response.ts +40 -0
- package/project-skills/tdd-guard/src/validation/prompts/rules.ts +51 -0
- package/project-skills/tdd-guard/src/validation/prompts/system-prompt.ts +10 -0
- package/project-skills/tdd-guard/src/validation/prompts/tools/lint-results.ts +15 -0
- package/project-skills/tdd-guard/src/validation/prompts/tools/test-output.ts +14 -0
- package/project-skills/tdd-guard/src/validation/prompts/tools/todos.ts +9 -0
- package/project-skills/tdd-guard/src/validation/validator.test.ts +268 -0
- package/project-skills/tdd-guard/src/validation/validator.ts +159 -0
- package/project-skills/tdd-guard/test/artifacts/go/.golangci.yml +6 -0
- package/project-skills/tdd-guard/test/artifacts/go/with-issues/file-with-issues.go +12 -0
- package/project-skills/tdd-guard/test/artifacts/go/with-issues/go.mod +3 -0
- package/project-skills/tdd-guard/test/artifacts/go/without-issues/file-without-issues.go +7 -0
- package/project-skills/tdd-guard/test/artifacts/go/without-issues/go.mod +3 -0
- package/project-skills/tdd-guard/test/artifacts/javascript/eslint.config.js +20 -0
- package/project-skills/tdd-guard/test/artifacts/javascript/file-with-issues.js +12 -0
- package/project-skills/tdd-guard/test/artifacts/javascript/file-without-issues.js +10 -0
- package/project-skills/tdd-guard/test/hooks/fileTypeDetection.test.ts +26 -0
- package/project-skills/tdd-guard/test/hooks/processHookData.fileType.test.ts +46 -0
- package/project-skills/tdd-guard/test/hooks/processHookData.python.test.ts +68 -0
- package/project-skills/tdd-guard/test/integration/test-context.test.ts +66 -0
- package/project-skills/tdd-guard/test/integration/validator.core.test.ts +96 -0
- package/project-skills/tdd-guard/test/integration/validator.scenarios.test.ts +497 -0
- package/project-skills/tdd-guard/test/utils/assertions.ts +29 -0
- package/project-skills/tdd-guard/test/utils/factories/contextFactory.ts +30 -0
- package/project-skills/tdd-guard/test/utils/factories/editFactory.ts +82 -0
- package/project-skills/tdd-guard/test/utils/factories/helpers.test.ts +46 -0
- package/project-skills/tdd-guard/test/utils/factories/helpers.ts +46 -0
- package/project-skills/tdd-guard/test/utils/factories/lintFactory.ts +352 -0
- package/project-skills/tdd-guard/test/utils/factories/modelClientProviderFactory.ts +21 -0
- package/project-skills/tdd-guard/test/utils/factories/multiEditFactory.ts +79 -0
- package/project-skills/tdd-guard/test/utils/factories/operations.ts +57 -0
- package/project-skills/tdd-guard/test/utils/factories/reporterFactory.ts +55 -0
- package/project-skills/tdd-guard/test/utils/factories/scenarios/index.ts +22 -0
- package/project-skills/tdd-guard/test/utils/factories/scenarios/languages/python.ts +745 -0
- package/project-skills/tdd-guard/test/utils/factories/scenarios/languages/typescript.ts +767 -0
- package/project-skills/tdd-guard/test/utils/factories/scenarios/types.ts +77 -0
- package/project-skills/tdd-guard/test/utils/factories/scenarios/utils.ts +15 -0
- package/project-skills/tdd-guard/test/utils/factories/sessionStartFactory.ts +36 -0
- package/project-skills/tdd-guard/test/utils/factories/testDefaults.ts +90 -0
- package/project-skills/tdd-guard/test/utils/factories/testResultsFactory.ts +234 -0
- package/project-skills/tdd-guard/test/utils/factories/todoFactory.ts +99 -0
- package/project-skills/tdd-guard/test/utils/factories/userPromptSubmitFactory.ts +39 -0
- package/project-skills/tdd-guard/test/utils/factories/writeFactory.ts +70 -0
- package/project-skills/tdd-guard/test/utils/index.ts +131 -0
- package/project-skills/tdd-guard/tsconfig.build.json +16 -0
- package/project-skills/tdd-guard/tsconfig.eslint.json +17 -0
- package/project-skills/tdd-guard/tsconfig.json +32 -0
- package/project-skills/tdd-guard/tsconfig.node.json +10 -0
- package/project-skills/tdd-guard/vitest.config.ts +85 -0
- package/project-skills/ts-quality-gate/.claude/hooks/hook-config.json +66 -0
- package/project-skills/ts-quality-gate/.claude/hooks/quality-check.cjs +1251 -0
- package/project-skills/ts-quality-gate/.claude/settings.json +16 -0
- package/project-skills/ts-quality-gate/.claude/skills/using-ts-quality-gate/SKILL.md +81 -0
- package/project-skills/ts-quality-gate/README.md +115 -0
- package/skills/README.txt +31 -0
- package/skills/clean-code/SKILL.md +201 -0
- package/skills/delegating/SKILL.md +196 -0
- package/skills/delegating/config.yaml +210 -0
- package/skills/delegating/references/orchestration-protocols.md +41 -0
- package/skills/docker-expert/SKILL.md +409 -0
- package/skills/documenting/CHANGELOG.md +23 -0
- package/skills/documenting/README.md +148 -0
- package/skills/documenting/SKILL.md +113 -0
- package/skills/documenting/examples/example_pattern.md +70 -0
- package/skills/documenting/examples/example_reference.md +70 -0
- package/skills/documenting/examples/example_ssot_analytics.md +64 -0
- package/skills/documenting/examples/example_workflow.md +141 -0
- package/skills/documenting/references/changelog-format.md +97 -0
- package/skills/documenting/references/metadata-schema.md +136 -0
- package/skills/documenting/references/taxonomy.md +81 -0
- package/skills/documenting/references/versioning-rules.md +78 -0
- package/skills/documenting/scripts/__pycache__/drift_detector.cpython-314.pyc +0 -0
- package/skills/documenting/scripts/__pycache__/orchestrator.cpython-314.pyc +0 -0
- package/skills/documenting/scripts/__pycache__/validate_metadata.cpython-314.pyc +0 -0
- package/skills/documenting/scripts/bump_version.sh +60 -0
- package/skills/documenting/scripts/changelog/__init__.py +0 -0
- package/skills/documenting/scripts/changelog/__pycache__/__init__.cpython-314.pyc +0 -0
- package/skills/documenting/scripts/changelog/__pycache__/add_entry.cpython-314.pyc +0 -0
- package/skills/documenting/scripts/changelog/__pycache__/bump_release.cpython-314.pyc +0 -0
- package/skills/documenting/scripts/changelog/__pycache__/validate_changelog.cpython-314.pyc +0 -0
- package/skills/documenting/scripts/changelog/add_entry.py +216 -0
- package/skills/documenting/scripts/changelog/bump_release.py +117 -0
- package/skills/documenting/scripts/changelog/init_changelog.py +54 -0
- package/skills/documenting/scripts/changelog/validate_changelog.py +128 -0
- package/skills/documenting/scripts/drift_detector.py +266 -0
- package/skills/documenting/scripts/generate_template.py +311 -0
- package/skills/documenting/scripts/list_by_category.sh +84 -0
- package/skills/documenting/scripts/orchestrator.py +255 -0
- package/skills/documenting/scripts/validate_metadata.py +242 -0
- package/skills/documenting/templates/CHANGELOG.md.template +13 -0
- package/skills/documenting/tests/__pycache__/test_changelog.cpython-314-pytest-9.0.2.pyc +0 -0
- package/skills/documenting/tests/__pycache__/test_drift_detector.cpython-314-pytest-9.0.2.pyc +0 -0
- package/skills/documenting/tests/__pycache__/test_orchestrator.cpython-314-pytest-9.0.2.pyc +0 -0
- package/skills/documenting/tests/__pycache__/test_validate_metadata.cpython-314-pytest-9.0.2.pyc +0 -0
- package/skills/documenting/tests/integration_test.sh +70 -0
- package/skills/documenting/tests/test_changelog.py +201 -0
- package/skills/documenting/tests/test_drift_detector.py +80 -0
- package/skills/documenting/tests/test_orchestrator.py +52 -0
- package/skills/documenting/tests/test_validate_metadata.py +64 -0
- package/skills/find-skills/SKILL.md +133 -0
- package/skills/gitnexus-debugging/SKILL.md +85 -0
- package/skills/gitnexus-exploring/SKILL.md +75 -0
- package/skills/gitnexus-impact-analysis/SKILL.md +94 -0
- package/skills/gitnexus-refactoring/SKILL.md +113 -0
- package/skills/hook-development/SKILL.md +797 -0
- package/skills/hook-development/examples/load-context.sh +55 -0
- package/skills/hook-development/examples/quality-check.js +1168 -0
- package/skills/hook-development/examples/validate-bash.sh +43 -0
- package/skills/hook-development/examples/validate-write.sh +38 -0
- package/skills/hook-development/references/advanced.md +527 -0
- package/skills/hook-development/references/migration.md +369 -0
- package/skills/hook-development/references/patterns.md +412 -0
- package/skills/hook-development/scripts/README.md +164 -0
- package/skills/hook-development/scripts/hook-linter.sh +153 -0
- package/skills/hook-development/scripts/test-hook.sh +252 -0
- package/skills/hook-development/scripts/validate-hook-schema.sh +159 -0
- package/skills/obsidian-cli/SKILL.md +106 -0
- package/skills/orchestrating-agents/SKILL.md +135 -0
- package/skills/orchestrating-agents/config.yaml +45 -0
- package/skills/orchestrating-agents/references/agent-context-integration.md +37 -0
- package/skills/orchestrating-agents/references/examples.md +45 -0
- package/skills/orchestrating-agents/references/handover-protocol.md +31 -0
- package/skills/orchestrating-agents/references/workflows.md +42 -0
- package/skills/orchestrating-agents/scripts/detect_neighbors.py +23 -0
- package/skills/prompt-improving/README.md +162 -0
- package/skills/prompt-improving/SKILL.md +74 -0
- package/skills/prompt-improving/references/analysis_commands.md +24 -0
- package/skills/prompt-improving/references/chain_of_thought.md +24 -0
- package/skills/prompt-improving/references/mcp_definitions.md +20 -0
- package/skills/prompt-improving/references/multishot.md +23 -0
- package/skills/prompt-improving/references/xml_core.md +60 -0
- package/skills/python-testing/SKILL.md +815 -0
- package/skills/senior-backend/SKILL.md +209 -0
- package/skills/senior-backend/references/api_design_patterns.md +103 -0
- package/skills/senior-backend/references/backend_security_practices.md +103 -0
- package/skills/senior-backend/references/database_optimization_guide.md +103 -0
- package/skills/senior-backend/scripts/api_load_tester.py +114 -0
- package/skills/senior-backend/scripts/api_scaffolder.py +114 -0
- package/skills/senior-backend/scripts/database_migration_tool.py +114 -0
- package/skills/senior-data-scientist/SKILL.md +226 -0
- package/skills/senior-data-scientist/references/experiment_design_frameworks.md +80 -0
- package/skills/senior-data-scientist/references/feature_engineering_patterns.md +80 -0
- package/skills/senior-data-scientist/references/statistical_methods_advanced.md +80 -0
- package/skills/senior-data-scientist/scripts/experiment_designer.py +100 -0
- package/skills/senior-data-scientist/scripts/feature_engineering_pipeline.py +100 -0
- package/skills/senior-data-scientist/scripts/model_evaluation_suite.py +100 -0
- package/skills/senior-devops/SKILL.md +209 -0
- package/skills/senior-devops/references/cicd_pipeline_guide.md +103 -0
- package/skills/senior-devops/references/deployment_strategies.md +103 -0
- package/skills/senior-devops/references/infrastructure_as_code.md +103 -0
- package/skills/senior-devops/scripts/deployment_manager.py +114 -0
- package/skills/senior-devops/scripts/pipeline_generator.py +114 -0
- package/skills/senior-devops/scripts/terraform_scaffolder.py +114 -0
- package/skills/senior-security/SKILL.md +209 -0
- package/skills/senior-security/references/cryptography_implementation.md +103 -0
- package/skills/senior-security/references/penetration_testing_guide.md +103 -0
- package/skills/senior-security/references/security_architecture_patterns.md +103 -0
- package/skills/senior-security/scripts/pentest_automator.py +114 -0
- package/skills/senior-security/scripts/security_auditor.py +114 -0
- package/skills/senior-security/scripts/threat_modeler.py +114 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/SKILL.md +479 -0
- package/skills/skill-creator/agents/analyzer.md +274 -0
- package/skills/skill-creator/agents/comparator.md +202 -0
- package/skills/skill-creator/agents/grader.md +223 -0
- package/skills/skill-creator/assets/eval_review.html +146 -0
- package/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/skills/skill-creator/references/schemas.md +430 -0
- package/skills/skill-creator/scripts/__init__.py +0 -0
- package/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/skills/skill-creator/scripts/generate_report.py +326 -0
- package/skills/skill-creator/scripts/improve_description.py +248 -0
- package/skills/skill-creator/scripts/package_skill.py +136 -0
- package/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/skills/skill-creator/scripts/run_eval.py +310 -0
- package/skills/skill-creator/scripts/run_loop.py +332 -0
- package/skills/skill-creator/scripts/utils.py +47 -0
- package/skills/using-TDD/SKILL.md +410 -0
- package/skills/using-serena-lsp/README.md +8 -0
- package/skills/using-serena-lsp/REFERENCE.md +194 -0
- package/skills/using-serena-lsp/SKILL.md +82 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Hook Testing Helper
|
|
3
|
+
# Tests a hook with sample input and shows output
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
# Usage
|
|
8
|
+
show_usage() {
|
|
9
|
+
echo "Usage: $0 [options] <hook-script> <test-input.json>"
|
|
10
|
+
echo ""
|
|
11
|
+
echo "Options:"
|
|
12
|
+
echo " -h, --help Show this help message"
|
|
13
|
+
echo " -v, --verbose Show detailed execution information"
|
|
14
|
+
echo " -t, --timeout N Set timeout in seconds (default: 60)"
|
|
15
|
+
echo ""
|
|
16
|
+
echo "Examples:"
|
|
17
|
+
echo " $0 validate-bash.sh test-input.json"
|
|
18
|
+
echo " $0 -v -t 30 validate-write.sh write-input.json"
|
|
19
|
+
echo ""
|
|
20
|
+
echo "Creates sample test input with:"
|
|
21
|
+
echo " $0 --create-sample <event-type>"
|
|
22
|
+
exit 0
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
# Create sample input
|
|
26
|
+
create_sample() {
|
|
27
|
+
event_type="$1"
|
|
28
|
+
|
|
29
|
+
case "$event_type" in
|
|
30
|
+
PreToolUse)
|
|
31
|
+
cat <<'EOF'
|
|
32
|
+
{
|
|
33
|
+
"session_id": "test-session",
|
|
34
|
+
"transcript_path": "/tmp/transcript.txt",
|
|
35
|
+
"cwd": "/tmp/test-project",
|
|
36
|
+
"permission_mode": "ask",
|
|
37
|
+
"hook_event_name": "PreToolUse",
|
|
38
|
+
"tool_name": "Write",
|
|
39
|
+
"tool_input": {
|
|
40
|
+
"file_path": "/tmp/test.txt",
|
|
41
|
+
"content": "Test content"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
EOF
|
|
45
|
+
;;
|
|
46
|
+
PostToolUse)
|
|
47
|
+
cat <<'EOF'
|
|
48
|
+
{
|
|
49
|
+
"session_id": "test-session",
|
|
50
|
+
"transcript_path": "/tmp/transcript.txt",
|
|
51
|
+
"cwd": "/tmp/test-project",
|
|
52
|
+
"permission_mode": "ask",
|
|
53
|
+
"hook_event_name": "PostToolUse",
|
|
54
|
+
"tool_name": "Bash",
|
|
55
|
+
"tool_result": "Command executed successfully"
|
|
56
|
+
}
|
|
57
|
+
EOF
|
|
58
|
+
;;
|
|
59
|
+
Stop|SubagentStop)
|
|
60
|
+
cat <<'EOF'
|
|
61
|
+
{
|
|
62
|
+
"session_id": "test-session",
|
|
63
|
+
"transcript_path": "/tmp/transcript.txt",
|
|
64
|
+
"cwd": "/tmp/test-project",
|
|
65
|
+
"permission_mode": "ask",
|
|
66
|
+
"hook_event_name": "Stop",
|
|
67
|
+
"reason": "Task appears complete"
|
|
68
|
+
}
|
|
69
|
+
EOF
|
|
70
|
+
;;
|
|
71
|
+
UserPromptSubmit)
|
|
72
|
+
cat <<'EOF'
|
|
73
|
+
{
|
|
74
|
+
"session_id": "test-session",
|
|
75
|
+
"transcript_path": "/tmp/transcript.txt",
|
|
76
|
+
"cwd": "/tmp/test-project",
|
|
77
|
+
"permission_mode": "ask",
|
|
78
|
+
"hook_event_name": "UserPromptSubmit",
|
|
79
|
+
"user_prompt": "Test user prompt"
|
|
80
|
+
}
|
|
81
|
+
EOF
|
|
82
|
+
;;
|
|
83
|
+
SessionStart|SessionEnd)
|
|
84
|
+
cat <<'EOF'
|
|
85
|
+
{
|
|
86
|
+
"session_id": "test-session",
|
|
87
|
+
"transcript_path": "/tmp/transcript.txt",
|
|
88
|
+
"cwd": "/tmp/test-project",
|
|
89
|
+
"permission_mode": "ask",
|
|
90
|
+
"hook_event_name": "SessionStart"
|
|
91
|
+
}
|
|
92
|
+
EOF
|
|
93
|
+
;;
|
|
94
|
+
*)
|
|
95
|
+
echo "Unknown event type: $event_type"
|
|
96
|
+
echo "Valid types: PreToolUse, PostToolUse, Stop, SubagentStop, UserPromptSubmit, SessionStart, SessionEnd"
|
|
97
|
+
exit 1
|
|
98
|
+
;;
|
|
99
|
+
esac
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
# Parse arguments
|
|
103
|
+
VERBOSE=false
|
|
104
|
+
TIMEOUT=60
|
|
105
|
+
|
|
106
|
+
while [ $# -gt 0 ]; do
|
|
107
|
+
case "$1" in
|
|
108
|
+
-h|--help)
|
|
109
|
+
show_usage
|
|
110
|
+
;;
|
|
111
|
+
-v|--verbose)
|
|
112
|
+
VERBOSE=true
|
|
113
|
+
shift
|
|
114
|
+
;;
|
|
115
|
+
-t|--timeout)
|
|
116
|
+
TIMEOUT="$2"
|
|
117
|
+
shift 2
|
|
118
|
+
;;
|
|
119
|
+
--create-sample)
|
|
120
|
+
create_sample "$2"
|
|
121
|
+
exit 0
|
|
122
|
+
;;
|
|
123
|
+
*)
|
|
124
|
+
break
|
|
125
|
+
;;
|
|
126
|
+
esac
|
|
127
|
+
done
|
|
128
|
+
|
|
129
|
+
if [ $# -ne 2 ]; then
|
|
130
|
+
echo "Error: Missing required arguments"
|
|
131
|
+
echo ""
|
|
132
|
+
show_usage
|
|
133
|
+
fi
|
|
134
|
+
|
|
135
|
+
HOOK_SCRIPT="$1"
|
|
136
|
+
TEST_INPUT="$2"
|
|
137
|
+
|
|
138
|
+
# Validate inputs
|
|
139
|
+
if [ ! -f "$HOOK_SCRIPT" ]; then
|
|
140
|
+
echo "❌ Error: Hook script not found: $HOOK_SCRIPT"
|
|
141
|
+
exit 1
|
|
142
|
+
fi
|
|
143
|
+
|
|
144
|
+
if [ ! -x "$HOOK_SCRIPT" ]; then
|
|
145
|
+
echo "⚠️ Warning: Hook script is not executable. Attempting to run with bash..."
|
|
146
|
+
HOOK_SCRIPT="bash $HOOK_SCRIPT"
|
|
147
|
+
fi
|
|
148
|
+
|
|
149
|
+
if [ ! -f "$TEST_INPUT" ]; then
|
|
150
|
+
echo "❌ Error: Test input not found: $TEST_INPUT"
|
|
151
|
+
exit 1
|
|
152
|
+
fi
|
|
153
|
+
|
|
154
|
+
# Validate test input JSON
|
|
155
|
+
if ! jq empty "$TEST_INPUT" 2>/dev/null; then
|
|
156
|
+
echo "❌ Error: Test input is not valid JSON"
|
|
157
|
+
exit 1
|
|
158
|
+
fi
|
|
159
|
+
|
|
160
|
+
echo "🧪 Testing hook: $HOOK_SCRIPT"
|
|
161
|
+
echo "📥 Input: $TEST_INPUT"
|
|
162
|
+
echo ""
|
|
163
|
+
|
|
164
|
+
if [ "$VERBOSE" = true ]; then
|
|
165
|
+
echo "Input JSON:"
|
|
166
|
+
jq . "$TEST_INPUT"
|
|
167
|
+
echo ""
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
# Set up environment
|
|
171
|
+
export CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-/tmp/test-project}"
|
|
172
|
+
export CLAUDE_PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(pwd)}"
|
|
173
|
+
export CLAUDE_ENV_FILE="${CLAUDE_ENV_FILE:-/tmp/test-env-$$}"
|
|
174
|
+
|
|
175
|
+
if [ "$VERBOSE" = true ]; then
|
|
176
|
+
echo "Environment:"
|
|
177
|
+
echo " CLAUDE_PROJECT_DIR=$CLAUDE_PROJECT_DIR"
|
|
178
|
+
echo " CLAUDE_PLUGIN_ROOT=$CLAUDE_PLUGIN_ROOT"
|
|
179
|
+
echo " CLAUDE_ENV_FILE=$CLAUDE_ENV_FILE"
|
|
180
|
+
echo ""
|
|
181
|
+
fi
|
|
182
|
+
|
|
183
|
+
# Run the hook
|
|
184
|
+
echo "▶️ Running hook (timeout: ${TIMEOUT}s)..."
|
|
185
|
+
echo ""
|
|
186
|
+
|
|
187
|
+
start_time=$(date +%s)
|
|
188
|
+
|
|
189
|
+
set +e
|
|
190
|
+
output=$(timeout "$TIMEOUT" bash -c "cat '$TEST_INPUT' | $HOOK_SCRIPT" 2>&1)
|
|
191
|
+
exit_code=$?
|
|
192
|
+
set -e
|
|
193
|
+
|
|
194
|
+
end_time=$(date +%s)
|
|
195
|
+
duration=$((end_time - start_time))
|
|
196
|
+
|
|
197
|
+
# Analyze results
|
|
198
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
199
|
+
echo "Results:"
|
|
200
|
+
echo ""
|
|
201
|
+
echo "Exit Code: $exit_code"
|
|
202
|
+
echo "Duration: ${duration}s"
|
|
203
|
+
echo ""
|
|
204
|
+
|
|
205
|
+
case $exit_code in
|
|
206
|
+
0)
|
|
207
|
+
echo "✅ Hook approved/succeeded"
|
|
208
|
+
;;
|
|
209
|
+
2)
|
|
210
|
+
echo "🚫 Hook blocked/denied"
|
|
211
|
+
;;
|
|
212
|
+
124)
|
|
213
|
+
echo "⏱️ Hook timed out after ${TIMEOUT}s"
|
|
214
|
+
;;
|
|
215
|
+
*)
|
|
216
|
+
echo "⚠️ Hook returned unexpected exit code: $exit_code"
|
|
217
|
+
;;
|
|
218
|
+
esac
|
|
219
|
+
|
|
220
|
+
echo ""
|
|
221
|
+
echo "Output:"
|
|
222
|
+
if [ -n "$output" ]; then
|
|
223
|
+
echo "$output"
|
|
224
|
+
echo ""
|
|
225
|
+
|
|
226
|
+
# Try to parse as JSON
|
|
227
|
+
if echo "$output" | jq empty 2>/dev/null; then
|
|
228
|
+
echo "Parsed JSON output:"
|
|
229
|
+
echo "$output" | jq .
|
|
230
|
+
fi
|
|
231
|
+
else
|
|
232
|
+
echo "(no output)"
|
|
233
|
+
fi
|
|
234
|
+
|
|
235
|
+
# Check for environment file
|
|
236
|
+
if [ -f "$CLAUDE_ENV_FILE" ]; then
|
|
237
|
+
echo ""
|
|
238
|
+
echo "Environment file created:"
|
|
239
|
+
cat "$CLAUDE_ENV_FILE"
|
|
240
|
+
rm -f "$CLAUDE_ENV_FILE"
|
|
241
|
+
fi
|
|
242
|
+
|
|
243
|
+
echo ""
|
|
244
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
245
|
+
|
|
246
|
+
if [ $exit_code -eq 0 ] || [ $exit_code -eq 2 ]; then
|
|
247
|
+
echo "✅ Test completed successfully"
|
|
248
|
+
exit 0
|
|
249
|
+
else
|
|
250
|
+
echo "❌ Test failed"
|
|
251
|
+
exit 1
|
|
252
|
+
fi
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Hook Schema Validator
|
|
3
|
+
# Validates hooks.json structure and checks for common issues
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
# Usage
|
|
8
|
+
if [ $# -eq 0 ]; then
|
|
9
|
+
echo "Usage: $0 <path/to/hooks.json>"
|
|
10
|
+
echo ""
|
|
11
|
+
echo "Validates hook configuration file for:"
|
|
12
|
+
echo " - Valid JSON syntax"
|
|
13
|
+
echo " - Required fields"
|
|
14
|
+
echo " - Hook type validity"
|
|
15
|
+
echo " - Matcher patterns"
|
|
16
|
+
echo " - Timeout ranges"
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
HOOKS_FILE="$1"
|
|
21
|
+
|
|
22
|
+
if [ ! -f "$HOOKS_FILE" ]; then
|
|
23
|
+
echo "❌ Error: File not found: $HOOKS_FILE"
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
echo "🔍 Validating hooks configuration: $HOOKS_FILE"
|
|
28
|
+
echo ""
|
|
29
|
+
|
|
30
|
+
# Check 1: Valid JSON
|
|
31
|
+
echo "Checking JSON syntax..."
|
|
32
|
+
if ! jq empty "$HOOKS_FILE" 2>/dev/null; then
|
|
33
|
+
echo "❌ Invalid JSON syntax"
|
|
34
|
+
exit 1
|
|
35
|
+
fi
|
|
36
|
+
echo "✅ Valid JSON"
|
|
37
|
+
|
|
38
|
+
# Check 2: Root structure
|
|
39
|
+
echo ""
|
|
40
|
+
echo "Checking root structure..."
|
|
41
|
+
VALID_EVENTS=("PreToolUse" "PostToolUse" "UserPromptSubmit" "Stop" "SubagentStop" "SessionStart" "SessionEnd" "PreCompact" "Notification")
|
|
42
|
+
|
|
43
|
+
for event in $(jq -r 'keys[]' "$HOOKS_FILE"); do
|
|
44
|
+
found=false
|
|
45
|
+
for valid_event in "${VALID_EVENTS[@]}"; do
|
|
46
|
+
if [ "$event" = "$valid_event" ]; then
|
|
47
|
+
found=true
|
|
48
|
+
break
|
|
49
|
+
fi
|
|
50
|
+
done
|
|
51
|
+
|
|
52
|
+
if [ "$found" = false ]; then
|
|
53
|
+
echo "⚠️ Unknown event type: $event"
|
|
54
|
+
fi
|
|
55
|
+
done
|
|
56
|
+
echo "✅ Root structure valid"
|
|
57
|
+
|
|
58
|
+
# Check 3: Validate each hook
|
|
59
|
+
echo ""
|
|
60
|
+
echo "Validating individual hooks..."
|
|
61
|
+
|
|
62
|
+
error_count=0
|
|
63
|
+
warning_count=0
|
|
64
|
+
|
|
65
|
+
for event in $(jq -r 'keys[]' "$HOOKS_FILE"); do
|
|
66
|
+
hook_count=$(jq -r ".\"$event\" | length" "$HOOKS_FILE")
|
|
67
|
+
|
|
68
|
+
for ((i=0; i<hook_count; i++)); do
|
|
69
|
+
# Check matcher exists
|
|
70
|
+
matcher=$(jq -r ".\"$event\"[$i].matcher // empty" "$HOOKS_FILE")
|
|
71
|
+
if [ -z "$matcher" ]; then
|
|
72
|
+
echo "❌ $event[$i]: Missing 'matcher' field"
|
|
73
|
+
((error_count++))
|
|
74
|
+
continue
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
# Check hooks array exists
|
|
78
|
+
hooks=$(jq -r ".\"$event\"[$i].hooks // empty" "$HOOKS_FILE")
|
|
79
|
+
if [ -z "$hooks" ] || [ "$hooks" = "null" ]; then
|
|
80
|
+
echo "❌ $event[$i]: Missing 'hooks' array"
|
|
81
|
+
((error_count++))
|
|
82
|
+
continue
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
# Validate each hook in the array
|
|
86
|
+
hook_array_count=$(jq -r ".\"$event\"[$i].hooks | length" "$HOOKS_FILE")
|
|
87
|
+
|
|
88
|
+
for ((j=0; j<hook_array_count; j++)); do
|
|
89
|
+
hook_type=$(jq -r ".\"$event\"[$i].hooks[$j].type // empty" "$HOOKS_FILE")
|
|
90
|
+
|
|
91
|
+
if [ -z "$hook_type" ]; then
|
|
92
|
+
echo "❌ $event[$i].hooks[$j]: Missing 'type' field"
|
|
93
|
+
((error_count++))
|
|
94
|
+
continue
|
|
95
|
+
fi
|
|
96
|
+
|
|
97
|
+
if [ "$hook_type" != "command" ] && [ "$hook_type" != "prompt" ]; then
|
|
98
|
+
echo "❌ $event[$i].hooks[$j]: Invalid type '$hook_type' (must be 'command' or 'prompt')"
|
|
99
|
+
((error_count++))
|
|
100
|
+
continue
|
|
101
|
+
fi
|
|
102
|
+
|
|
103
|
+
# Check type-specific fields
|
|
104
|
+
if [ "$hook_type" = "command" ]; then
|
|
105
|
+
command=$(jq -r ".\"$event\"[$i].hooks[$j].command // empty" "$HOOKS_FILE")
|
|
106
|
+
if [ -z "$command" ]; then
|
|
107
|
+
echo "❌ $event[$i].hooks[$j]: Command hooks must have 'command' field"
|
|
108
|
+
((error_count++))
|
|
109
|
+
else
|
|
110
|
+
# Check for hardcoded paths
|
|
111
|
+
if [[ "$command" == /* ]] && [[ "$command" != *'${CLAUDE_PLUGIN_ROOT}'* ]]; then
|
|
112
|
+
echo "⚠️ $event[$i].hooks[$j]: Hardcoded absolute path detected. Consider using \${CLAUDE_PLUGIN_ROOT}"
|
|
113
|
+
((warning_count++))
|
|
114
|
+
fi
|
|
115
|
+
fi
|
|
116
|
+
elif [ "$hook_type" = "prompt" ]; then
|
|
117
|
+
prompt=$(jq -r ".\"$event\"[$i].hooks[$j].prompt // empty" "$HOOKS_FILE")
|
|
118
|
+
if [ -z "$prompt" ]; then
|
|
119
|
+
echo "❌ $event[$i].hooks[$j]: Prompt hooks must have 'prompt' field"
|
|
120
|
+
((error_count++))
|
|
121
|
+
fi
|
|
122
|
+
|
|
123
|
+
# Check if prompt-based hooks are used on supported events
|
|
124
|
+
if [ "$event" != "Stop" ] && [ "$event" != "SubagentStop" ] && [ "$event" != "UserPromptSubmit" ] && [ "$event" != "PreToolUse" ]; then
|
|
125
|
+
echo "⚠️ $event[$i].hooks[$j]: Prompt hooks may not be fully supported on $event (best on Stop, SubagentStop, UserPromptSubmit, PreToolUse)"
|
|
126
|
+
((warning_count++))
|
|
127
|
+
fi
|
|
128
|
+
fi
|
|
129
|
+
|
|
130
|
+
# Check timeout
|
|
131
|
+
timeout=$(jq -r ".\"$event\"[$i].hooks[$j].timeout // empty" "$HOOKS_FILE")
|
|
132
|
+
if [ -n "$timeout" ] && [ "$timeout" != "null" ]; then
|
|
133
|
+
if ! [[ "$timeout" =~ ^[0-9]+$ ]]; then
|
|
134
|
+
echo "❌ $event[$i].hooks[$j]: Timeout must be a number"
|
|
135
|
+
((error_count++))
|
|
136
|
+
elif [ "$timeout" -gt 600 ]; then
|
|
137
|
+
echo "⚠️ $event[$i].hooks[$j]: Timeout $timeout seconds is very high (max 600s)"
|
|
138
|
+
((warning_count++))
|
|
139
|
+
elif [ "$timeout" -lt 5 ]; then
|
|
140
|
+
echo "⚠️ $event[$i].hooks[$j]: Timeout $timeout seconds is very low"
|
|
141
|
+
((warning_count++))
|
|
142
|
+
fi
|
|
143
|
+
fi
|
|
144
|
+
done
|
|
145
|
+
done
|
|
146
|
+
done
|
|
147
|
+
|
|
148
|
+
echo ""
|
|
149
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
150
|
+
if [ $error_count -eq 0 ] && [ $warning_count -eq 0 ]; then
|
|
151
|
+
echo "✅ All checks passed!"
|
|
152
|
+
exit 0
|
|
153
|
+
elif [ $error_count -eq 0 ]; then
|
|
154
|
+
echo "⚠️ Validation passed with $warning_count warning(s)"
|
|
155
|
+
exit 0
|
|
156
|
+
else
|
|
157
|
+
echo "❌ Validation failed with $error_count error(s) and $warning_count warning(s)"
|
|
158
|
+
exit 1
|
|
159
|
+
fi
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: obsidian-cli
|
|
3
|
+
description: Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, search vault content, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Obsidian CLI
|
|
7
|
+
|
|
8
|
+
Use the `obsidian` CLI to interact with a running Obsidian instance. Requires Obsidian to be open.
|
|
9
|
+
|
|
10
|
+
## Command reference
|
|
11
|
+
|
|
12
|
+
Run `obsidian help` to see all available commands. This is always up to date. Full docs: https://help.obsidian.md/cli
|
|
13
|
+
|
|
14
|
+
## Syntax
|
|
15
|
+
|
|
16
|
+
**Parameters** take a value with `=`. Quote values with spaces:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
obsidian create name="My Note" content="Hello world"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Flags** are boolean switches with no value:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
obsidian create name="My Note" silent overwrite
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
For multiline content use `\n` for newline and `\t` for tab.
|
|
29
|
+
|
|
30
|
+
## File targeting
|
|
31
|
+
|
|
32
|
+
Many commands accept `file` or `path` to target a file. Without either, the active file is used.
|
|
33
|
+
|
|
34
|
+
- `file=<name>` — resolves like a wikilink (name only, no path or extension needed)
|
|
35
|
+
- `path=<path>` — exact path from vault root, e.g. `folder/note.md`
|
|
36
|
+
|
|
37
|
+
## Vault targeting
|
|
38
|
+
|
|
39
|
+
Commands target the most recently focused vault by default. Use `vault=<name>` as the first parameter to target a specific vault:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
obsidian vault="My Vault" search query="test"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Common patterns
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
obsidian read file="My Note"
|
|
49
|
+
obsidian create name="New Note" content="# Hello" template="Template" silent
|
|
50
|
+
obsidian append file="My Note" content="New line"
|
|
51
|
+
obsidian search query="search term" limit=10
|
|
52
|
+
obsidian daily:read
|
|
53
|
+
obsidian daily:append content="- [ ] New task"
|
|
54
|
+
obsidian property:set name="status" value="done" file="My Note"
|
|
55
|
+
obsidian tasks daily todo
|
|
56
|
+
obsidian tags sort=count counts
|
|
57
|
+
obsidian backlinks file="My Note"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Use `--copy` on any command to copy output to clipboard. Use `silent` to prevent files from opening. Use `total` on list commands to get a count.
|
|
61
|
+
|
|
62
|
+
## Plugin development
|
|
63
|
+
|
|
64
|
+
### Develop/test cycle
|
|
65
|
+
|
|
66
|
+
After making code changes to a plugin or theme, follow this workflow:
|
|
67
|
+
|
|
68
|
+
1. **Reload** the plugin to pick up changes:
|
|
69
|
+
```bash
|
|
70
|
+
obsidian plugin:reload id=my-plugin
|
|
71
|
+
```
|
|
72
|
+
2. **Check for errors** — if errors appear, fix and repeat from step 1:
|
|
73
|
+
```bash
|
|
74
|
+
obsidian dev:errors
|
|
75
|
+
```
|
|
76
|
+
3. **Verify visually** with a screenshot or DOM inspection:
|
|
77
|
+
```bash
|
|
78
|
+
obsidian dev:screenshot path=screenshot.png
|
|
79
|
+
obsidian dev:dom selector=".workspace-leaf" text
|
|
80
|
+
```
|
|
81
|
+
4. **Check console output** for warnings or unexpected logs:
|
|
82
|
+
```bash
|
|
83
|
+
obsidian dev:console level=error
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Additional developer commands
|
|
87
|
+
|
|
88
|
+
Run JavaScript in the app context:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
obsidian eval code="app.vault.getFiles().length"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Inspect CSS values:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
obsidian dev:css selector=".workspace-leaf" prop=background-color
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Toggle mobile emulation:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
obsidian dev:mobile on
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Run `obsidian help` to see additional developer commands including CDP and debugger controls.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestrating-agents
|
|
3
|
+
description: Orchestrates task handoff and "handshaking" between Gemini and Qwen CLI agents. Facilitates specialized reviews, second opinions, and cross-validation of complex logic. Use when a task requires multi-model collaboration, a second LLM perspective, or iterative feedback between terminal agents.
|
|
4
|
+
gemini-command: orchestrate
|
|
5
|
+
gemini-args:
|
|
6
|
+
- name: workflow
|
|
7
|
+
description: "Orchestration workflow type"
|
|
8
|
+
type: choice
|
|
9
|
+
choices:
|
|
10
|
+
- value: collaborative
|
|
11
|
+
label: "Collaborative Design"
|
|
12
|
+
description: "Multi-turn design session for new features/architecture"
|
|
13
|
+
- value: adversarial
|
|
14
|
+
label: "Adversarial Review"
|
|
15
|
+
description: "Red-team security audit with attack/defense rounds"
|
|
16
|
+
- value: troubleshoot
|
|
17
|
+
label: "Troubleshoot Session"
|
|
18
|
+
description: "Deep debugging with hypothesis testing"
|
|
19
|
+
- value: handshake
|
|
20
|
+
label: "Single Handshake"
|
|
21
|
+
description: "Quick one-turn second opinion"
|
|
22
|
+
default: collaborative
|
|
23
|
+
- name: prompt
|
|
24
|
+
description: "Task description for orchestration"
|
|
25
|
+
type: string
|
|
26
|
+
required: true
|
|
27
|
+
gemini-prompt: |
|
|
28
|
+
You are orchestrating a multi-agent collaboration workflow.
|
|
29
|
+
|
|
30
|
+
Workflow Type: {{workflow}}
|
|
31
|
+
Task: {{prompt}}
|
|
32
|
+
|
|
33
|
+
Steps:
|
|
34
|
+
1. Detect available neighbor agents (gemini, qwen)
|
|
35
|
+
2. Map workflow type to execution pattern:
|
|
36
|
+
- collaborative → Collaborative Design (3 turns)
|
|
37
|
+
- adversarial → Adversarial Review (3 turns)
|
|
38
|
+
- troubleshoot → Troubleshoot Session (4 turns)
|
|
39
|
+
- handshake → Single Handshake (1 turn)
|
|
40
|
+
3. Execute the turn protocol defined in references/workflows.md
|
|
41
|
+
4. Synthesize and present results
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
# Orchestrating Agents
|
|
45
|
+
|
|
46
|
+
This skill provides a structured workflow for multi-model collaboration between Gemini and Qwen, enabling deep "handshaking" sessions for complex tasks.
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
### Command-Line Invocation (Gemini)
|
|
51
|
+
```bash
|
|
52
|
+
# With workflow parameter (recommended)
|
|
53
|
+
/orchestrate collaborative "Design authentication system with JWT"
|
|
54
|
+
/orchestrate adversarial "Review payment processing security"
|
|
55
|
+
/orchestrate troubleshoot "Debug production memory leak"
|
|
56
|
+
/orchestrate handshake "Quick review of rate limiting logic"
|
|
57
|
+
|
|
58
|
+
# Without parameter (interactive selection)
|
|
59
|
+
/orchestrate "Design authentication system"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Workflow Types
|
|
63
|
+
|
|
64
|
+
| Workflow | Turns | Use Case |
|
|
65
|
+
|----------|-------|----------|
|
|
66
|
+
| **collaborative** | 3 | New features, architecture planning, design decisions |
|
|
67
|
+
| **adversarial** | 3 | Security audits, vulnerability assessment, red-team review |
|
|
68
|
+
| **troubleshoot** | 4 | Complex debugging, production errors, emergency fixes |
|
|
69
|
+
| **handshake** | 1 | Quick second opinion, simple validation |
|
|
70
|
+
|
|
71
|
+
## Interactive Selection (Fallback)
|
|
72
|
+
|
|
73
|
+
If no workflow type is specified, the agent will prompt for selection:
|
|
74
|
+
|
|
75
|
+
### For Gemini CLI (`ask_user`)
|
|
76
|
+
```typescript
|
|
77
|
+
ask_user({
|
|
78
|
+
questions: [{
|
|
79
|
+
question: "This task requires deep collaboration. Which orchestration workflow should we use?",
|
|
80
|
+
header: "Orchestrate",
|
|
81
|
+
options: [
|
|
82
|
+
{ label: "Collaborative Design", description: "Agent A proposes -> Agent B critiques -> Agent A refines." },
|
|
83
|
+
{ label: "Adversarial Review", description: "Agent A proposes -> Agent B attacks (Red Team) -> Agent A defends." },
|
|
84
|
+
{ label: "Troubleshoot Session", description: "Multi-agent hypothesis testing for emergency bugs." },
|
|
85
|
+
{ label: "Single Handshake", description: "Standard one-turn second opinion." }
|
|
86
|
+
]
|
|
87
|
+
}]
|
|
88
|
+
});
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### For Claude Code (`AskUserQuestion`)
|
|
92
|
+
```typescript
|
|
93
|
+
AskUserQuestion({
|
|
94
|
+
questions: [{
|
|
95
|
+
question: "This task requires deep collaboration. Which orchestration workflow should we use?",
|
|
96
|
+
header: "Orchestrate",
|
|
97
|
+
options: [
|
|
98
|
+
{ label: "Collaborative Design", description: "Agent A proposes -> Agent B critiques -> Agent A refines." },
|
|
99
|
+
{ label: "Adversarial Review", description: "Agent A proposes -> Agent B attacks (Red Team) -> Agent A defends." },
|
|
100
|
+
{ label: "Troubleshoot Session", description: "Multi-agent hypothesis testing for emergency bugs." },
|
|
101
|
+
{ label: "Single Handshake", description: "Standard one-turn second opinion." }
|
|
102
|
+
]
|
|
103
|
+
}]
|
|
104
|
+
});
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Workflows
|
|
108
|
+
|
|
109
|
+
### 1. Handshake Protocol (Standard)
|
|
110
|
+
| Agent | Initial Command | Follow-up (Resume) |
|
|
111
|
+
| :--- | :--- | :--- |
|
|
112
|
+
| **Gemini** | `gemini -p "..."` | `gemini -r latest -p "..."` |
|
|
113
|
+
| **Qwen** | `qwen "..."` | `qwen -c "..."` |
|
|
114
|
+
|
|
115
|
+
### 2. Multi-Turn Loops
|
|
116
|
+
For complex scenarios, follow the turns defined in [references/workflows.md](references/workflows.md).
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
Loop Progress:
|
|
120
|
+
- [ ] Turn 1: Proposal (Agent A)
|
|
121
|
+
- [ ] Turn 2: Cross-Examination (Agent B)
|
|
122
|
+
- [ ] Turn 3: Final Synthesis (Agent A)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Resources
|
|
126
|
+
|
|
127
|
+
- **Workflows**: See [references/workflows.md](references/workflows.md) for turn-by-turn logic.
|
|
128
|
+
- **Config**: Patterns and priority are defined in [config.yaml](config.yaml).
|
|
129
|
+
- **Examples**: See [references/examples.md](references/examples.md) for concrete patterns.
|
|
130
|
+
- **Handover**: See [references/handover-protocol.md](references/handover-protocol.md) for command flags.
|
|
131
|
+
|
|
132
|
+
## Best Practices
|
|
133
|
+
- **Concise Context**: Send only relevant snippets, not entire files, to the neighboring agent.
|
|
134
|
+
- **Specific Tasks**: Ask for a "Security Audit" or "Refactoring Suggestions" rather than a general review.
|
|
135
|
+
- **Fail-Safe**: If a neighboring agent is not found, proceed with a self-review but notify the user.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Orchestration Configuration
|
|
2
|
+
# Version: 1.0.0
|
|
3
|
+
|
|
4
|
+
# ----------------------------------------------------------------------------
|
|
5
|
+
# Orchestration Workflows: Deep multi-turn agent interactions
|
|
6
|
+
# ----------------------------------------------------------------------------
|
|
7
|
+
orchestration_workflows:
|
|
8
|
+
collaborative-design:
|
|
9
|
+
patterns:
|
|
10
|
+
- "design.*feature"
|
|
11
|
+
- "architecture.*plan"
|
|
12
|
+
- "new.*component"
|
|
13
|
+
description: "Multi-turn design session: Proposal (Agent A) -> Critique (Agent B) -> Refinement (Agent A)"
|
|
14
|
+
turns: 3
|
|
15
|
+
|
|
16
|
+
adversarial-review:
|
|
17
|
+
patterns:
|
|
18
|
+
- "security.*audit"
|
|
19
|
+
- "break.*code"
|
|
20
|
+
- "find.*flaws"
|
|
21
|
+
- "red.*team"
|
|
22
|
+
description: "Skeptic review: Proposal (Agent A) -> Attack/Skepticism (Agent B) -> Defense/Fix (Agent A)"
|
|
23
|
+
turns: 3
|
|
24
|
+
|
|
25
|
+
troubleshoot-session:
|
|
26
|
+
patterns:
|
|
27
|
+
- "debug.*complex"
|
|
28
|
+
- "emergency"
|
|
29
|
+
- "out.*of.*trouble"
|
|
30
|
+
- "production.*error"
|
|
31
|
+
description: "Deep investigation: Hypothesis (Agent A) -> Verification (Agent B) -> Root Cause (Both)"
|
|
32
|
+
turns: 4
|
|
33
|
+
|
|
34
|
+
# ----------------------------------------------------------------------------
|
|
35
|
+
# Pattern Priority
|
|
36
|
+
# ----------------------------------------------------------------------------
|
|
37
|
+
priority:
|
|
38
|
+
- orchestration_workflows
|
|
39
|
+
|
|
40
|
+
# ----------------------------------------------------------------------------
|
|
41
|
+
# Auto-Selection Default
|
|
42
|
+
# ----------------------------------------------------------------------------
|
|
43
|
+
default:
|
|
44
|
+
workflow: collaborative-design
|
|
45
|
+
reason: "Standard multi-agent collaboration"
|