@synapta/skills 0.1.0 → 0.1.2
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-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,96 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Extract GitHub repository rulesets (newer API, not just branch protection)
|
|
3
|
+
# Returns JSON with ruleset details for AGENTS.md generation
|
|
4
|
+
# Falls back gracefully if unavailable (no auth, not GitHub, no rulesets)
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
PROJECT_DIR="${1:-.}"
|
|
8
|
+
cd "$PROJECT_DIR"
|
|
9
|
+
|
|
10
|
+
# Silent exit with empty JSON if prerequisites not met
|
|
11
|
+
bail() {
|
|
12
|
+
jq -n '{rulesets: [], merge_queue: false, required_checks: [], signed_commits: false}'
|
|
13
|
+
exit 0
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
# Check gh CLI available
|
|
17
|
+
command -v gh &>/dev/null || bail
|
|
18
|
+
|
|
19
|
+
# Check authenticated
|
|
20
|
+
gh auth status &>/dev/null 2>&1 || bail
|
|
21
|
+
|
|
22
|
+
# Check this is a git repo with a remote
|
|
23
|
+
REMOTE_URL=$(git remote get-url origin 2>/dev/null) || bail
|
|
24
|
+
|
|
25
|
+
# Check it's a GitHub repo
|
|
26
|
+
[[ "$REMOTE_URL" =~ github\.com ]] || bail
|
|
27
|
+
|
|
28
|
+
# Extract owner/repo from URL (handles both HTTPS and SSH)
|
|
29
|
+
OWNER_REPO=$(echo "$REMOTE_URL" | sed -E 's|.*github\.com[:/]([^/]+/[^/.]+)(\.git)?.*|\1|')
|
|
30
|
+
[[ -n "$OWNER_REPO" ]] || bail
|
|
31
|
+
|
|
32
|
+
# Fetch rulesets — may fail if no permission or no rulesets
|
|
33
|
+
RULESETS_RAW=$(gh api "repos/$OWNER_REPO/rulesets" 2>/dev/null) || bail
|
|
34
|
+
|
|
35
|
+
# Check if response is a valid array
|
|
36
|
+
echo "$RULESETS_RAW" | jq -e 'type == "array"' &>/dev/null || bail
|
|
37
|
+
|
|
38
|
+
RULESET_COUNT=$(echo "$RULESETS_RAW" | jq 'length')
|
|
39
|
+
if [ "$RULESET_COUNT" -eq 0 ]; then
|
|
40
|
+
bail
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
# Track aggregate settings
|
|
44
|
+
HAS_MERGE_QUEUE=false
|
|
45
|
+
HAS_SIGNED_COMMITS=false
|
|
46
|
+
ALL_REQUIRED_CHECKS="[]"
|
|
47
|
+
RULESETS_JSON="[]"
|
|
48
|
+
|
|
49
|
+
for i in $(seq 0 $((RULESET_COUNT - 1))); do
|
|
50
|
+
RULESET_ID=$(echo "$RULESETS_RAW" | jq -r ".[$i].id")
|
|
51
|
+
RULESET_NAME=$(echo "$RULESETS_RAW" | jq -r ".[$i].name // \"unnamed\"")
|
|
52
|
+
RULESET_TARGET=$(echo "$RULESETS_RAW" | jq -r ".[$i].target // \"branch\"")
|
|
53
|
+
RULESET_ENFORCEMENT=$(echo "$RULESETS_RAW" | jq -r ".[$i].enforcement // \"disabled\"")
|
|
54
|
+
|
|
55
|
+
# Skip disabled rulesets
|
|
56
|
+
[ "$RULESET_ENFORCEMENT" = "disabled" ] && continue
|
|
57
|
+
|
|
58
|
+
# Fetch detailed ruleset info (includes rules array)
|
|
59
|
+
DETAIL=$(gh api "repos/$OWNER_REPO/rulesets/$RULESET_ID" 2>/dev/null) || continue
|
|
60
|
+
|
|
61
|
+
# Extract rule types from the rules array
|
|
62
|
+
RULE_TYPES=$(echo "$DETAIL" | jq -r '[.rules[]?.type // empty] | unique' 2>/dev/null) || RULE_TYPES="[]"
|
|
63
|
+
|
|
64
|
+
# Check for specific rule types
|
|
65
|
+
if echo "$RULE_TYPES" | jq -e 'index("merge_queue")' &>/dev/null; then
|
|
66
|
+
HAS_MERGE_QUEUE=true
|
|
67
|
+
fi
|
|
68
|
+
if echo "$RULE_TYPES" | jq -e 'index("required_signatures")' &>/dev/null; then
|
|
69
|
+
HAS_SIGNED_COMMITS=true
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
# Extract required status checks
|
|
73
|
+
STATUS_CHECKS=$(echo "$DETAIL" | jq -r '
|
|
74
|
+
[.rules[]? | select(.type == "required_status_checks") |
|
|
75
|
+
.parameters.required_status_checks[]?.context // empty] | unique' 2>/dev/null) || STATUS_CHECKS="[]"
|
|
76
|
+
|
|
77
|
+
if [ "$STATUS_CHECKS" != "[]" ] && [ "$STATUS_CHECKS" != "null" ]; then
|
|
78
|
+
ALL_REQUIRED_CHECKS=$(echo "$ALL_REQUIRED_CHECKS" "$STATUS_CHECKS" | jq -s 'add | unique')
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
# Add to rulesets array
|
|
82
|
+
RULESETS_JSON=$(echo "$RULESETS_JSON" | jq \
|
|
83
|
+
--arg name "$RULESET_NAME" \
|
|
84
|
+
--arg target "$RULESET_TARGET" \
|
|
85
|
+
--arg enforcement "$RULESET_ENFORCEMENT" \
|
|
86
|
+
--argjson rules "$RULE_TYPES" \
|
|
87
|
+
'. + [{name: $name, target: $target, enforcement: $enforcement, rules: $rules}]')
|
|
88
|
+
done
|
|
89
|
+
|
|
90
|
+
# Output final JSON
|
|
91
|
+
jq -n \
|
|
92
|
+
--argjson rulesets "$RULESETS_JSON" \
|
|
93
|
+
--argjson merge_queue "$HAS_MERGE_QUEUE" \
|
|
94
|
+
--argjson required_checks "$ALL_REQUIRED_CHECKS" \
|
|
95
|
+
--argjson signed_commits "$HAS_SIGNED_COMMITS" \
|
|
96
|
+
'{rulesets: $rulesets, merge_queue: $merge_queue, required_checks: $required_checks, signed_commits: $signed_commits}'
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Extract GitHub repository settings via gh CLI
|
|
3
|
+
# Returns {} silently if gh unavailable, not authenticated, or not a GitHub repo
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
PROJECT_DIR="${1:-.}"
|
|
7
|
+
cd "$PROJECT_DIR"
|
|
8
|
+
|
|
9
|
+
# Silent exit with empty JSON if prerequisites not met
|
|
10
|
+
bail() { echo "{}"; exit 0; }
|
|
11
|
+
|
|
12
|
+
# Check gh CLI available
|
|
13
|
+
command -v gh &>/dev/null || bail
|
|
14
|
+
|
|
15
|
+
# Check authenticated
|
|
16
|
+
gh auth status &>/dev/null 2>&1 || bail
|
|
17
|
+
|
|
18
|
+
# Check this is a git repo with a remote
|
|
19
|
+
REMOTE_URL=$(git remote get-url origin 2>/dev/null) || bail
|
|
20
|
+
|
|
21
|
+
# Check it's a GitHub repo
|
|
22
|
+
[[ "$REMOTE_URL" =~ github\.com ]] || bail
|
|
23
|
+
|
|
24
|
+
# Extract owner/repo from URL (handles both HTTPS and SSH)
|
|
25
|
+
OWNER_REPO=$(echo "$REMOTE_URL" | sed -E 's|.*github\.com[:/]([^/]+/[^/.]+)(\.git)?.*|\1|')
|
|
26
|
+
[[ -n "$OWNER_REPO" ]] || bail
|
|
27
|
+
|
|
28
|
+
# Fetch repo settings
|
|
29
|
+
REPO_INFO=$(gh api "repos/$OWNER_REPO" 2>/dev/null) || bail
|
|
30
|
+
|
|
31
|
+
# Extract merge strategies
|
|
32
|
+
ALLOW_SQUASH=$(echo "$REPO_INFO" | jq -r '.allow_squash_merge // false')
|
|
33
|
+
ALLOW_MERGE=$(echo "$REPO_INFO" | jq -r '.allow_merge_commit // false')
|
|
34
|
+
ALLOW_REBASE=$(echo "$REPO_INFO" | jq -r '.allow_rebase_merge // false')
|
|
35
|
+
DEFAULT_BRANCH=$(echo "$REPO_INFO" | jq -r '.default_branch // "main"')
|
|
36
|
+
DELETE_BRANCH=$(echo "$REPO_INFO" | jq -r '.delete_branch_on_merge // false')
|
|
37
|
+
|
|
38
|
+
# Build merge strategies array
|
|
39
|
+
STRATEGIES="[]"
|
|
40
|
+
[ "$ALLOW_SQUASH" = "true" ] && STRATEGIES=$(echo "$STRATEGIES" | jq '. + ["squash"]')
|
|
41
|
+
[ "$ALLOW_MERGE" = "true" ] && STRATEGIES=$(echo "$STRATEGIES" | jq '. + ["merge"]')
|
|
42
|
+
[ "$ALLOW_REBASE" = "true" ] && STRATEGIES=$(echo "$STRATEGIES" | jq '. + ["rebase"]')
|
|
43
|
+
|
|
44
|
+
# Fetch branch protection (may fail if not configured or no access)
|
|
45
|
+
# Note: gh api returns error JSON to stdout on 404, so we check for error message
|
|
46
|
+
PROTECTION=$(gh api "repos/$OWNER_REPO/branches/$DEFAULT_BRANCH/protection" 2>/dev/null || true)
|
|
47
|
+
if echo "$PROTECTION" | jq -e '.message' &>/dev/null; then
|
|
48
|
+
# API returned an error (e.g., "Branch not protected")
|
|
49
|
+
PROTECTION="{}"
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
# Extract protection settings
|
|
53
|
+
REQUIRED_APPROVALS=0
|
|
54
|
+
REQUIRED_CHECKS="[]"
|
|
55
|
+
REQUIRE_UP_TO_DATE=false
|
|
56
|
+
DISMISS_STALE=false
|
|
57
|
+
|
|
58
|
+
if [ "$PROTECTION" != "{}" ]; then
|
|
59
|
+
# Required approving reviews
|
|
60
|
+
REQUIRED_APPROVALS=$(echo "$PROTECTION" | jq -r '.required_pull_request_reviews.required_approving_review_count // 0')
|
|
61
|
+
DISMISS_STALE=$(echo "$PROTECTION" | jq -r '.required_pull_request_reviews.dismiss_stale_reviews // false')
|
|
62
|
+
|
|
63
|
+
# Required status checks
|
|
64
|
+
REQUIRED_CHECKS=$(echo "$PROTECTION" | jq -r '.required_status_checks.contexts // []')
|
|
65
|
+
|
|
66
|
+
# Require up-to-date branch
|
|
67
|
+
REQUIRE_UP_TO_DATE=$(echo "$PROTECTION" | jq -r '.required_status_checks.strict // false')
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
# Output JSON
|
|
71
|
+
jq -n \
|
|
72
|
+
--arg default_branch "$DEFAULT_BRANCH" \
|
|
73
|
+
--argjson merge_strategies "$STRATEGIES" \
|
|
74
|
+
--argjson required_approvals "$REQUIRED_APPROVALS" \
|
|
75
|
+
--argjson required_checks "$REQUIRED_CHECKS" \
|
|
76
|
+
--argjson require_up_to_date "$REQUIRE_UP_TO_DATE" \
|
|
77
|
+
--argjson dismiss_stale "$DISMISS_STALE" \
|
|
78
|
+
--argjson delete_branch "$DELETE_BRANCH" \
|
|
79
|
+
'{
|
|
80
|
+
available: true,
|
|
81
|
+
default_branch: $default_branch,
|
|
82
|
+
merge_strategies: $merge_strategies,
|
|
83
|
+
required_approvals: $required_approvals,
|
|
84
|
+
required_checks: $required_checks,
|
|
85
|
+
require_up_to_date: $require_up_to_date,
|
|
86
|
+
dismiss_stale_reviews: $dismiss_stale,
|
|
87
|
+
delete_branch_on_merge: $delete_branch
|
|
88
|
+
}'
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Extract information from IDE and editor configuration files
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
PROJECT_DIR="${1:-.}"
|
|
6
|
+
cd "$PROJECT_DIR"
|
|
7
|
+
|
|
8
|
+
# Parse .editorconfig
|
|
9
|
+
parse_editorconfig() {
|
|
10
|
+
local file="$1"
|
|
11
|
+
|
|
12
|
+
if [ ! -f "$file" ]; then
|
|
13
|
+
echo "{}"
|
|
14
|
+
return
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
local indent_style=""
|
|
18
|
+
local indent_size=""
|
|
19
|
+
local tab_width=""
|
|
20
|
+
local end_of_line=""
|
|
21
|
+
local charset=""
|
|
22
|
+
local trim_trailing=""
|
|
23
|
+
local insert_final=""
|
|
24
|
+
local max_line_length=""
|
|
25
|
+
|
|
26
|
+
# Parse INI-style format (simplified)
|
|
27
|
+
while IFS= read -r line; do
|
|
28
|
+
# Skip comments and section headers
|
|
29
|
+
[[ "$line" =~ ^[[:space:]]*[#\;] ]] && continue
|
|
30
|
+
[[ "$line" =~ ^\[.*\] ]] && continue
|
|
31
|
+
|
|
32
|
+
# Parse key=value
|
|
33
|
+
if [[ "$line" =~ ^([a-z_]+)[[:space:]]*=[[:space:]]*(.+)$ ]]; then
|
|
34
|
+
key="${BASH_REMATCH[1]}"
|
|
35
|
+
value="${BASH_REMATCH[2]}"
|
|
36
|
+
|
|
37
|
+
case "$key" in
|
|
38
|
+
indent_style) indent_style="$value" ;;
|
|
39
|
+
indent_size) indent_size="$value" ;;
|
|
40
|
+
tab_width) tab_width="$value" ;;
|
|
41
|
+
end_of_line) end_of_line="$value" ;;
|
|
42
|
+
charset) charset="$value" ;;
|
|
43
|
+
trim_trailing_whitespace) trim_trailing="$value" ;;
|
|
44
|
+
insert_final_newline) insert_final="$value" ;;
|
|
45
|
+
max_line_length) max_line_length="$value" ;;
|
|
46
|
+
esac
|
|
47
|
+
fi
|
|
48
|
+
done < "$file"
|
|
49
|
+
|
|
50
|
+
jq -n \
|
|
51
|
+
--arg indent_style "$indent_style" \
|
|
52
|
+
--arg indent_size "$indent_size" \
|
|
53
|
+
--arg tab_width "$tab_width" \
|
|
54
|
+
--arg end_of_line "$end_of_line" \
|
|
55
|
+
--arg charset "$charset" \
|
|
56
|
+
--arg trim_trailing "$trim_trailing" \
|
|
57
|
+
--arg insert_final "$insert_final" \
|
|
58
|
+
--arg max_line_length "$max_line_length" \
|
|
59
|
+
'{
|
|
60
|
+
indent_style: $indent_style,
|
|
61
|
+
indent_size: $indent_size,
|
|
62
|
+
tab_width: $tab_width,
|
|
63
|
+
end_of_line: $end_of_line,
|
|
64
|
+
charset: $charset,
|
|
65
|
+
trim_trailing_whitespace: $trim_trailing,
|
|
66
|
+
insert_final_newline: $insert_final,
|
|
67
|
+
max_line_length: $max_line_length
|
|
68
|
+
} | with_entries(select(.value != ""))'
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
# Parse VSCode settings.json
|
|
72
|
+
parse_vscode_settings() {
|
|
73
|
+
local file="$1"
|
|
74
|
+
|
|
75
|
+
if [ ! -f "$file" ]; then
|
|
76
|
+
echo "{}"
|
|
77
|
+
return
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
# Extract key settings (remove comments first)
|
|
81
|
+
sed 's|//.*||g' "$file" 2>/dev/null | jq '{
|
|
82
|
+
formatter: (."editor.defaultFormatter" // null),
|
|
83
|
+
format_on_save: (."editor.formatOnSave" // null),
|
|
84
|
+
tab_size: (."editor.tabSize" // null),
|
|
85
|
+
insert_spaces: (."editor.insertSpaces" // null),
|
|
86
|
+
eol: (."files.eol" // null),
|
|
87
|
+
trailing_whitespace: (."files.trimTrailingWhitespace" // null),
|
|
88
|
+
final_newline: (."files.insertFinalNewline" // null),
|
|
89
|
+
rulers: (."editor.rulers" // null),
|
|
90
|
+
python_linting: (."python.linting.enabled" // null),
|
|
91
|
+
python_formatter: (."python.formatting.provider" // null),
|
|
92
|
+
typescript_preferences: (."typescript.preferences.quoteStyle" // null),
|
|
93
|
+
eslint_enable: (."eslint.enable" // null),
|
|
94
|
+
prettier_enable: (."prettier.enable" // null)
|
|
95
|
+
} | with_entries(select(.value != null))' 2>/dev/null || echo "{}"
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
# Parse VSCode extensions.json
|
|
99
|
+
parse_vscode_extensions() {
|
|
100
|
+
local file="$1"
|
|
101
|
+
|
|
102
|
+
if [ ! -f "$file" ]; then
|
|
103
|
+
echo "[]"
|
|
104
|
+
return
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
# Extract recommendations
|
|
108
|
+
jq '.recommendations // []' "$file" 2>/dev/null || echo "[]"
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
# Parse VSCode launch.json
|
|
112
|
+
parse_vscode_launch() {
|
|
113
|
+
local file="$1"
|
|
114
|
+
|
|
115
|
+
if [ ! -f "$file" ]; then
|
|
116
|
+
echo "[]"
|
|
117
|
+
return
|
|
118
|
+
fi
|
|
119
|
+
|
|
120
|
+
# Extract configuration names and types
|
|
121
|
+
jq '[.configurations[] | {name: .name, type: .type, request: .request}]' "$file" 2>/dev/null || echo "[]"
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
# Check for JetBrains IDE settings
|
|
125
|
+
parse_jetbrains_settings() {
|
|
126
|
+
local idea_dir="$1"
|
|
127
|
+
|
|
128
|
+
if [ ! -d "$idea_dir" ]; then
|
|
129
|
+
echo "{}"
|
|
130
|
+
return
|
|
131
|
+
fi
|
|
132
|
+
|
|
133
|
+
local code_style_file=""
|
|
134
|
+
local inspection_profile=""
|
|
135
|
+
local project_settings=()
|
|
136
|
+
|
|
137
|
+
# Find code style settings
|
|
138
|
+
if [ -d "$idea_dir/codeStyles" ]; then
|
|
139
|
+
code_style_file=$(find "$idea_dir/codeStyles" -name "*.xml" -type f 2>/dev/null | head -1)
|
|
140
|
+
fi
|
|
141
|
+
|
|
142
|
+
# Find inspection profile
|
|
143
|
+
if [ -d "$idea_dir/inspectionProfiles" ]; then
|
|
144
|
+
inspection_profile=$(find "$idea_dir/inspectionProfiles" -name "*.xml" -type f 2>/dev/null | head -1)
|
|
145
|
+
fi
|
|
146
|
+
|
|
147
|
+
# Check for common settings files
|
|
148
|
+
[ -f "$idea_dir/misc.xml" ] && project_settings+=("misc.xml")
|
|
149
|
+
[ -f "$idea_dir/modules.xml" ] && project_settings+=("modules.xml")
|
|
150
|
+
[ -f "$idea_dir/vcs.xml" ] && project_settings+=("vcs.xml")
|
|
151
|
+
[ -f "$idea_dir/php.xml" ] && project_settings+=("php.xml")
|
|
152
|
+
[ -f "$idea_dir/jsLibraryMappings.xml" ] && project_settings+=("jsLibraryMappings.xml")
|
|
153
|
+
|
|
154
|
+
local settings_json="[]"
|
|
155
|
+
if [ ${#project_settings[@]} -gt 0 ]; then
|
|
156
|
+
settings_json=$(printf '%s\n' "${project_settings[@]}" | jq -R . | jq -s .)
|
|
157
|
+
fi
|
|
158
|
+
|
|
159
|
+
jq -n \
|
|
160
|
+
--arg code_style "$code_style_file" \
|
|
161
|
+
--arg inspection "$inspection_profile" \
|
|
162
|
+
--argjson settings "$settings_json" \
|
|
163
|
+
'{
|
|
164
|
+
code_style_file: $code_style,
|
|
165
|
+
inspection_profile: $inspection,
|
|
166
|
+
project_settings: $settings
|
|
167
|
+
} | with_entries(select(.value != "" and .value != []))'
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
# Detect IDEs present
|
|
171
|
+
IDES=()
|
|
172
|
+
[ -f ".editorconfig" ] && IDES+=("editorconfig")
|
|
173
|
+
[ -d ".vscode" ] && IDES+=("vscode")
|
|
174
|
+
[ -d ".idea" ] && IDES+=("idea")
|
|
175
|
+
[ -d ".phpstorm" ] && IDES+=("phpstorm")
|
|
176
|
+
[ -d ".fleet" ] && IDES+=("fleet")
|
|
177
|
+
{ [ -d ".vim" ] || [ -f ".vimrc" ]; } && IDES+=("vim")
|
|
178
|
+
{ [ -d ".nvim" ] || [ -f ".nvimrc" ]; } && IDES+=("neovim")
|
|
179
|
+
[ -f ".sublime-project" ] && IDES+=("sublime")
|
|
180
|
+
|
|
181
|
+
# Build IDE list JSON
|
|
182
|
+
if [ ${#IDES[@]} -eq 0 ]; then
|
|
183
|
+
IDES_JSON="[]"
|
|
184
|
+
else
|
|
185
|
+
IDES_JSON=$(printf '%s\n' "${IDES[@]}" | jq -R . | jq -s .)
|
|
186
|
+
fi
|
|
187
|
+
|
|
188
|
+
# Extract specific settings
|
|
189
|
+
EDITORCONFIG_SETTINGS="{}"
|
|
190
|
+
VSCODE_SETTINGS="{}"
|
|
191
|
+
VSCODE_EXTENSIONS="[]"
|
|
192
|
+
VSCODE_LAUNCH="[]"
|
|
193
|
+
JETBRAINS_SETTINGS="{}"
|
|
194
|
+
|
|
195
|
+
if [ -f ".editorconfig" ]; then
|
|
196
|
+
EDITORCONFIG_SETTINGS=$(parse_editorconfig ".editorconfig")
|
|
197
|
+
fi
|
|
198
|
+
|
|
199
|
+
if [ -d ".vscode" ]; then
|
|
200
|
+
VSCODE_SETTINGS=$(parse_vscode_settings ".vscode/settings.json")
|
|
201
|
+
VSCODE_EXTENSIONS=$(parse_vscode_extensions ".vscode/extensions.json")
|
|
202
|
+
VSCODE_LAUNCH=$(parse_vscode_launch ".vscode/launch.json")
|
|
203
|
+
fi
|
|
204
|
+
|
|
205
|
+
if [ -d ".idea" ]; then
|
|
206
|
+
JETBRAINS_SETTINGS=$(parse_jetbrains_settings ".idea")
|
|
207
|
+
elif [ -d ".phpstorm" ]; then
|
|
208
|
+
JETBRAINS_SETTINGS=$(parse_jetbrains_settings ".phpstorm")
|
|
209
|
+
fi
|
|
210
|
+
|
|
211
|
+
# Build final JSON output
|
|
212
|
+
jq -n \
|
|
213
|
+
--argjson ides "$IDES_JSON" \
|
|
214
|
+
--argjson editorconfig "$EDITORCONFIG_SETTINGS" \
|
|
215
|
+
--argjson vscode_settings "$VSCODE_SETTINGS" \
|
|
216
|
+
--argjson vscode_extensions "$VSCODE_EXTENSIONS" \
|
|
217
|
+
--argjson vscode_launch "$VSCODE_LAUNCH" \
|
|
218
|
+
--argjson jetbrains "$JETBRAINS_SETTINGS" \
|
|
219
|
+
'{
|
|
220
|
+
detected_ides: $ides,
|
|
221
|
+
editorconfig: $editorconfig,
|
|
222
|
+
vscode: {
|
|
223
|
+
settings: $vscode_settings,
|
|
224
|
+
recommended_extensions: $vscode_extensions,
|
|
225
|
+
launch_configurations: $vscode_launch
|
|
226
|
+
},
|
|
227
|
+
jetbrains: $jetbrains
|
|
228
|
+
}'
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Extract information from platform-specific files (.github/, .gitlab/, etc.)
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
PROJECT_DIR="${1:-.}"
|
|
6
|
+
cd "$PROJECT_DIR"
|
|
7
|
+
|
|
8
|
+
# Helper to extract checklist items from markdown
|
|
9
|
+
extract_checklist() {
|
|
10
|
+
local file="$1"
|
|
11
|
+
local items=()
|
|
12
|
+
|
|
13
|
+
if [ ! -f "$file" ]; then
|
|
14
|
+
echo "[]"
|
|
15
|
+
return
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# Find checkbox lines: - [ ] text or - [x] text
|
|
19
|
+
while IFS= read -r line; do
|
|
20
|
+
# Extract text after checkbox
|
|
21
|
+
text=$(echo "$line" | sed -E 's/^[[:space:]]*[-*][[:space:]]*\[[[:space:]x]\][[:space:]]*//')
|
|
22
|
+
if [ -n "$text" ] && [ ${#text} -gt 3 ]; then
|
|
23
|
+
items+=("$text")
|
|
24
|
+
fi
|
|
25
|
+
done < <(grep -E '^\s*[-*]\s*\[[[:space:]x]\]' "$file" 2>/dev/null || true)
|
|
26
|
+
|
|
27
|
+
if [ ${#items[@]} -eq 0 ]; then
|
|
28
|
+
echo "[]"
|
|
29
|
+
else
|
|
30
|
+
printf '%s\n' "${items[@]}" | jq -R . | jq -s .
|
|
31
|
+
fi
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
# Extract required fields from issue templates (YAML front matter)
|
|
35
|
+
extract_issue_template_fields() {
|
|
36
|
+
local file="$1"
|
|
37
|
+
|
|
38
|
+
if [ ! -f "$file" ]; then
|
|
39
|
+
echo "[]"
|
|
40
|
+
return
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
# Check for YAML form-based template
|
|
44
|
+
if grep -q "^type:" "$file" 2>/dev/null; then
|
|
45
|
+
# Extract field labels marked as required
|
|
46
|
+
grep -B2 "required: true" "$file" 2>/dev/null | grep "label:" | sed 's/.*label:[[:space:]]*//' | jq -R . | jq -s .
|
|
47
|
+
else
|
|
48
|
+
echo "[]"
|
|
49
|
+
fi
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
# Parse CODEOWNERS file
|
|
53
|
+
parse_codeowners() {
|
|
54
|
+
local file="$1"
|
|
55
|
+
local owners=()
|
|
56
|
+
|
|
57
|
+
if [ ! -f "$file" ]; then
|
|
58
|
+
echo "[]"
|
|
59
|
+
return
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
# Extract pattern and owners (skip comments and empty lines)
|
|
63
|
+
while IFS= read -r line; do
|
|
64
|
+
# Skip comments and empty lines
|
|
65
|
+
[[ "$line" =~ ^[[:space:]]*# ]] && continue
|
|
66
|
+
[[ -z "${line// }" ]] && continue
|
|
67
|
+
|
|
68
|
+
# Parse pattern and owners
|
|
69
|
+
pattern=$(echo "$line" | awk '{print $1}')
|
|
70
|
+
owner=$(echo "$line" | awk '{$1=""; print}' | sed 's/^[[:space:]]*//')
|
|
71
|
+
|
|
72
|
+
if [ -n "$pattern" ] && [ -n "$owner" ]; then
|
|
73
|
+
owners+=("{\"pattern\": \"$pattern\", \"owners\": \"$owner\"}")
|
|
74
|
+
fi
|
|
75
|
+
done < "$file"
|
|
76
|
+
|
|
77
|
+
if [ ${#owners[@]} -eq 0 ]; then
|
|
78
|
+
echo "[]"
|
|
79
|
+
else
|
|
80
|
+
printf '%s\n' "${owners[@]}" | jq -s .
|
|
81
|
+
fi
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
# Parse dependabot.yml
|
|
85
|
+
parse_dependabot() {
|
|
86
|
+
local file="$1"
|
|
87
|
+
|
|
88
|
+
if [ ! -f "$file" ]; then
|
|
89
|
+
echo "{}"
|
|
90
|
+
return
|
|
91
|
+
fi
|
|
92
|
+
|
|
93
|
+
# Extract package ecosystems and schedules
|
|
94
|
+
local ecosystems=()
|
|
95
|
+
local current_eco=""
|
|
96
|
+
local current_schedule=""
|
|
97
|
+
|
|
98
|
+
while IFS= read -r line; do
|
|
99
|
+
if [[ "$line" =~ package-ecosystem:[[:space:]]*\"?([^\"]+)\"? ]]; then
|
|
100
|
+
current_eco="${BASH_REMATCH[1]}"
|
|
101
|
+
elif [[ "$line" =~ interval:[[:space:]]*\"?([^\"]+)\"? ]]; then
|
|
102
|
+
current_schedule="${BASH_REMATCH[1]}"
|
|
103
|
+
if [ -n "$current_eco" ]; then
|
|
104
|
+
ecosystems+=("{\"ecosystem\": \"$current_eco\", \"schedule\": \"$current_schedule\"}")
|
|
105
|
+
current_eco=""
|
|
106
|
+
current_schedule=""
|
|
107
|
+
fi
|
|
108
|
+
fi
|
|
109
|
+
done < "$file"
|
|
110
|
+
|
|
111
|
+
if [ ${#ecosystems[@]} -eq 0 ]; then
|
|
112
|
+
echo "{\"updates\": []}"
|
|
113
|
+
else
|
|
114
|
+
printf '%s\n' "${ecosystems[@]}" | jq -s '{updates: .}'
|
|
115
|
+
fi
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
# Parse renovate.json
|
|
119
|
+
parse_renovate() {
|
|
120
|
+
local file="$1"
|
|
121
|
+
|
|
122
|
+
if [ ! -f "$file" ]; then
|
|
123
|
+
echo "{}"
|
|
124
|
+
return
|
|
125
|
+
fi
|
|
126
|
+
|
|
127
|
+
# Extract key configuration
|
|
128
|
+
jq '{
|
|
129
|
+
extends: .extends,
|
|
130
|
+
schedule: .schedule,
|
|
131
|
+
automerge: .automerge,
|
|
132
|
+
labels: .labels
|
|
133
|
+
}' "$file" 2>/dev/null || echo "{}"
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
# Detect platform type
|
|
137
|
+
PLATFORM="none"
|
|
138
|
+
if [ -d ".github" ]; then
|
|
139
|
+
PLATFORM="github"
|
|
140
|
+
elif [ -d ".gitlab" ]; then
|
|
141
|
+
PLATFORM="gitlab"
|
|
142
|
+
elif [ -d ".bitbucket" ]; then
|
|
143
|
+
PLATFORM="bitbucket"
|
|
144
|
+
fi
|
|
145
|
+
|
|
146
|
+
# Initialize result variables
|
|
147
|
+
PR_TEMPLATE_FILE=""
|
|
148
|
+
PR_CHECKLIST="[]"
|
|
149
|
+
ISSUE_TEMPLATES=()
|
|
150
|
+
CODEOWNERS_FILE=""
|
|
151
|
+
CODEOWNERS_RULES="[]"
|
|
152
|
+
DEPENDABOT_FILE=""
|
|
153
|
+
DEPENDABOT_CONFIG="{}"
|
|
154
|
+
RENOVATE_FILE=""
|
|
155
|
+
RENOVATE_CONFIG="{}"
|
|
156
|
+
FUNDING_FILE=""
|
|
157
|
+
FUNDING_SPONSORS="[]"
|
|
158
|
+
|
|
159
|
+
# GitHub-specific extraction
|
|
160
|
+
if [ "$PLATFORM" = "github" ]; then
|
|
161
|
+
# PR template
|
|
162
|
+
for f in .github/PULL_REQUEST_TEMPLATE.md .github/pull_request_template.md PULL_REQUEST_TEMPLATE.md; do
|
|
163
|
+
if [ -f "$f" ]; then
|
|
164
|
+
PR_TEMPLATE_FILE="$f"
|
|
165
|
+
PR_CHECKLIST=$(extract_checklist "$f")
|
|
166
|
+
break
|
|
167
|
+
fi
|
|
168
|
+
done
|
|
169
|
+
|
|
170
|
+
# Issue templates
|
|
171
|
+
if [ -d ".github/ISSUE_TEMPLATE" ]; then
|
|
172
|
+
for template in .github/ISSUE_TEMPLATE/*.md .github/ISSUE_TEMPLATE/*.yml .github/ISSUE_TEMPLATE/*.yaml; do
|
|
173
|
+
if [ -f "$template" ]; then
|
|
174
|
+
name=$(basename "$template" | sed 's/\.[^.]*$//')
|
|
175
|
+
fields=$(extract_issue_template_fields "$template")
|
|
176
|
+
ISSUE_TEMPLATES+=("{\"name\": \"$name\", \"file\": \"$template\", \"required_fields\": $fields}")
|
|
177
|
+
fi
|
|
178
|
+
done
|
|
179
|
+
fi
|
|
180
|
+
|
|
181
|
+
# CODEOWNERS
|
|
182
|
+
for f in .github/CODEOWNERS CODEOWNERS docs/CODEOWNERS; do
|
|
183
|
+
if [ -f "$f" ]; then
|
|
184
|
+
CODEOWNERS_FILE="$f"
|
|
185
|
+
CODEOWNERS_RULES=$(parse_codeowners "$f")
|
|
186
|
+
break
|
|
187
|
+
fi
|
|
188
|
+
done
|
|
189
|
+
|
|
190
|
+
# Dependabot
|
|
191
|
+
for f in .github/dependabot.yml .github/dependabot.yaml; do
|
|
192
|
+
if [ -f "$f" ]; then
|
|
193
|
+
DEPENDABOT_FILE="$f"
|
|
194
|
+
DEPENDABOT_CONFIG=$(parse_dependabot "$f")
|
|
195
|
+
break
|
|
196
|
+
fi
|
|
197
|
+
done
|
|
198
|
+
|
|
199
|
+
# Renovate (can be in root or .github)
|
|
200
|
+
for f in renovate.json .github/renovate.json renovate.json5 .renovaterc .renovaterc.json; do
|
|
201
|
+
if [ -f "$f" ]; then
|
|
202
|
+
RENOVATE_FILE="$f"
|
|
203
|
+
RENOVATE_CONFIG=$(parse_renovate "$f")
|
|
204
|
+
break
|
|
205
|
+
fi
|
|
206
|
+
done
|
|
207
|
+
|
|
208
|
+
# Funding
|
|
209
|
+
if [ -f ".github/FUNDING.yml" ]; then
|
|
210
|
+
FUNDING_FILE=".github/FUNDING.yml"
|
|
211
|
+
# Extract sponsor platforms
|
|
212
|
+
FUNDING_SPONSORS=$(grep -E "^[a-z_]+:" "$FUNDING_FILE" 2>/dev/null | cut -d: -f1 | jq -R . | jq -s . || echo "[]")
|
|
213
|
+
fi
|
|
214
|
+
fi
|
|
215
|
+
|
|
216
|
+
# GitLab-specific extraction
|
|
217
|
+
if [ "$PLATFORM" = "gitlab" ]; then
|
|
218
|
+
# MR template
|
|
219
|
+
for f in .gitlab/merge_request_templates/Default.md .gitlab/merge_request_templates/*.md; do
|
|
220
|
+
if [ -f "$f" ]; then
|
|
221
|
+
PR_TEMPLATE_FILE="$f"
|
|
222
|
+
PR_CHECKLIST=$(extract_checklist "$f")
|
|
223
|
+
break
|
|
224
|
+
fi
|
|
225
|
+
done
|
|
226
|
+
|
|
227
|
+
# Issue templates
|
|
228
|
+
if [ -d ".gitlab/issue_templates" ]; then
|
|
229
|
+
for template in .gitlab/issue_templates/*.md; do
|
|
230
|
+
if [ -f "$template" ]; then
|
|
231
|
+
name=$(basename "$template" .md)
|
|
232
|
+
ISSUE_TEMPLATES+=("{\"name\": \"$name\", \"file\": \"$template\", \"required_fields\": []}")
|
|
233
|
+
fi
|
|
234
|
+
done
|
|
235
|
+
fi
|
|
236
|
+
|
|
237
|
+
# CODEOWNERS
|
|
238
|
+
if [ -f "CODEOWNERS" ]; then
|
|
239
|
+
CODEOWNERS_FILE="CODEOWNERS"
|
|
240
|
+
CODEOWNERS_RULES=$(parse_codeowners "CODEOWNERS")
|
|
241
|
+
fi
|
|
242
|
+
fi
|
|
243
|
+
|
|
244
|
+
# Build issue templates JSON
|
|
245
|
+
if [ ${#ISSUE_TEMPLATES[@]} -eq 0 ]; then
|
|
246
|
+
ISSUE_TEMPLATES_JSON="[]"
|
|
247
|
+
else
|
|
248
|
+
ISSUE_TEMPLATES_JSON=$(printf '%s\n' "${ISSUE_TEMPLATES[@]}" | jq -s .)
|
|
249
|
+
fi
|
|
250
|
+
|
|
251
|
+
# Build final JSON output
|
|
252
|
+
jq -n \
|
|
253
|
+
--arg platform "$PLATFORM" \
|
|
254
|
+
--arg pr_template "$PR_TEMPLATE_FILE" \
|
|
255
|
+
--argjson pr_checklist "$PR_CHECKLIST" \
|
|
256
|
+
--argjson issue_templates "$ISSUE_TEMPLATES_JSON" \
|
|
257
|
+
--arg codeowners_file "$CODEOWNERS_FILE" \
|
|
258
|
+
--argjson codeowners_rules "$CODEOWNERS_RULES" \
|
|
259
|
+
--arg dependabot_file "$DEPENDABOT_FILE" \
|
|
260
|
+
--argjson dependabot "$DEPENDABOT_CONFIG" \
|
|
261
|
+
--arg renovate_file "$RENOVATE_FILE" \
|
|
262
|
+
--argjson renovate "$RENOVATE_CONFIG" \
|
|
263
|
+
--arg funding_file "$FUNDING_FILE" \
|
|
264
|
+
--argjson funding_sponsors "$FUNDING_SPONSORS" \
|
|
265
|
+
'{
|
|
266
|
+
platform: $platform,
|
|
267
|
+
pull_request: {
|
|
268
|
+
template_file: $pr_template,
|
|
269
|
+
checklist_items: $pr_checklist
|
|
270
|
+
},
|
|
271
|
+
issue_templates: $issue_templates,
|
|
272
|
+
codeowners: {
|
|
273
|
+
file: $codeowners_file,
|
|
274
|
+
rules: $codeowners_rules
|
|
275
|
+
},
|
|
276
|
+
dependency_updates: {
|
|
277
|
+
dependabot: {
|
|
278
|
+
file: $dependabot_file,
|
|
279
|
+
config: $dependabot
|
|
280
|
+
},
|
|
281
|
+
renovate: {
|
|
282
|
+
file: $renovate_file,
|
|
283
|
+
config: $renovate
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
funding: {
|
|
287
|
+
file: $funding_file,
|
|
288
|
+
sponsors: $funding_sponsors
|
|
289
|
+
}
|
|
290
|
+
}'
|