@synapta/skills 0.1.1 → 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/dist/index.js +11 -4
- package/package.json +3 -4
- package/skills/ATTRIBUTION.md +80 -0
- package/skills/accessibility-audit/SKILL.md +325 -0
- package/skills/accessibility-audit/reference/wcag-checklist.md +103 -0
- package/skills/apns-notifier/SKILL.md +86 -0
- package/skills/approval-policy-enforcer/SKILL.md +66 -0
- package/skills/apps-sdk-builder/LICENSE.txt +201 -0
- package/skills/apps-sdk-builder/SKILL.md +328 -0
- package/skills/apps-sdk-builder/agents/openai.yaml +13 -0
- package/skills/apps-sdk-builder/references/app-archetypes.md +132 -0
- package/skills/apps-sdk-builder/references/apps-sdk-docs-workflow.md +135 -0
- package/skills/apps-sdk-builder/references/interactive-state-sync-patterns.md +113 -0
- package/skills/apps-sdk-builder/references/repo-contract-and-validation.md +93 -0
- package/skills/apps-sdk-builder/references/search-fetch-standard.md +67 -0
- package/skills/apps-sdk-builder/references/upstream-example-workflow.md +79 -0
- package/skills/apps-sdk-builder/references/window-openai-patterns.md +79 -0
- package/skills/apps-sdk-builder/scripts/scaffold_node_ext_apps.mjs +606 -0
- package/skills/architecture-selector/SKILL.md +64 -0
- package/skills/backlog-planner/SKILL.md +68 -0
- package/skills/carplay-entitlement-checker/SKILL.md +82 -0
- package/skills/concept-deepener/SKILL.md +86 -0
- package/skills/concept-discovery/SKILL.md +517 -0
- package/skills/concept-discovery/assets/sample-analysis.json +81 -0
- package/skills/concept-discovery/expected_outputs/sample-enum-dictionary.md +25 -0
- package/skills/concept-discovery/expected_outputs/sample-page-user-list.md +83 -0
- package/skills/concept-discovery/expected_outputs/sample-prd-readme.md +43 -0
- package/skills/concept-discovery/references/framework-patterns.md +228 -0
- package/skills/concept-discovery/references/prd-quality-checklist.md +65 -0
- package/skills/concept-discovery/scripts/codebase_analyzer.py +732 -0
- package/skills/concept-discovery/scripts/prd_scaffolder.py +435 -0
- package/skills/dast-zap/SKILL.md +453 -0
- package/skills/dast-zap/assets/.gitkeep +9 -0
- package/skills/dast-zap/assets/github_action.yml +207 -0
- package/skills/dast-zap/assets/gitlab_ci.yml +226 -0
- package/skills/dast-zap/assets/zap_automation.yaml +196 -0
- package/skills/dast-zap/assets/zap_context.xml +192 -0
- package/skills/dast-zap/references/EXAMPLE.md +40 -0
- package/skills/dast-zap/references/api_testing_guide.md +475 -0
- package/skills/dast-zap/references/authentication_guide.md +431 -0
- package/skills/dast-zap/references/false_positive_handling.md +427 -0
- package/skills/dast-zap/references/owasp_mapping.md +255 -0
- package/skills/dep-sbom-scan/SKILL.md +466 -0
- package/skills/deploy-cloudflare/SKILL.md +930 -0
- package/skills/deploy-docker/SKILL.md +55 -0
- package/skills/deploy-fly/SKILL.md +228 -0
- package/skills/deploy-k8s/SKILL.md +108 -0
- package/skills/deploy-k8s/assets/logo.png +0 -0
- package/skills/deploy-k8s/docs/README.md +29 -0
- package/skills/deploy-k8s/docs/SUMMARY.md +56 -0
- package/skills/deploy-k8s/docs/advanced/token-efficiency.md +61 -0
- package/skills/deploy-k8s/docs/architecture/multi-tenancy.md +96 -0
- package/skills/deploy-k8s/docs/architecture/storage-and-state.md +102 -0
- package/skills/deploy-k8s/docs/architecture/workload-patterns.md +87 -0
- package/skills/deploy-k8s/docs/book.json +16 -0
- package/skills/deploy-k8s/docs/community/changelog.md +34 -0
- package/skills/deploy-k8s/docs/community/contributing.md +67 -0
- package/skills/deploy-k8s/docs/core-concepts/failure-modes.md +153 -0
- package/skills/deploy-k8s/docs/core-concepts/philosophy.md +83 -0
- package/skills/deploy-k8s/docs/core-concepts/workflow.md +124 -0
- package/skills/deploy-k8s/docs/examples/bad-patterns.md +47 -0
- package/skills/deploy-k8s/docs/examples/do-dont-checklist.md +37 -0
- package/skills/deploy-k8s/docs/examples/good-patterns.md +49 -0
- package/skills/deploy-k8s/docs/failure-modes/api-drift.md +104 -0
- package/skills/deploy-k8s/docs/failure-modes/fragile-rollouts.md +99 -0
- package/skills/deploy-k8s/docs/failure-modes/insecure-workload-defaults.md +80 -0
- package/skills/deploy-k8s/docs/failure-modes/network-exposure.md +98 -0
- package/skills/deploy-k8s/docs/failure-modes/privilege-sprawl.md +91 -0
- package/skills/deploy-k8s/docs/failure-modes/resource-starvation.md +85 -0
- package/skills/deploy-k8s/docs/getting-started/installation.md +152 -0
- package/skills/deploy-k8s/docs/getting-started/quick-start.md +115 -0
- package/skills/deploy-k8s/docs/guides/helm-patterns.md +71 -0
- package/skills/deploy-k8s/docs/guides/kustomize-patterns.md +65 -0
- package/skills/deploy-k8s/docs/guides/observability.md +67 -0
- package/skills/deploy-k8s/docs/guides/security-hardening.md +59 -0
- package/skills/deploy-k8s/docs/guides/validation-and-policy.md +66 -0
- package/skills/deploy-k8s/docs/integrations/mcp-integration.md +52 -0
- package/skills/deploy-k8s/docs/package-lock.json +2892 -0
- package/skills/deploy-k8s/docs/package.json +13 -0
- package/skills/deploy-k8s/references/api-drift.md +298 -0
- package/skills/deploy-k8s/references/conditional/aks-patterns.md +70 -0
- package/skills/deploy-k8s/references/conditional/eks-patterns.md +79 -0
- package/skills/deploy-k8s/references/conditional/gitops-controllers.md +71 -0
- package/skills/deploy-k8s/references/conditional/gke-patterns.md +74 -0
- package/skills/deploy-k8s/references/conditional/observability-stacks.md +80 -0
- package/skills/deploy-k8s/references/conditional/openshift-patterns.md +67 -0
- package/skills/deploy-k8s/references/daemonset-operator-patterns.md +155 -0
- package/skills/deploy-k8s/references/deployment-patterns.md +146 -0
- package/skills/deploy-k8s/references/do-dont-patterns.md +87 -0
- package/skills/deploy-k8s/references/examples-bad.md +282 -0
- package/skills/deploy-k8s/references/examples-good.md +440 -0
- package/skills/deploy-k8s/references/fragile-rollouts.md +303 -0
- package/skills/deploy-k8s/references/helm-patterns.md +203 -0
- package/skills/deploy-k8s/references/insecure-workload-defaults.md +300 -0
- package/skills/deploy-k8s/references/job-patterns.md +120 -0
- package/skills/deploy-k8s/references/kustomize-patterns.md +239 -0
- package/skills/deploy-k8s/references/multi-tenancy.md +343 -0
- package/skills/deploy-k8s/references/network-exposure.md +481 -0
- package/skills/deploy-k8s/references/observability.md +302 -0
- package/skills/deploy-k8s/references/privilege-sprawl.md +273 -0
- package/skills/deploy-k8s/references/resource-starvation.md +374 -0
- package/skills/deploy-k8s/references/security-hardening.md +209 -0
- package/skills/deploy-k8s/references/stateful-patterns.md +130 -0
- package/skills/deploy-k8s/references/storage-and-state.md +330 -0
- package/skills/deploy-k8s/references/validation-and-policy.md +242 -0
- package/skills/deploy-railway/SKILL.md +235 -0
- package/skills/deploy-railway/references/analyze-db-mongo.md +84 -0
- package/skills/deploy-railway/references/analyze-db-mysql.md +254 -0
- package/skills/deploy-railway/references/analyze-db-postgres.md +479 -0
- package/skills/deploy-railway/references/analyze-db-redis.md +208 -0
- package/skills/deploy-railway/references/analyze-db.md +344 -0
- package/skills/deploy-railway/references/configure.md +309 -0
- package/skills/deploy-railway/references/deploy.md +195 -0
- package/skills/deploy-railway/references/operate.md +214 -0
- package/skills/deploy-railway/references/request.md +248 -0
- package/skills/deploy-railway/references/setup.md +312 -0
- package/skills/deploy-railway/scripts/analyze-mongo.py +1549 -0
- package/skills/deploy-railway/scripts/analyze-mysql.py +1195 -0
- package/skills/deploy-railway/scripts/analyze-postgres.py +3058 -0
- package/skills/deploy-railway/scripts/analyze-redis.py +1090 -0
- package/skills/deploy-railway/scripts/dal.py +671 -0
- package/skills/deploy-railway/scripts/enable-pg-stats.py +170 -0
- package/skills/deploy-railway/scripts/pg-extensions.py +370 -0
- package/skills/deploy-railway/scripts/railway-api.sh +52 -0
- package/skills/deploy-ssh/SKILL.md +91 -0
- package/skills/deploy-vercel/SKILL.md +304 -0
- package/skills/deploy-vercel/resources/deploy-codex.sh +301 -0
- package/skills/deploy-vercel/resources/deploy.sh +301 -0
- package/skills/docs-runbooks/SKILL.md +399 -0
- package/skills/drive-status-renderer/SKILL.md +62 -0
- package/skills/iac-scan/SKILL.md +680 -0
- package/skills/iac-scan/assets/.gitkeep +9 -0
- package/skills/iac-scan/assets/checkov_config.yaml +94 -0
- package/skills/iac-scan/assets/github_actions.yml +199 -0
- package/skills/iac-scan/assets/gitlab_ci.yml +218 -0
- package/skills/iac-scan/assets/pre_commit_config.yaml +92 -0
- package/skills/iac-scan/references/EXAMPLE.md +40 -0
- package/skills/iac-scan/references/compliance_mapping.md +237 -0
- package/skills/iac-scan/references/custom_policies.md +460 -0
- package/skills/iac-scan/references/suppression_guide.md +431 -0
- package/skills/incident-briefing/SKILL.md +66 -0
- package/skills/incident-triage/SKILL.md +481 -0
- package/{LICENSE → skills/mcp-builder/LICENSE.txt} +15 -14
- package/skills/mcp-builder/SKILL.md +244 -0
- package/skills/mcp-builder/reference/evaluation.md +602 -0
- package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/skills/mcp-builder/scripts/connections.py +151 -0
- package/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/skills/mobile-pairing/SKILL.md +52 -0
- package/skills/ops-sre/SKILL.md +297 -0
- package/skills/playwright-qa/LICENSE.txt +201 -0
- package/skills/playwright-qa/NOTICE.txt +14 -0
- package/skills/playwright-qa/SKILL.md +156 -0
- package/skills/playwright-qa/agents/openai.yaml +6 -0
- package/skills/playwright-qa/assets/playwright-small.svg +3 -0
- package/skills/playwright-qa/assets/playwright.png +0 -0
- package/skills/playwright-qa/references/cli.md +116 -0
- package/skills/playwright-qa/references/workflows.md +95 -0
- package/skills/playwright-qa/scripts/playwright_cli.sh +25 -0
- package/skills/release-publish/SKILL.md +85 -0
- package/skills/repo-bootstrap/SKILL.md +92 -0
- package/skills/repo-bootstrap/assets/example-workflows/validate-agents.yml +89 -0
- package/skills/repo-bootstrap/assets/root-thin.md +141 -0
- package/skills/repo-bootstrap/assets/root-verbose.md +149 -0
- package/skills/repo-bootstrap/assets/scoped/backend-go.md +107 -0
- package/skills/repo-bootstrap/assets/scoped/backend-php.md +94 -0
- package/skills/repo-bootstrap/assets/scoped/backend-python.md +84 -0
- package/skills/repo-bootstrap/assets/scoped/backend-typescript.md +89 -0
- package/skills/repo-bootstrap/assets/scoped/claude-code-skill.md +101 -0
- package/skills/repo-bootstrap/assets/scoped/cli.md +83 -0
- package/skills/repo-bootstrap/assets/scoped/concourse.md +196 -0
- package/skills/repo-bootstrap/assets/scoped/ddev.md +68 -0
- package/skills/repo-bootstrap/assets/scoped/docker.md +160 -0
- package/skills/repo-bootstrap/assets/scoped/documentation.md +98 -0
- package/skills/repo-bootstrap/assets/scoped/examples.md +96 -0
- package/skills/repo-bootstrap/assets/scoped/frontend-typescript.md +88 -0
- package/skills/repo-bootstrap/assets/scoped/github-actions.md +174 -0
- package/skills/repo-bootstrap/assets/scoped/gitlab-ci.md +174 -0
- package/skills/repo-bootstrap/assets/scoped/oro-bundle.md +209 -0
- package/skills/repo-bootstrap/assets/scoped/oro-project.md +170 -0
- package/skills/repo-bootstrap/assets/scoped/python-modern.md +170 -0
- package/skills/repo-bootstrap/assets/scoped/resources.md +96 -0
- package/skills/repo-bootstrap/assets/scoped/skill-repo.md +139 -0
- package/skills/repo-bootstrap/assets/scoped/symfony.md +168 -0
- package/skills/repo-bootstrap/assets/scoped/testing.md +87 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-docs.md +103 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-extension.md +133 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-project.md +137 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-testing.md +80 -0
- package/skills/repo-bootstrap/checkpoints.yaml +279 -0
- package/skills/repo-bootstrap/evals/evals.json +385 -0
- package/skills/repo-bootstrap/references/ai-contribution-guidelines.md +63 -0
- package/skills/repo-bootstrap/references/ai-tool-compatibility.md +223 -0
- package/skills/repo-bootstrap/references/directory-coverage.md +82 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/scripts-AGENTS.md +389 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/.env.example +13 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/package.json +33 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/pnpm-lock.yaml +3 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/config.ts +28 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/controllers/userController.ts +74 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/index.ts +26 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/errorHandler.ts +45 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/requestLogger.ts +18 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/health.ts +18 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/users.ts +13 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/errors.ts +40 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/logger.ts +14 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/tsconfig.json +24 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/.env.example +19 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/AGENTS.md +92 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/pyproject.toml +88 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/AGENTS.md +85 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/__init__.py +3 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/config.py +49 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/main.py +66 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/__init__.py +13 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/item.py +43 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/user.py +40 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/__init__.py +5 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/health.py +20 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/items.py +61 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/users.py +55 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/__init__.py +6 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/item_service.py +77 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/user_service.py +69 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/uv.lock +4 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/AGENTS.md +86 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/package.json +20 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/src/App.tsx +5 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/cmd/api/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/go.mod +2 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/AGENTS.md +89 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/go.mod +2 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/AGENTS.md +90 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/package.json +17 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/App.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Button.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Footer.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Header.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Sidebar.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package-lock.json +0 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package.json +12 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-AGENTS.md +371 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-web-AGENTS.md +448 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/composer.json +8 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/package.json +15 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/pnpm-lock.yaml +0 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/src/Controller.php +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/AGENTS.md +92 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/package.json +26 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/App.tsx +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Button.tsx +10 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Footer.tsx +9 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Header.tsx +9 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/main.tsx +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/tsconfig.json +13 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/AGENTS.md +75 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/package.json +7 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/package.json +11 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/src/index.ts +11 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-lock.yaml +42 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-workspace.yaml +2 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/examples-AGENTS.md +45 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/Classes-AGENTS.md +392 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/composer.json +8 -0
- package/skills/repo-bootstrap/references/feedback-memory-schema.md +135 -0
- package/skills/repo-bootstrap/references/git-hooks-setup.md +79 -0
- package/skills/repo-bootstrap/references/output-structure.md +124 -0
- package/skills/repo-bootstrap/references/scripts-guide.md +175 -0
- package/skills/repo-bootstrap/references/verification-guide.md +137 -0
- package/skills/repo-bootstrap/scripts/analyze-git-history.sh +315 -0
- package/skills/repo-bootstrap/scripts/check-freshness.sh +230 -0
- package/skills/repo-bootstrap/scripts/detect-golden-samples.sh +161 -0
- package/skills/repo-bootstrap/scripts/detect-heuristics.sh +93 -0
- package/skills/repo-bootstrap/scripts/detect-project.sh +486 -0
- package/skills/repo-bootstrap/scripts/detect-scopes.sh +330 -0
- package/skills/repo-bootstrap/scripts/detect-utilities.sh +133 -0
- package/skills/repo-bootstrap/scripts/extract-adrs.sh +194 -0
- package/skills/repo-bootstrap/scripts/extract-agent-configs.sh +331 -0
- package/skills/repo-bootstrap/scripts/extract-architecture-rules.sh +522 -0
- package/skills/repo-bootstrap/scripts/extract-ci-commands.sh +385 -0
- package/skills/repo-bootstrap/scripts/extract-ci-rules.sh +384 -0
- package/skills/repo-bootstrap/scripts/extract-commands.sh +358 -0
- package/skills/repo-bootstrap/scripts/extract-documentation.sh +308 -0
- package/skills/repo-bootstrap/scripts/extract-github-rulesets.sh +96 -0
- package/skills/repo-bootstrap/scripts/extract-github-settings.sh +88 -0
- package/skills/repo-bootstrap/scripts/extract-ide-settings.sh +228 -0
- package/skills/repo-bootstrap/scripts/extract-platform-files.sh +290 -0
- package/skills/repo-bootstrap/scripts/extract-quality-configs.sh +442 -0
- package/skills/repo-bootstrap/scripts/generate-agents.sh +2424 -0
- package/skills/repo-bootstrap/scripts/generate-file-map.sh +153 -0
- package/skills/repo-bootstrap/scripts/lib/config-root.sh +211 -0
- package/skills/repo-bootstrap/scripts/lib/summary.sh +244 -0
- package/skills/repo-bootstrap/scripts/lib/template.sh +397 -0
- package/skills/repo-bootstrap/scripts/validate-structure.sh +324 -0
- package/skills/repo-bootstrap/scripts/verify-commands.sh +615 -0
- package/skills/repo-bootstrap/scripts/verify-content.sh +302 -0
- package/skills/schema-api-contracts/SKILL.md +56 -0
- package/skills/secret-hygiene/SKILL.md +511 -0
- package/skills/secret-hygiene/assets/.gitkeep +9 -0
- package/skills/secret-hygiene/assets/config-balanced.toml +81 -0
- package/skills/secret-hygiene/assets/config-custom.toml +178 -0
- package/skills/secret-hygiene/assets/config-strict.toml +48 -0
- package/skills/secret-hygiene/assets/github-action.yml +181 -0
- package/skills/secret-hygiene/assets/gitlab-ci.yml +257 -0
- package/skills/secret-hygiene/assets/precommit-config.yaml +70 -0
- package/skills/secret-hygiene/references/EXAMPLE.md +40 -0
- package/skills/secret-hygiene/references/compliance_mapping.md +538 -0
- package/skills/secret-hygiene/references/detection_rules.md +276 -0
- package/skills/secret-hygiene/references/false_positives.md +598 -0
- package/skills/secret-hygiene/references/remediation_guide.md +530 -0
- package/skills/stack-selector/SKILL.md +56 -0
- package/skills/telegram-control/SKILL.md +110 -0
- package/skills/telegram-control/references/architecture.md +184 -0
- package/skills/telegram-control/references/convex.md +173 -0
- package/skills/telegram-control/references/error_handling.md +212 -0
- package/skills/telegram-control/references/initial_setup.md +165 -0
- package/skills/telegram-control/references/telegram_api.md +156 -0
- package/skills/telegram-control/scripts/cancel_message.ts +53 -0
- package/skills/telegram-control/scripts/list_scheduled.ts +103 -0
- package/skills/telegram-control/scripts/logger.ts +121 -0
- package/skills/telegram-control/scripts/proxy-util.ts +11 -0
- package/skills/telegram-control/scripts/schedule_message.ts +216 -0
- package/skills/telegram-control/scripts/send_message.ts +115 -0
- package/skills/telegram-control/scripts/setup.ts +185 -0
- package/skills/telegram-control/scripts/types.ts +75 -0
- package/skills/telegram-control/scripts/view_history.ts +74 -0
- package/skills/test-strategy/SKILL.md +352 -0
- package/skills/threat-model/SKILL.md +303 -0
- package/skills/threat-model/examples/example-output.md +196 -0
- package/skills/threat-model/template.md +96 -0
- package/skills/ts-lint/SKILL.md +80 -0
- package/skills/ui-flow/SKILL.md +668 -0
- package/skills/voice-command-router/SKILL.md +51 -0
- package/skills/widget-live-activity-sync/SKILL.md +66 -0
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Verify that commands documented in AGENTS.md actually work
|
|
3
|
+
# This prevents "command rot" - documented commands that no longer exist
|
|
4
|
+
# Requires: Bash 4.0+ (for associative arrays)
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
# Check Bash version - we need 4.0+ for associative arrays (declare -A)
|
|
8
|
+
if ((BASH_VERSINFO[0] < 4)); then
|
|
9
|
+
echo "Error: Bash 4.0+ required (found ${BASH_VERSION})." >&2
|
|
10
|
+
echo "On macOS: brew install bash" >&2
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
PROJECT_DIR="${1:-.}"
|
|
15
|
+
AGENTS_FILE="$PROJECT_DIR/AGENTS.md"
|
|
16
|
+
VERBOSE="${VERBOSE:-false}"
|
|
17
|
+
DRY_RUN="${DRY_RUN:-false}"
|
|
18
|
+
SMOKE_TEST="${SMOKE_TEST:-false}"
|
|
19
|
+
TIMEOUT="${TIMEOUT:-60}"
|
|
20
|
+
OUTPUT_JSON="${OUTPUT_JSON:-$PROJECT_DIR/.agents/command-verification.json}"
|
|
21
|
+
|
|
22
|
+
# Colors
|
|
23
|
+
RED='\033[0;31m'
|
|
24
|
+
GREEN='\033[0;32m'
|
|
25
|
+
YELLOW='\033[1;33m'
|
|
26
|
+
NC='\033[0m' # No Color
|
|
27
|
+
|
|
28
|
+
log() {
|
|
29
|
+
if [ "$VERBOSE" = true ]; then
|
|
30
|
+
echo -e "[INFO] $*" >&2
|
|
31
|
+
fi
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
error() {
|
|
35
|
+
echo -e "${RED}[ERROR]${NC} $*" >&2
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
success() {
|
|
39
|
+
echo -e "${GREEN}[OK]${NC} $*"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
warn() {
|
|
43
|
+
echo -e "${YELLOW}[WARN]${NC} $*"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
# Check if AGENTS.md exists
|
|
47
|
+
if [ ! -f "$AGENTS_FILE" ]; then
|
|
48
|
+
error "AGENTS.md not found at $AGENTS_FILE"
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
cd "$PROJECT_DIR"
|
|
53
|
+
|
|
54
|
+
echo "Verifying commands in $AGENTS_FILE..."
|
|
55
|
+
echo ""
|
|
56
|
+
|
|
57
|
+
FAILED=0
|
|
58
|
+
PASSED=0
|
|
59
|
+
SKIPPED=0
|
|
60
|
+
|
|
61
|
+
# JSON results storage
|
|
62
|
+
declare -A COMMAND_RESULTS
|
|
63
|
+
|
|
64
|
+
# Initialize JSON output directory (always needed for results)
|
|
65
|
+
mkdir -p "$(dirname "$OUTPUT_JSON")"
|
|
66
|
+
|
|
67
|
+
# Check if a command is safe to execute using a whitelist approach.
|
|
68
|
+
# Only commands whose base binary is in the ALLOWED_COMMANDS list are permitted.
|
|
69
|
+
# Returns 0 if safe, 1 if not whitelisted.
|
|
70
|
+
is_safe_command() {
|
|
71
|
+
local cmd="$1"
|
|
72
|
+
|
|
73
|
+
# Whitelist of known safe base commands.
|
|
74
|
+
# These are common build/dev tools that are safe to invoke for verification.
|
|
75
|
+
local -a ALLOWED_COMMANDS=(
|
|
76
|
+
# Version control
|
|
77
|
+
git
|
|
78
|
+
# File inspection
|
|
79
|
+
ls cat head tail less wc file stat find grep egrep fgrep rg ag sed awk sort uniq diff
|
|
80
|
+
# Build tools / package managers
|
|
81
|
+
make go npm yarn pnpm bun composer cargo deno gradle gradlew python python3 pip pip3
|
|
82
|
+
poetry uv pytest php phpunit node ruby bundle gem mvn ant
|
|
83
|
+
# Project-specific binaries (resolved via PATH or relative path)
|
|
84
|
+
vendor/bin
|
|
85
|
+
# Container tools (read-only / informational subcommands only)
|
|
86
|
+
docker podman
|
|
87
|
+
# Linters and formatters
|
|
88
|
+
eslint prettier phpcs phpcbf phpstan psalm rector black flake8 mypy ruff shellcheck
|
|
89
|
+
# Documentation / misc
|
|
90
|
+
jq yq curl wget
|
|
91
|
+
# Testing
|
|
92
|
+
jest vitest mocha
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
# Extract the base command (first word), stripping any leading ./
|
|
96
|
+
local base_cmd
|
|
97
|
+
base_cmd=$(echo "$cmd" | awk '{print $1}' | sed 's|^\./||')
|
|
98
|
+
|
|
99
|
+
# Allow vendor/bin/* paths
|
|
100
|
+
if [[ "$base_cmd" == vendor/bin/* ]]; then
|
|
101
|
+
return 0
|
|
102
|
+
fi
|
|
103
|
+
|
|
104
|
+
# Check against whitelist
|
|
105
|
+
for allowed in "${ALLOWED_COMMANDS[@]}"; do
|
|
106
|
+
if [[ "$base_cmd" == "$allowed" ]]; then
|
|
107
|
+
return 0
|
|
108
|
+
fi
|
|
109
|
+
done
|
|
110
|
+
|
|
111
|
+
# Not in whitelist - reject
|
|
112
|
+
return 1
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
# Portable milliseconds timestamp (works on both GNU and BSD date)
|
|
116
|
+
get_time_ms() {
|
|
117
|
+
# Try GNU date with nanoseconds first, fall back to seconds * 1000
|
|
118
|
+
if date +%s%3N 2>/dev/null | grep -qE '^[0-9]+$'; then
|
|
119
|
+
date +%s%3N
|
|
120
|
+
else
|
|
121
|
+
echo $(( $(date +%s) * 1000 ))
|
|
122
|
+
fi
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
# Run a command with timeout and measure duration
|
|
126
|
+
smoke_test_command() {
|
|
127
|
+
local cmd="$1"
|
|
128
|
+
local start_time end_time duration_ms exit_code
|
|
129
|
+
|
|
130
|
+
# Safety check - skip dangerous commands
|
|
131
|
+
if ! is_safe_command "$cmd"; then
|
|
132
|
+
warn "Skipping potentially dangerous command: $cmd"
|
|
133
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true, "runs": false, "skipped": true, "reason": "safety"}'
|
|
134
|
+
return 1
|
|
135
|
+
fi
|
|
136
|
+
|
|
137
|
+
start_time=$(get_time_ms)
|
|
138
|
+
|
|
139
|
+
# Run with timeout, capture exit code
|
|
140
|
+
if timeout "${TIMEOUT}s" bash -c "$cmd" > /dev/null 2>&1; then
|
|
141
|
+
exit_code=0
|
|
142
|
+
else
|
|
143
|
+
exit_code=$?
|
|
144
|
+
fi
|
|
145
|
+
|
|
146
|
+
end_time=$(get_time_ms)
|
|
147
|
+
duration_ms=$((end_time - start_time))
|
|
148
|
+
|
|
149
|
+
# Store result
|
|
150
|
+
if [ $exit_code -eq 0 ]; then
|
|
151
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true, "runs": true, "duration_ms": '"$duration_ms"'}'
|
|
152
|
+
return 0
|
|
153
|
+
elif [ $exit_code -eq 124 ]; then
|
|
154
|
+
# Timeout
|
|
155
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true, "runs": false, "timeout": true, "duration_ms": '"$((TIMEOUT * 1000))"'}'
|
|
156
|
+
return 1
|
|
157
|
+
else
|
|
158
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true, "runs": false, "exit_code": '"$exit_code"', "duration_ms": '"$duration_ms"'}'
|
|
159
|
+
return 1
|
|
160
|
+
fi
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
# Write results to JSON file
|
|
164
|
+
write_json_results() {
|
|
165
|
+
local timestamp
|
|
166
|
+
# Portable ISO 8601 timestamp (works on both GNU and BSD date)
|
|
167
|
+
timestamp=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
168
|
+
|
|
169
|
+
{
|
|
170
|
+
echo "{"
|
|
171
|
+
echo ' "verified_at": "'"$timestamp"'",'
|
|
172
|
+
echo ' "smoke_tested": '"$SMOKE_TEST"','
|
|
173
|
+
echo ' "commands": {'
|
|
174
|
+
|
|
175
|
+
local first=true
|
|
176
|
+
for cmd in "${!COMMAND_RESULTS[@]}"; do
|
|
177
|
+
if [ "$first" = true ]; then
|
|
178
|
+
first=false
|
|
179
|
+
else
|
|
180
|
+
echo ","
|
|
181
|
+
fi
|
|
182
|
+
# Escape the command string for JSON
|
|
183
|
+
local escaped_cmd
|
|
184
|
+
escaped_cmd=$(echo "$cmd" | sed 's/\\/\\\\/g; s/"/\\"/g')
|
|
185
|
+
printf ' "%s": %s' "$escaped_cmd" "${COMMAND_RESULTS[$cmd]}"
|
|
186
|
+
done
|
|
187
|
+
|
|
188
|
+
echo ""
|
|
189
|
+
echo " }"
|
|
190
|
+
echo "}"
|
|
191
|
+
} > "$OUTPUT_JSON"
|
|
192
|
+
|
|
193
|
+
log "Results written to $OUTPUT_JSON"
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
# Extract commands from markdown code blocks and table cells
|
|
197
|
+
# Look for patterns like: `command arg` or | command | or | `command` |
|
|
198
|
+
extract_commands() {
|
|
199
|
+
# Extract from tables with backticks (| `command` | format)
|
|
200
|
+
grep -oE '\| `[^`]+`' "$AGENTS_FILE" 2>/dev/null | sed 's/| `//;s/`$//' | grep -v '^\s*$' || true
|
|
201
|
+
|
|
202
|
+
# Extract from tables without backticks in Commands section
|
|
203
|
+
# Look for lines like "| Lint | vendor/bin/php-cs-fixer fix --dry-run |"
|
|
204
|
+
# Skip header row and separator row, get 3rd column (command), filter empty and time estimates
|
|
205
|
+
sed -n '/^## Commands/,/^##/p' "$AGENTS_FILE" 2>/dev/null | \
|
|
206
|
+
grep -E '^\|' | \
|
|
207
|
+
tail -n +3 | \
|
|
208
|
+
cut -d'|' -f3 | \
|
|
209
|
+
sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | \
|
|
210
|
+
grep -v '^$' | \
|
|
211
|
+
grep -v '^~' || true
|
|
212
|
+
|
|
213
|
+
# Extract from inline code that looks like commands
|
|
214
|
+
# Includes: npm, yarn, pnpm, bun, make, go, composer, cargo, python, pip, poetry, uv, deno, gradle, php, vendor/bin
|
|
215
|
+
grep -oE '`(npm |yarn |pnpm |bun |make |go |composer |cargo |pytest |python |pip |poetry |uv |deno |gradle |php |vendor/bin/)[^`]+`' "$AGENTS_FILE" 2>/dev/null | sed 's/`//g' || true
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
# Verify a single command exists (not that it succeeds, just that it's callable)
|
|
219
|
+
verify_command() {
|
|
220
|
+
local cmd="$1"
|
|
221
|
+
local base_cmd
|
|
222
|
+
|
|
223
|
+
# Extract the base command (first word)
|
|
224
|
+
base_cmd=$(echo "$cmd" | awk '{print $1}')
|
|
225
|
+
|
|
226
|
+
# Skip placeholders
|
|
227
|
+
if [[ "$cmd" == *"<"* ]] || [[ "$cmd" == *"{{{"* ]]; then
|
|
228
|
+
log "Skipping placeholder: $cmd"
|
|
229
|
+
((SKIPPED+=1))
|
|
230
|
+
return 0
|
|
231
|
+
fi
|
|
232
|
+
|
|
233
|
+
# Skip if it's just a flag or option
|
|
234
|
+
if [[ "$base_cmd" == -* ]]; then
|
|
235
|
+
return 0
|
|
236
|
+
fi
|
|
237
|
+
|
|
238
|
+
log "Checking: $cmd"
|
|
239
|
+
|
|
240
|
+
# Check different command types
|
|
241
|
+
case "$base_cmd" in
|
|
242
|
+
npm|yarn|pnpm|bun)
|
|
243
|
+
# Check if package.json script exists
|
|
244
|
+
local script="${cmd#* }"
|
|
245
|
+
script="${script#run }"
|
|
246
|
+
script="${script%% *}"
|
|
247
|
+
if [ -f "package.json" ]; then
|
|
248
|
+
local script_exists=false
|
|
249
|
+
if jq -e ".scripts[\"$script\"]" package.json > /dev/null 2>&1; then
|
|
250
|
+
script_exists=true
|
|
251
|
+
elif [[ "$script" =~ ^(install|test|build|start|run)$ ]]; then
|
|
252
|
+
script_exists=true
|
|
253
|
+
fi
|
|
254
|
+
|
|
255
|
+
if [ "$script_exists" = true ]; then
|
|
256
|
+
if [ "$SMOKE_TEST" = true ]; then
|
|
257
|
+
# For test commands, only verify they start (dry-run if available)
|
|
258
|
+
local test_cmd="$cmd"
|
|
259
|
+
if [[ "$script" == "test" ]]; then
|
|
260
|
+
# Try to use --help or --dry-run to avoid full test run
|
|
261
|
+
test_cmd="$base_cmd run $script -- --help 2>/dev/null || $base_cmd run $script --dry-run 2>/dev/null || true"
|
|
262
|
+
fi
|
|
263
|
+
if smoke_test_command "$test_cmd"; then
|
|
264
|
+
local duration="${COMMAND_RESULTS[$cmd]}"
|
|
265
|
+
duration=$(echo "$duration" | grep -oE '"duration_ms": [0-9]+' | cut -d: -f2 | tr -d ' ')
|
|
266
|
+
success "$base_cmd script works: $script (~${duration}ms)"
|
|
267
|
+
((PASSED+=1))
|
|
268
|
+
else
|
|
269
|
+
warn "$base_cmd script exists but smoke test failed: $script"
|
|
270
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true, "runs": false}'
|
|
271
|
+
((SKIPPED+=1))
|
|
272
|
+
fi
|
|
273
|
+
else
|
|
274
|
+
success "$base_cmd script exists: $script"
|
|
275
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
276
|
+
((PASSED+=1))
|
|
277
|
+
fi
|
|
278
|
+
else
|
|
279
|
+
warn "$base_cmd script not found: $script (in $cmd)"
|
|
280
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
281
|
+
((SKIPPED+=1))
|
|
282
|
+
fi
|
|
283
|
+
else
|
|
284
|
+
warn "No package.json found for: $cmd"
|
|
285
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
286
|
+
((SKIPPED+=1))
|
|
287
|
+
fi
|
|
288
|
+
;;
|
|
289
|
+
|
|
290
|
+
make)
|
|
291
|
+
# Check if Makefile target exists
|
|
292
|
+
local target="${cmd#make }"
|
|
293
|
+
target="${target%% *}"
|
|
294
|
+
if [ -f "Makefile" ] || [ -f "makefile" ] || [ -f "GNUmakefile" ]; then
|
|
295
|
+
if make -n "$target" > /dev/null 2>&1; then
|
|
296
|
+
if [ "$SMOKE_TEST" = true ]; then
|
|
297
|
+
# Use make -n (dry run) for smoke test to avoid side effects
|
|
298
|
+
if smoke_test_command "make -n $target"; then
|
|
299
|
+
local duration="${COMMAND_RESULTS[$cmd]}"
|
|
300
|
+
duration=$(echo "$duration" | grep -oE '"duration_ms": [0-9]+' | cut -d: -f2 | tr -d ' ')
|
|
301
|
+
success "make target works: $target (~${duration}ms)"
|
|
302
|
+
((PASSED+=1))
|
|
303
|
+
else
|
|
304
|
+
warn "make target exists but dry-run failed: $target"
|
|
305
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true, "runs": false}'
|
|
306
|
+
((SKIPPED+=1))
|
|
307
|
+
fi
|
|
308
|
+
else
|
|
309
|
+
success "make target exists: $target"
|
|
310
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
311
|
+
((PASSED+=1))
|
|
312
|
+
fi
|
|
313
|
+
else
|
|
314
|
+
error "make target not found: $target"
|
|
315
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
316
|
+
((FAILED+=1))
|
|
317
|
+
fi
|
|
318
|
+
else
|
|
319
|
+
warn "No Makefile found for: $cmd"
|
|
320
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
321
|
+
((SKIPPED+=1))
|
|
322
|
+
fi
|
|
323
|
+
;;
|
|
324
|
+
|
|
325
|
+
composer)
|
|
326
|
+
# Check if composer script exists
|
|
327
|
+
local script="${cmd#composer }"
|
|
328
|
+
script="${script%% *}"
|
|
329
|
+
if [ -f "composer.json" ]; then
|
|
330
|
+
local script_exists=false
|
|
331
|
+
if [[ "$script" =~ ^(install|update|require|remove|dump-autoload)$ ]]; then
|
|
332
|
+
script_exists=true
|
|
333
|
+
elif jq -e ".scripts[\"$script\"]" composer.json > /dev/null 2>&1; then
|
|
334
|
+
script_exists=true
|
|
335
|
+
fi
|
|
336
|
+
|
|
337
|
+
if [ "$script_exists" = true ]; then
|
|
338
|
+
if [ "$SMOKE_TEST" = true ]; then
|
|
339
|
+
# For composer scripts, try --dry-run or --help
|
|
340
|
+
local test_cmd="$cmd"
|
|
341
|
+
if [[ "$script" =~ ^(install|update)$ ]]; then
|
|
342
|
+
test_cmd="composer $script --dry-run 2>/dev/null || true"
|
|
343
|
+
fi
|
|
344
|
+
if smoke_test_command "$test_cmd"; then
|
|
345
|
+
local duration="${COMMAND_RESULTS[$cmd]}"
|
|
346
|
+
duration=$(echo "$duration" | grep -oE '"duration_ms": [0-9]+' | cut -d: -f2 | tr -d ' ')
|
|
347
|
+
success "composer script works: $script (~${duration}ms)"
|
|
348
|
+
((PASSED+=1))
|
|
349
|
+
else
|
|
350
|
+
warn "composer script exists but smoke test failed: $script"
|
|
351
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true, "runs": false}'
|
|
352
|
+
((SKIPPED+=1))
|
|
353
|
+
fi
|
|
354
|
+
else
|
|
355
|
+
success "composer script exists: $script"
|
|
356
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
357
|
+
((PASSED+=1))
|
|
358
|
+
fi
|
|
359
|
+
else
|
|
360
|
+
warn "composer script not found: $script"
|
|
361
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
362
|
+
((SKIPPED+=1))
|
|
363
|
+
fi
|
|
364
|
+
else
|
|
365
|
+
warn "No composer.json found for: $cmd"
|
|
366
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
367
|
+
((SKIPPED+=1))
|
|
368
|
+
fi
|
|
369
|
+
;;
|
|
370
|
+
|
|
371
|
+
python|python3|pip|pip3)
|
|
372
|
+
# Python commands
|
|
373
|
+
if command -v "$base_cmd" > /dev/null 2>&1; then
|
|
374
|
+
success "Python command available: $base_cmd"
|
|
375
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
376
|
+
((PASSED+=1))
|
|
377
|
+
else
|
|
378
|
+
warn "Python command not found: $base_cmd"
|
|
379
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
380
|
+
((SKIPPED+=1))
|
|
381
|
+
fi
|
|
382
|
+
;;
|
|
383
|
+
|
|
384
|
+
poetry)
|
|
385
|
+
# Poetry package manager
|
|
386
|
+
if command -v poetry > /dev/null 2>&1; then
|
|
387
|
+
local subcmd="${cmd#poetry }"
|
|
388
|
+
subcmd="${subcmd%% *}"
|
|
389
|
+
if [[ "$subcmd" =~ ^(install|add|remove|update|build|publish|run|shell)$ ]]; then
|
|
390
|
+
success "poetry command: $subcmd"
|
|
391
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
392
|
+
((PASSED+=1))
|
|
393
|
+
else
|
|
394
|
+
# Check if it's a custom script
|
|
395
|
+
if [ -f "pyproject.toml" ] && grep -q "\[tool.poetry.scripts\]" pyproject.toml 2>/dev/null; then
|
|
396
|
+
success "poetry command available"
|
|
397
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
398
|
+
((PASSED+=1))
|
|
399
|
+
else
|
|
400
|
+
warn "poetry script not found: $subcmd"
|
|
401
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
402
|
+
((SKIPPED+=1))
|
|
403
|
+
fi
|
|
404
|
+
fi
|
|
405
|
+
else
|
|
406
|
+
warn "poetry not installed"
|
|
407
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
408
|
+
((SKIPPED+=1))
|
|
409
|
+
fi
|
|
410
|
+
;;
|
|
411
|
+
|
|
412
|
+
uv)
|
|
413
|
+
# uv package manager
|
|
414
|
+
if command -v uv > /dev/null 2>&1; then
|
|
415
|
+
success "uv command available"
|
|
416
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
417
|
+
((PASSED+=1))
|
|
418
|
+
else
|
|
419
|
+
warn "uv not installed"
|
|
420
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
421
|
+
((SKIPPED+=1))
|
|
422
|
+
fi
|
|
423
|
+
;;
|
|
424
|
+
|
|
425
|
+
pytest)
|
|
426
|
+
# pytest test runner
|
|
427
|
+
if command -v pytest > /dev/null 2>&1; then
|
|
428
|
+
success "pytest available"
|
|
429
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
430
|
+
((PASSED+=1))
|
|
431
|
+
else
|
|
432
|
+
warn "pytest not installed"
|
|
433
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
434
|
+
((SKIPPED+=1))
|
|
435
|
+
fi
|
|
436
|
+
;;
|
|
437
|
+
|
|
438
|
+
cargo)
|
|
439
|
+
# Rust cargo
|
|
440
|
+
if command -v cargo > /dev/null 2>&1; then
|
|
441
|
+
success "cargo command available"
|
|
442
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
443
|
+
((PASSED+=1))
|
|
444
|
+
else
|
|
445
|
+
warn "cargo not installed"
|
|
446
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
447
|
+
((SKIPPED+=1))
|
|
448
|
+
fi
|
|
449
|
+
;;
|
|
450
|
+
|
|
451
|
+
deno)
|
|
452
|
+
# Deno runtime
|
|
453
|
+
if command -v deno > /dev/null 2>&1; then
|
|
454
|
+
success "deno command available"
|
|
455
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
456
|
+
((PASSED+=1))
|
|
457
|
+
else
|
|
458
|
+
warn "deno not installed"
|
|
459
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
460
|
+
((SKIPPED+=1))
|
|
461
|
+
fi
|
|
462
|
+
;;
|
|
463
|
+
|
|
464
|
+
gradle|gradlew|./gradlew)
|
|
465
|
+
# Gradle build tool
|
|
466
|
+
if [ -f "gradlew" ] || [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]; then
|
|
467
|
+
success "gradle project detected"
|
|
468
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
469
|
+
((PASSED+=1))
|
|
470
|
+
elif command -v gradle > /dev/null 2>&1; then
|
|
471
|
+
success "gradle command available"
|
|
472
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
473
|
+
((PASSED+=1))
|
|
474
|
+
else
|
|
475
|
+
warn "gradle not found"
|
|
476
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
477
|
+
((SKIPPED+=1))
|
|
478
|
+
fi
|
|
479
|
+
;;
|
|
480
|
+
|
|
481
|
+
go)
|
|
482
|
+
# Go commands are generally available if go is installed
|
|
483
|
+
if command -v go > /dev/null 2>&1; then
|
|
484
|
+
if [ "$SMOKE_TEST" = true ]; then
|
|
485
|
+
if smoke_test_command "$cmd"; then
|
|
486
|
+
local duration="${COMMAND_RESULTS[$cmd]}"
|
|
487
|
+
duration=$(echo "$duration" | grep -oE '"duration_ms": [0-9]+' | cut -d: -f2 | tr -d ' ')
|
|
488
|
+
success "go command ran successfully (~${duration}ms)"
|
|
489
|
+
((PASSED+=1))
|
|
490
|
+
else
|
|
491
|
+
error "go command failed: $cmd"
|
|
492
|
+
((FAILED+=1))
|
|
493
|
+
fi
|
|
494
|
+
else
|
|
495
|
+
success "go command available"
|
|
496
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
497
|
+
((PASSED+=1))
|
|
498
|
+
fi
|
|
499
|
+
else
|
|
500
|
+
error "go not installed"
|
|
501
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
502
|
+
((FAILED+=1))
|
|
503
|
+
fi
|
|
504
|
+
;;
|
|
505
|
+
|
|
506
|
+
vendor/bin/*)
|
|
507
|
+
# PHP vendor binary
|
|
508
|
+
if [ -f "$base_cmd" ]; then
|
|
509
|
+
if [ "$SMOKE_TEST" = true ]; then
|
|
510
|
+
# For test commands, run with --help to avoid actually running tests
|
|
511
|
+
local test_cmd="$cmd"
|
|
512
|
+
if [[ "$cmd" == *"phpunit"* ]] && [[ "$cmd" != *"--help"* ]]; then
|
|
513
|
+
test_cmd="$base_cmd --help"
|
|
514
|
+
fi
|
|
515
|
+
if smoke_test_command "$test_cmd"; then
|
|
516
|
+
local duration="${COMMAND_RESULTS[$cmd]}"
|
|
517
|
+
duration=$(echo "$duration" | grep -oE '"duration_ms": [0-9]+' | cut -d: -f2 | tr -d ' ')
|
|
518
|
+
success "vendor binary works (~${duration}ms)"
|
|
519
|
+
((PASSED+=1))
|
|
520
|
+
else
|
|
521
|
+
warn "vendor binary exists but failed: $cmd"
|
|
522
|
+
((SKIPPED+=1))
|
|
523
|
+
fi
|
|
524
|
+
else
|
|
525
|
+
success "vendor binary exists: $base_cmd"
|
|
526
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
527
|
+
((PASSED+=1))
|
|
528
|
+
fi
|
|
529
|
+
else
|
|
530
|
+
error "vendor binary not found: $base_cmd"
|
|
531
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
532
|
+
((FAILED+=1))
|
|
533
|
+
fi
|
|
534
|
+
;;
|
|
535
|
+
|
|
536
|
+
*)
|
|
537
|
+
# Check if command exists in PATH
|
|
538
|
+
if command -v "$base_cmd" > /dev/null 2>&1; then
|
|
539
|
+
if [ "$SMOKE_TEST" = true ]; then
|
|
540
|
+
if smoke_test_command "$cmd"; then
|
|
541
|
+
local duration="${COMMAND_RESULTS[$cmd]}"
|
|
542
|
+
duration=$(echo "$duration" | grep -oE '"duration_ms": [0-9]+' | cut -d: -f2 | tr -d ' ')
|
|
543
|
+
success "command works (~${duration}ms)"
|
|
544
|
+
((PASSED+=1))
|
|
545
|
+
else
|
|
546
|
+
warn "command exists but failed: $cmd"
|
|
547
|
+
((SKIPPED+=1))
|
|
548
|
+
fi
|
|
549
|
+
else
|
|
550
|
+
success "command exists: $base_cmd"
|
|
551
|
+
COMMAND_RESULTS["$cmd"]='{"exists": true}'
|
|
552
|
+
((PASSED+=1))
|
|
553
|
+
fi
|
|
554
|
+
else
|
|
555
|
+
warn "command not in PATH: $base_cmd"
|
|
556
|
+
COMMAND_RESULTS["$cmd"]='{"exists": false}'
|
|
557
|
+
((SKIPPED+=1))
|
|
558
|
+
fi
|
|
559
|
+
;;
|
|
560
|
+
esac
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
# Get unique commands
|
|
564
|
+
mapfile -t commands < <(extract_commands | sort -u)
|
|
565
|
+
|
|
566
|
+
if [ ${#commands[@]} -eq 0 ]; then
|
|
567
|
+
warn "No commands found in AGENTS.md"
|
|
568
|
+
exit 0
|
|
569
|
+
fi
|
|
570
|
+
|
|
571
|
+
echo "Found ${#commands[@]} unique commands to verify"
|
|
572
|
+
echo ""
|
|
573
|
+
|
|
574
|
+
for cmd in "${commands[@]}"; do
|
|
575
|
+
[ -n "$cmd" ] && verify_command "$cmd"
|
|
576
|
+
done
|
|
577
|
+
|
|
578
|
+
echo ""
|
|
579
|
+
echo "======================================"
|
|
580
|
+
echo "Verification Summary"
|
|
581
|
+
echo "======================================"
|
|
582
|
+
echo -e "${GREEN}Passed:${NC} $PASSED"
|
|
583
|
+
echo -e "${YELLOW}Skipped:${NC} $SKIPPED"
|
|
584
|
+
echo -e "${RED}Failed:${NC} $FAILED"
|
|
585
|
+
echo ""
|
|
586
|
+
|
|
587
|
+
if [ "$FAILED" -gt 0 ]; then
|
|
588
|
+
echo -e "${RED}Some commands in AGENTS.md are invalid!${NC}"
|
|
589
|
+
echo "Update AGENTS.md to fix broken command references."
|
|
590
|
+
|
|
591
|
+
# Still write JSON results
|
|
592
|
+
if [ "$DRY_RUN" = false ] && [ ${#COMMAND_RESULTS[@]} -gt 0 ]; then
|
|
593
|
+
write_json_results
|
|
594
|
+
fi
|
|
595
|
+
|
|
596
|
+
exit 1
|
|
597
|
+
else
|
|
598
|
+
echo -e "${GREEN}All verifiable commands are valid.${NC}"
|
|
599
|
+
|
|
600
|
+
# Write JSON results
|
|
601
|
+
if [ "$DRY_RUN" = false ] && [ ${#COMMAND_RESULTS[@]} -gt 0 ]; then
|
|
602
|
+
write_json_results
|
|
603
|
+
echo "Verification results saved to $OUTPUT_JSON"
|
|
604
|
+
fi
|
|
605
|
+
|
|
606
|
+
# Update verified timestamp if not dry-run
|
|
607
|
+
if [ "$DRY_RUN" = false ] && [ -w "$AGENTS_FILE" ]; then
|
|
608
|
+
TODAY=$(date +%Y-%m-%d)
|
|
609
|
+
if grep -q "Last verified:" "$AGENTS_FILE"; then
|
|
610
|
+
# Portable sed -i: use backup extension then remove backup
|
|
611
|
+
sed -i.bak "s/Last verified: .*/Last verified: $TODAY -->/" "$AGENTS_FILE" && rm -f "$AGENTS_FILE.bak"
|
|
612
|
+
echo "Updated 'Last verified' timestamp to $TODAY"
|
|
613
|
+
fi
|
|
614
|
+
fi
|
|
615
|
+
fi
|