@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.
Files changed (354) hide show
  1. package/dist/index.js +11 -4
  2. package/package.json +3 -4
  3. package/skills/ATTRIBUTION.md +80 -0
  4. package/skills/accessibility-audit/SKILL.md +325 -0
  5. package/skills/accessibility-audit/reference/wcag-checklist.md +103 -0
  6. package/skills/apns-notifier/SKILL.md +86 -0
  7. package/skills/approval-policy-enforcer/SKILL.md +66 -0
  8. package/skills/apps-sdk-builder/LICENSE.txt +201 -0
  9. package/skills/apps-sdk-builder/SKILL.md +328 -0
  10. package/skills/apps-sdk-builder/agents/openai.yaml +13 -0
  11. package/skills/apps-sdk-builder/references/app-archetypes.md +132 -0
  12. package/skills/apps-sdk-builder/references/apps-sdk-docs-workflow.md +135 -0
  13. package/skills/apps-sdk-builder/references/interactive-state-sync-patterns.md +113 -0
  14. package/skills/apps-sdk-builder/references/repo-contract-and-validation.md +93 -0
  15. package/skills/apps-sdk-builder/references/search-fetch-standard.md +67 -0
  16. package/skills/apps-sdk-builder/references/upstream-example-workflow.md +79 -0
  17. package/skills/apps-sdk-builder/references/window-openai-patterns.md +79 -0
  18. package/skills/apps-sdk-builder/scripts/scaffold_node_ext_apps.mjs +606 -0
  19. package/skills/architecture-selector/SKILL.md +64 -0
  20. package/skills/backlog-planner/SKILL.md +68 -0
  21. package/skills/carplay-entitlement-checker/SKILL.md +82 -0
  22. package/skills/concept-deepener/SKILL.md +86 -0
  23. package/skills/concept-discovery/SKILL.md +517 -0
  24. package/skills/concept-discovery/assets/sample-analysis.json +81 -0
  25. package/skills/concept-discovery/expected_outputs/sample-enum-dictionary.md +25 -0
  26. package/skills/concept-discovery/expected_outputs/sample-page-user-list.md +83 -0
  27. package/skills/concept-discovery/expected_outputs/sample-prd-readme.md +43 -0
  28. package/skills/concept-discovery/references/framework-patterns.md +228 -0
  29. package/skills/concept-discovery/references/prd-quality-checklist.md +65 -0
  30. package/skills/concept-discovery/scripts/codebase_analyzer.py +732 -0
  31. package/skills/concept-discovery/scripts/prd_scaffolder.py +435 -0
  32. package/skills/dast-zap/SKILL.md +453 -0
  33. package/skills/dast-zap/assets/.gitkeep +9 -0
  34. package/skills/dast-zap/assets/github_action.yml +207 -0
  35. package/skills/dast-zap/assets/gitlab_ci.yml +226 -0
  36. package/skills/dast-zap/assets/zap_automation.yaml +196 -0
  37. package/skills/dast-zap/assets/zap_context.xml +192 -0
  38. package/skills/dast-zap/references/EXAMPLE.md +40 -0
  39. package/skills/dast-zap/references/api_testing_guide.md +475 -0
  40. package/skills/dast-zap/references/authentication_guide.md +431 -0
  41. package/skills/dast-zap/references/false_positive_handling.md +427 -0
  42. package/skills/dast-zap/references/owasp_mapping.md +255 -0
  43. package/skills/dep-sbom-scan/SKILL.md +466 -0
  44. package/skills/deploy-cloudflare/SKILL.md +930 -0
  45. package/skills/deploy-docker/SKILL.md +55 -0
  46. package/skills/deploy-fly/SKILL.md +228 -0
  47. package/skills/deploy-k8s/SKILL.md +108 -0
  48. package/skills/deploy-k8s/assets/logo.png +0 -0
  49. package/skills/deploy-k8s/docs/README.md +29 -0
  50. package/skills/deploy-k8s/docs/SUMMARY.md +56 -0
  51. package/skills/deploy-k8s/docs/advanced/token-efficiency.md +61 -0
  52. package/skills/deploy-k8s/docs/architecture/multi-tenancy.md +96 -0
  53. package/skills/deploy-k8s/docs/architecture/storage-and-state.md +102 -0
  54. package/skills/deploy-k8s/docs/architecture/workload-patterns.md +87 -0
  55. package/skills/deploy-k8s/docs/book.json +16 -0
  56. package/skills/deploy-k8s/docs/community/changelog.md +34 -0
  57. package/skills/deploy-k8s/docs/community/contributing.md +67 -0
  58. package/skills/deploy-k8s/docs/core-concepts/failure-modes.md +153 -0
  59. package/skills/deploy-k8s/docs/core-concepts/philosophy.md +83 -0
  60. package/skills/deploy-k8s/docs/core-concepts/workflow.md +124 -0
  61. package/skills/deploy-k8s/docs/examples/bad-patterns.md +47 -0
  62. package/skills/deploy-k8s/docs/examples/do-dont-checklist.md +37 -0
  63. package/skills/deploy-k8s/docs/examples/good-patterns.md +49 -0
  64. package/skills/deploy-k8s/docs/failure-modes/api-drift.md +104 -0
  65. package/skills/deploy-k8s/docs/failure-modes/fragile-rollouts.md +99 -0
  66. package/skills/deploy-k8s/docs/failure-modes/insecure-workload-defaults.md +80 -0
  67. package/skills/deploy-k8s/docs/failure-modes/network-exposure.md +98 -0
  68. package/skills/deploy-k8s/docs/failure-modes/privilege-sprawl.md +91 -0
  69. package/skills/deploy-k8s/docs/failure-modes/resource-starvation.md +85 -0
  70. package/skills/deploy-k8s/docs/getting-started/installation.md +152 -0
  71. package/skills/deploy-k8s/docs/getting-started/quick-start.md +115 -0
  72. package/skills/deploy-k8s/docs/guides/helm-patterns.md +71 -0
  73. package/skills/deploy-k8s/docs/guides/kustomize-patterns.md +65 -0
  74. package/skills/deploy-k8s/docs/guides/observability.md +67 -0
  75. package/skills/deploy-k8s/docs/guides/security-hardening.md +59 -0
  76. package/skills/deploy-k8s/docs/guides/validation-and-policy.md +66 -0
  77. package/skills/deploy-k8s/docs/integrations/mcp-integration.md +52 -0
  78. package/skills/deploy-k8s/docs/package-lock.json +2892 -0
  79. package/skills/deploy-k8s/docs/package.json +13 -0
  80. package/skills/deploy-k8s/references/api-drift.md +298 -0
  81. package/skills/deploy-k8s/references/conditional/aks-patterns.md +70 -0
  82. package/skills/deploy-k8s/references/conditional/eks-patterns.md +79 -0
  83. package/skills/deploy-k8s/references/conditional/gitops-controllers.md +71 -0
  84. package/skills/deploy-k8s/references/conditional/gke-patterns.md +74 -0
  85. package/skills/deploy-k8s/references/conditional/observability-stacks.md +80 -0
  86. package/skills/deploy-k8s/references/conditional/openshift-patterns.md +67 -0
  87. package/skills/deploy-k8s/references/daemonset-operator-patterns.md +155 -0
  88. package/skills/deploy-k8s/references/deployment-patterns.md +146 -0
  89. package/skills/deploy-k8s/references/do-dont-patterns.md +87 -0
  90. package/skills/deploy-k8s/references/examples-bad.md +282 -0
  91. package/skills/deploy-k8s/references/examples-good.md +440 -0
  92. package/skills/deploy-k8s/references/fragile-rollouts.md +303 -0
  93. package/skills/deploy-k8s/references/helm-patterns.md +203 -0
  94. package/skills/deploy-k8s/references/insecure-workload-defaults.md +300 -0
  95. package/skills/deploy-k8s/references/job-patterns.md +120 -0
  96. package/skills/deploy-k8s/references/kustomize-patterns.md +239 -0
  97. package/skills/deploy-k8s/references/multi-tenancy.md +343 -0
  98. package/skills/deploy-k8s/references/network-exposure.md +481 -0
  99. package/skills/deploy-k8s/references/observability.md +302 -0
  100. package/skills/deploy-k8s/references/privilege-sprawl.md +273 -0
  101. package/skills/deploy-k8s/references/resource-starvation.md +374 -0
  102. package/skills/deploy-k8s/references/security-hardening.md +209 -0
  103. package/skills/deploy-k8s/references/stateful-patterns.md +130 -0
  104. package/skills/deploy-k8s/references/storage-and-state.md +330 -0
  105. package/skills/deploy-k8s/references/validation-and-policy.md +242 -0
  106. package/skills/deploy-railway/SKILL.md +235 -0
  107. package/skills/deploy-railway/references/analyze-db-mongo.md +84 -0
  108. package/skills/deploy-railway/references/analyze-db-mysql.md +254 -0
  109. package/skills/deploy-railway/references/analyze-db-postgres.md +479 -0
  110. package/skills/deploy-railway/references/analyze-db-redis.md +208 -0
  111. package/skills/deploy-railway/references/analyze-db.md +344 -0
  112. package/skills/deploy-railway/references/configure.md +309 -0
  113. package/skills/deploy-railway/references/deploy.md +195 -0
  114. package/skills/deploy-railway/references/operate.md +214 -0
  115. package/skills/deploy-railway/references/request.md +248 -0
  116. package/skills/deploy-railway/references/setup.md +312 -0
  117. package/skills/deploy-railway/scripts/analyze-mongo.py +1549 -0
  118. package/skills/deploy-railway/scripts/analyze-mysql.py +1195 -0
  119. package/skills/deploy-railway/scripts/analyze-postgres.py +3058 -0
  120. package/skills/deploy-railway/scripts/analyze-redis.py +1090 -0
  121. package/skills/deploy-railway/scripts/dal.py +671 -0
  122. package/skills/deploy-railway/scripts/enable-pg-stats.py +170 -0
  123. package/skills/deploy-railway/scripts/pg-extensions.py +370 -0
  124. package/skills/deploy-railway/scripts/railway-api.sh +52 -0
  125. package/skills/deploy-ssh/SKILL.md +91 -0
  126. package/skills/deploy-vercel/SKILL.md +304 -0
  127. package/skills/deploy-vercel/resources/deploy-codex.sh +301 -0
  128. package/skills/deploy-vercel/resources/deploy.sh +301 -0
  129. package/skills/docs-runbooks/SKILL.md +399 -0
  130. package/skills/drive-status-renderer/SKILL.md +62 -0
  131. package/skills/iac-scan/SKILL.md +680 -0
  132. package/skills/iac-scan/assets/.gitkeep +9 -0
  133. package/skills/iac-scan/assets/checkov_config.yaml +94 -0
  134. package/skills/iac-scan/assets/github_actions.yml +199 -0
  135. package/skills/iac-scan/assets/gitlab_ci.yml +218 -0
  136. package/skills/iac-scan/assets/pre_commit_config.yaml +92 -0
  137. package/skills/iac-scan/references/EXAMPLE.md +40 -0
  138. package/skills/iac-scan/references/compliance_mapping.md +237 -0
  139. package/skills/iac-scan/references/custom_policies.md +460 -0
  140. package/skills/iac-scan/references/suppression_guide.md +431 -0
  141. package/skills/incident-briefing/SKILL.md +66 -0
  142. package/skills/incident-triage/SKILL.md +481 -0
  143. package/{LICENSE → skills/mcp-builder/LICENSE.txt} +15 -14
  144. package/skills/mcp-builder/SKILL.md +244 -0
  145. package/skills/mcp-builder/reference/evaluation.md +602 -0
  146. package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
  147. package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
  148. package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
  149. package/skills/mcp-builder/scripts/connections.py +151 -0
  150. package/skills/mcp-builder/scripts/evaluation.py +373 -0
  151. package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  152. package/skills/mcp-builder/scripts/requirements.txt +2 -0
  153. package/skills/mobile-pairing/SKILL.md +52 -0
  154. package/skills/ops-sre/SKILL.md +297 -0
  155. package/skills/playwright-qa/LICENSE.txt +201 -0
  156. package/skills/playwright-qa/NOTICE.txt +14 -0
  157. package/skills/playwright-qa/SKILL.md +156 -0
  158. package/skills/playwright-qa/agents/openai.yaml +6 -0
  159. package/skills/playwright-qa/assets/playwright-small.svg +3 -0
  160. package/skills/playwright-qa/assets/playwright.png +0 -0
  161. package/skills/playwright-qa/references/cli.md +116 -0
  162. package/skills/playwright-qa/references/workflows.md +95 -0
  163. package/skills/playwright-qa/scripts/playwright_cli.sh +25 -0
  164. package/skills/release-publish/SKILL.md +85 -0
  165. package/skills/repo-bootstrap/SKILL.md +92 -0
  166. package/skills/repo-bootstrap/assets/example-workflows/validate-agents.yml +89 -0
  167. package/skills/repo-bootstrap/assets/root-thin.md +141 -0
  168. package/skills/repo-bootstrap/assets/root-verbose.md +149 -0
  169. package/skills/repo-bootstrap/assets/scoped/backend-go.md +107 -0
  170. package/skills/repo-bootstrap/assets/scoped/backend-php.md +94 -0
  171. package/skills/repo-bootstrap/assets/scoped/backend-python.md +84 -0
  172. package/skills/repo-bootstrap/assets/scoped/backend-typescript.md +89 -0
  173. package/skills/repo-bootstrap/assets/scoped/claude-code-skill.md +101 -0
  174. package/skills/repo-bootstrap/assets/scoped/cli.md +83 -0
  175. package/skills/repo-bootstrap/assets/scoped/concourse.md +196 -0
  176. package/skills/repo-bootstrap/assets/scoped/ddev.md +68 -0
  177. package/skills/repo-bootstrap/assets/scoped/docker.md +160 -0
  178. package/skills/repo-bootstrap/assets/scoped/documentation.md +98 -0
  179. package/skills/repo-bootstrap/assets/scoped/examples.md +96 -0
  180. package/skills/repo-bootstrap/assets/scoped/frontend-typescript.md +88 -0
  181. package/skills/repo-bootstrap/assets/scoped/github-actions.md +174 -0
  182. package/skills/repo-bootstrap/assets/scoped/gitlab-ci.md +174 -0
  183. package/skills/repo-bootstrap/assets/scoped/oro-bundle.md +209 -0
  184. package/skills/repo-bootstrap/assets/scoped/oro-project.md +170 -0
  185. package/skills/repo-bootstrap/assets/scoped/python-modern.md +170 -0
  186. package/skills/repo-bootstrap/assets/scoped/resources.md +96 -0
  187. package/skills/repo-bootstrap/assets/scoped/skill-repo.md +139 -0
  188. package/skills/repo-bootstrap/assets/scoped/symfony.md +168 -0
  189. package/skills/repo-bootstrap/assets/scoped/testing.md +87 -0
  190. package/skills/repo-bootstrap/assets/scoped/typo3-docs.md +103 -0
  191. package/skills/repo-bootstrap/assets/scoped/typo3-extension.md +133 -0
  192. package/skills/repo-bootstrap/assets/scoped/typo3-project.md +137 -0
  193. package/skills/repo-bootstrap/assets/scoped/typo3-testing.md +80 -0
  194. package/skills/repo-bootstrap/checkpoints.yaml +279 -0
  195. package/skills/repo-bootstrap/evals/evals.json +385 -0
  196. package/skills/repo-bootstrap/references/ai-contribution-guidelines.md +63 -0
  197. package/skills/repo-bootstrap/references/ai-tool-compatibility.md +223 -0
  198. package/skills/repo-bootstrap/references/directory-coverage.md +82 -0
  199. package/skills/repo-bootstrap/references/examples/coding-agent-cli/AGENTS.md +70 -0
  200. package/skills/repo-bootstrap/references/examples/coding-agent-cli/go.mod +3 -0
  201. package/skills/repo-bootstrap/references/examples/coding-agent-cli/scripts-AGENTS.md +389 -0
  202. package/skills/repo-bootstrap/references/examples/express-api-ts/.env.example +13 -0
  203. package/skills/repo-bootstrap/references/examples/express-api-ts/AGENTS.md +91 -0
  204. package/skills/repo-bootstrap/references/examples/express-api-ts/package.json +33 -0
  205. package/skills/repo-bootstrap/references/examples/express-api-ts/pnpm-lock.yaml +3 -0
  206. package/skills/repo-bootstrap/references/examples/express-api-ts/src/AGENTS.md +91 -0
  207. package/skills/repo-bootstrap/references/examples/express-api-ts/src/config.ts +28 -0
  208. package/skills/repo-bootstrap/references/examples/express-api-ts/src/controllers/userController.ts +74 -0
  209. package/skills/repo-bootstrap/references/examples/express-api-ts/src/index.ts +26 -0
  210. package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/errorHandler.ts +45 -0
  211. package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/requestLogger.ts +18 -0
  212. package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/health.ts +18 -0
  213. package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/users.ts +13 -0
  214. package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/errors.ts +40 -0
  215. package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/logger.ts +14 -0
  216. package/skills/repo-bootstrap/references/examples/express-api-ts/tsconfig.json +24 -0
  217. package/skills/repo-bootstrap/references/examples/fastapi-app/.env.example +19 -0
  218. package/skills/repo-bootstrap/references/examples/fastapi-app/AGENTS.md +92 -0
  219. package/skills/repo-bootstrap/references/examples/fastapi-app/pyproject.toml +88 -0
  220. package/skills/repo-bootstrap/references/examples/fastapi-app/src/AGENTS.md +85 -0
  221. package/skills/repo-bootstrap/references/examples/fastapi-app/src/__init__.py +3 -0
  222. package/skills/repo-bootstrap/references/examples/fastapi-app/src/config.py +49 -0
  223. package/skills/repo-bootstrap/references/examples/fastapi-app/src/main.py +66 -0
  224. package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/__init__.py +13 -0
  225. package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/item.py +43 -0
  226. package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/user.py +40 -0
  227. package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/__init__.py +5 -0
  228. package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/health.py +20 -0
  229. package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/items.py +61 -0
  230. package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/users.py +55 -0
  231. package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/__init__.py +6 -0
  232. package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/item_service.py +77 -0
  233. package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/user_service.py +69 -0
  234. package/skills/repo-bootstrap/references/examples/fastapi-app/uv.lock +4 -0
  235. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/.scopes +3 -0
  236. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/AGENTS.md +86 -0
  237. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/package.json +20 -0
  238. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/src/App.tsx +5 -0
  239. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/cmd/api/main.go +7 -0
  240. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/go.mod +2 -0
  241. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/main.go +7 -0
  242. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/.scopes +3 -0
  243. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/AGENTS.md +89 -0
  244. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/go.mod +2 -0
  245. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/AGENTS.md +90 -0
  246. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/package.json +17 -0
  247. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/App.tsx +1 -0
  248. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Button.tsx +1 -0
  249. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Footer.tsx +1 -0
  250. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Header.tsx +1 -0
  251. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Sidebar.tsx +1 -0
  252. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/main.go +7 -0
  253. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package-lock.json +0 -0
  254. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package.json +12 -0
  255. package/skills/repo-bootstrap/references/examples/ldap-selfservice/AGENTS.md +70 -0
  256. package/skills/repo-bootstrap/references/examples/ldap-selfservice/go.mod +3 -0
  257. package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-AGENTS.md +371 -0
  258. package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-web-AGENTS.md +448 -0
  259. package/skills/repo-bootstrap/references/examples/php-with-frontend/.scopes +3 -0
  260. package/skills/repo-bootstrap/references/examples/php-with-frontend/AGENTS.md +91 -0
  261. package/skills/repo-bootstrap/references/examples/php-with-frontend/composer.json +8 -0
  262. package/skills/repo-bootstrap/references/examples/php-with-frontend/package.json +15 -0
  263. package/skills/repo-bootstrap/references/examples/php-with-frontend/pnpm-lock.yaml +0 -0
  264. package/skills/repo-bootstrap/references/examples/php-with-frontend/src/Controller.php +3 -0
  265. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/AGENTS.md +92 -0
  266. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/package.json +26 -0
  267. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/App.tsx +3 -0
  268. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Button.tsx +10 -0
  269. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Footer.tsx +9 -0
  270. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Header.tsx +9 -0
  271. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/main.tsx +3 -0
  272. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/tsconfig.json +13 -0
  273. package/skills/repo-bootstrap/references/examples/pnpm-workspace/AGENTS.md +75 -0
  274. package/skills/repo-bootstrap/references/examples/pnpm-workspace/package.json +7 -0
  275. package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/package.json +11 -0
  276. package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/src/index.ts +11 -0
  277. package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-lock.yaml +42 -0
  278. package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-workspace.yaml +2 -0
  279. package/skills/repo-bootstrap/references/examples/simple-ldap-go/AGENTS.md +70 -0
  280. package/skills/repo-bootstrap/references/examples/simple-ldap-go/examples-AGENTS.md +45 -0
  281. package/skills/repo-bootstrap/references/examples/simple-ldap-go/go.mod +3 -0
  282. package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/AGENTS.md +70 -0
  283. package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/Classes-AGENTS.md +392 -0
  284. package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/composer.json +8 -0
  285. package/skills/repo-bootstrap/references/feedback-memory-schema.md +135 -0
  286. package/skills/repo-bootstrap/references/git-hooks-setup.md +79 -0
  287. package/skills/repo-bootstrap/references/output-structure.md +124 -0
  288. package/skills/repo-bootstrap/references/scripts-guide.md +175 -0
  289. package/skills/repo-bootstrap/references/verification-guide.md +137 -0
  290. package/skills/repo-bootstrap/scripts/analyze-git-history.sh +315 -0
  291. package/skills/repo-bootstrap/scripts/check-freshness.sh +230 -0
  292. package/skills/repo-bootstrap/scripts/detect-golden-samples.sh +161 -0
  293. package/skills/repo-bootstrap/scripts/detect-heuristics.sh +93 -0
  294. package/skills/repo-bootstrap/scripts/detect-project.sh +486 -0
  295. package/skills/repo-bootstrap/scripts/detect-scopes.sh +330 -0
  296. package/skills/repo-bootstrap/scripts/detect-utilities.sh +133 -0
  297. package/skills/repo-bootstrap/scripts/extract-adrs.sh +194 -0
  298. package/skills/repo-bootstrap/scripts/extract-agent-configs.sh +331 -0
  299. package/skills/repo-bootstrap/scripts/extract-architecture-rules.sh +522 -0
  300. package/skills/repo-bootstrap/scripts/extract-ci-commands.sh +385 -0
  301. package/skills/repo-bootstrap/scripts/extract-ci-rules.sh +384 -0
  302. package/skills/repo-bootstrap/scripts/extract-commands.sh +358 -0
  303. package/skills/repo-bootstrap/scripts/extract-documentation.sh +308 -0
  304. package/skills/repo-bootstrap/scripts/extract-github-rulesets.sh +96 -0
  305. package/skills/repo-bootstrap/scripts/extract-github-settings.sh +88 -0
  306. package/skills/repo-bootstrap/scripts/extract-ide-settings.sh +228 -0
  307. package/skills/repo-bootstrap/scripts/extract-platform-files.sh +290 -0
  308. package/skills/repo-bootstrap/scripts/extract-quality-configs.sh +442 -0
  309. package/skills/repo-bootstrap/scripts/generate-agents.sh +2424 -0
  310. package/skills/repo-bootstrap/scripts/generate-file-map.sh +153 -0
  311. package/skills/repo-bootstrap/scripts/lib/config-root.sh +211 -0
  312. package/skills/repo-bootstrap/scripts/lib/summary.sh +244 -0
  313. package/skills/repo-bootstrap/scripts/lib/template.sh +397 -0
  314. package/skills/repo-bootstrap/scripts/validate-structure.sh +324 -0
  315. package/skills/repo-bootstrap/scripts/verify-commands.sh +615 -0
  316. package/skills/repo-bootstrap/scripts/verify-content.sh +302 -0
  317. package/skills/schema-api-contracts/SKILL.md +56 -0
  318. package/skills/secret-hygiene/SKILL.md +511 -0
  319. package/skills/secret-hygiene/assets/.gitkeep +9 -0
  320. package/skills/secret-hygiene/assets/config-balanced.toml +81 -0
  321. package/skills/secret-hygiene/assets/config-custom.toml +178 -0
  322. package/skills/secret-hygiene/assets/config-strict.toml +48 -0
  323. package/skills/secret-hygiene/assets/github-action.yml +181 -0
  324. package/skills/secret-hygiene/assets/gitlab-ci.yml +257 -0
  325. package/skills/secret-hygiene/assets/precommit-config.yaml +70 -0
  326. package/skills/secret-hygiene/references/EXAMPLE.md +40 -0
  327. package/skills/secret-hygiene/references/compliance_mapping.md +538 -0
  328. package/skills/secret-hygiene/references/detection_rules.md +276 -0
  329. package/skills/secret-hygiene/references/false_positives.md +598 -0
  330. package/skills/secret-hygiene/references/remediation_guide.md +530 -0
  331. package/skills/stack-selector/SKILL.md +56 -0
  332. package/skills/telegram-control/SKILL.md +110 -0
  333. package/skills/telegram-control/references/architecture.md +184 -0
  334. package/skills/telegram-control/references/convex.md +173 -0
  335. package/skills/telegram-control/references/error_handling.md +212 -0
  336. package/skills/telegram-control/references/initial_setup.md +165 -0
  337. package/skills/telegram-control/references/telegram_api.md +156 -0
  338. package/skills/telegram-control/scripts/cancel_message.ts +53 -0
  339. package/skills/telegram-control/scripts/list_scheduled.ts +103 -0
  340. package/skills/telegram-control/scripts/logger.ts +121 -0
  341. package/skills/telegram-control/scripts/proxy-util.ts +11 -0
  342. package/skills/telegram-control/scripts/schedule_message.ts +216 -0
  343. package/skills/telegram-control/scripts/send_message.ts +115 -0
  344. package/skills/telegram-control/scripts/setup.ts +185 -0
  345. package/skills/telegram-control/scripts/types.ts +75 -0
  346. package/skills/telegram-control/scripts/view_history.ts +74 -0
  347. package/skills/test-strategy/SKILL.md +352 -0
  348. package/skills/threat-model/SKILL.md +303 -0
  349. package/skills/threat-model/examples/example-output.md +196 -0
  350. package/skills/threat-model/template.md +96 -0
  351. package/skills/ts-lint/SKILL.md +80 -0
  352. package/skills/ui-flow/SKILL.md +668 -0
  353. package/skills/voice-command-router/SKILL.md +51 -0
  354. package/skills/widget-live-activity-sync/SKILL.md +66 -0
@@ -0,0 +1,358 @@
1
+ #!/usr/bin/env bash
2
+ # Extract build commands from various build tool files
3
+ set -euo pipefail
4
+
5
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6
+ source "$SCRIPT_DIR/lib/config-root.sh"
7
+
8
+ PROJECT_DIR="${1:-.}"
9
+ cd "$PROJECT_DIR"
10
+
11
+ # Stack filter: node, php, go, python, or auto (default)
12
+ STACK_FILTER="${2:-auto}"
13
+
14
+ # Skip extraction functions based on stack
15
+ should_extract_node() {
16
+ [[ "$STACK_FILTER" == "auto" || "$STACK_FILTER" == "node" ]]
17
+ }
18
+
19
+ should_extract_php() {
20
+ [[ "$STACK_FILTER" == "auto" || "$STACK_FILTER" == "php" ]]
21
+ }
22
+
23
+ should_extract_go() {
24
+ [[ "$STACK_FILTER" == "auto" || "$STACK_FILTER" == "go" ]]
25
+ }
26
+
27
+ should_extract_python() {
28
+ [[ "$STACK_FILTER" == "auto" || "$STACK_FILTER" == "python" ]]
29
+ }
30
+
31
+ # Get project info (use . since we already cd'd to PROJECT_DIR)
32
+ PROJECT_INFO=$(bash "$SCRIPT_DIR/detect-project.sh" ".")
33
+ LANGUAGE=$(echo "$PROJECT_INFO" | jq -r '.language')
34
+ # shellcheck disable=SC2034 # BUILD_TOOL reserved for future build-tool-specific detection
35
+ BUILD_TOOL=$(echo "$PROJECT_INFO" | jq -r '.build_tool')
36
+
37
+ # Initialize command variables
38
+ INSTALL_CMD=""
39
+ TYPECHECK_CMD=""
40
+ LINT_CMD=""
41
+ FORMAT_CMD=""
42
+ TEST_CMD=""
43
+ TEST_SINGLE_CMD=""
44
+ BUILD_CMD=""
45
+ DEV_CMD=""
46
+
47
+ # Detect package manager for Node.js projects
48
+ # Workspace-aware: checks workspace root for lockfiles if in a monorepo
49
+ PACKAGE_MANAGER="npm"
50
+ detect_package_manager() {
51
+ # First, check if we're in a workspace - lockfile will be at workspace root
52
+ local workspace_root
53
+ workspace_root=$(find_node_workspace_root "$(pwd)" || true)
54
+ if [ -n "$workspace_root" ]; then
55
+ if [ -f "$workspace_root/pnpm-lock.yaml" ]; then
56
+ PACKAGE_MANAGER="pnpm"
57
+ return
58
+ elif [ -f "$workspace_root/yarn.lock" ]; then
59
+ PACKAGE_MANAGER="yarn"
60
+ return
61
+ elif [ -f "$workspace_root/bun.lockb" ]; then
62
+ PACKAGE_MANAGER="bun"
63
+ return
64
+ elif [ -f "$workspace_root/package-lock.json" ]; then
65
+ PACKAGE_MANAGER="npm"
66
+ return
67
+ fi
68
+ fi
69
+
70
+ # Fallback: check local directory
71
+ if [ -f "pnpm-lock.yaml" ]; then
72
+ PACKAGE_MANAGER="pnpm"
73
+ elif [ -f "yarn.lock" ]; then
74
+ PACKAGE_MANAGER="yarn"
75
+ elif [ -f "bun.lockb" ]; then
76
+ PACKAGE_MANAGER="bun"
77
+ elif [ -f "package.json" ]; then
78
+ # Check packageManager field
79
+ local pm_field
80
+ pm_field=$(jq -r '.packageManager // empty' package.json 2>/dev/null | cut -d@ -f1)
81
+ if [ -n "$pm_field" ]; then
82
+ PACKAGE_MANAGER="$pm_field"
83
+ fi
84
+ fi
85
+ }
86
+
87
+ # Get the run command for package manager
88
+ get_pm_run() {
89
+ case "$PACKAGE_MANAGER" in
90
+ pnpm) echo "pnpm" ;;
91
+ yarn) echo "yarn" ;;
92
+ bun) echo "bun run" ;;
93
+ *) echo "npm run" ;;
94
+ esac
95
+ }
96
+
97
+ # Get the npx-equivalent for package manager
98
+ get_pm_dlx() {
99
+ case "$PACKAGE_MANAGER" in
100
+ pnpm) echo "pnpm dlx" ;;
101
+ yarn) echo "yarn dlx" ;;
102
+ bun) echo "bunx" ;;
103
+ *) echo "npx" ;;
104
+ esac
105
+ }
106
+
107
+ # Extract from Makefile
108
+ extract_from_makefile() {
109
+ [ ! -f "Makefile" ] && return 0
110
+
111
+ # Extract targets with ## comments
112
+ while IFS= read -r line; do
113
+ if [[ $line =~ ^([a-zA-Z_-]+):.*\#\#(.*)$ ]]; then
114
+ target="${BASH_REMATCH[1]}"
115
+ # description captured but not yet used (for future enhanced output)
116
+ # description="${BASH_REMATCH[2]}"
117
+
118
+ case "$target" in
119
+ lint|check) LINT_CMD="make $target" ;;
120
+ format|fmt) FORMAT_CMD="make $target" ;;
121
+ test|tests) TEST_CMD="make $target" ;;
122
+ build) BUILD_CMD="make $target" ;;
123
+ typecheck|types) TYPECHECK_CMD="make $target" ;;
124
+ dev|serve) DEV_CMD="make $target" ;;
125
+ esac
126
+ fi
127
+ done < Makefile
128
+ }
129
+
130
+ # Extract from package.json
131
+ extract_from_package_json() {
132
+ [ ! -f "package.json" ] && return 0
133
+
134
+ # Detect package manager first
135
+ detect_package_manager
136
+
137
+ local pm_run pm_dlx
138
+ pm_run=$(get_pm_run)
139
+ pm_dlx=$(get_pm_dlx)
140
+
141
+ # Set install command based on package manager
142
+ INSTALL_CMD="$PACKAGE_MANAGER install"
143
+
144
+ local has_typecheck has_lint has_format has_test has_build has_dev
145
+ has_typecheck=$(jq -r '.scripts.typecheck // .scripts["type-check"] // empty' package.json 2>/dev/null)
146
+ has_lint=$(jq -r '.scripts.lint // empty' package.json 2>/dev/null)
147
+ has_format=$(jq -r '.scripts.format // empty' package.json 2>/dev/null)
148
+ has_test=$(jq -r '.scripts.test // empty' package.json 2>/dev/null)
149
+ has_build=$(jq -r '.scripts.build // empty' package.json 2>/dev/null)
150
+ has_dev=$(jq -r '.scripts.dev // .scripts.start // empty' package.json 2>/dev/null)
151
+
152
+ if [ -n "$has_typecheck" ]; then
153
+ TYPECHECK_CMD="$pm_run typecheck"
154
+ else
155
+ TYPECHECK_CMD="$pm_dlx tsc --noEmit"
156
+ fi
157
+
158
+ if [ -n "$has_lint" ]; then
159
+ LINT_CMD="$pm_run lint"
160
+ else
161
+ LINT_CMD="$pm_dlx eslint ."
162
+ fi
163
+
164
+ if [ -n "$has_format" ]; then
165
+ FORMAT_CMD="$pm_run format"
166
+ else
167
+ FORMAT_CMD="$pm_dlx prettier --write ."
168
+ fi
169
+
170
+ if [ -n "$has_test" ]; then
171
+ TEST_CMD="$PACKAGE_MANAGER test"
172
+ # Single file test command
173
+ if grep -q 'vitest' package.json 2>/dev/null; then
174
+ TEST_SINGLE_CMD="$pm_dlx vitest run"
175
+ elif grep -q 'jest' package.json 2>/dev/null; then
176
+ TEST_SINGLE_CMD="$pm_dlx jest"
177
+ else
178
+ TEST_SINGLE_CMD="$PACKAGE_MANAGER test --"
179
+ fi
180
+ fi
181
+
182
+ if [ -n "$has_build" ]; then
183
+ BUILD_CMD="$pm_run build"
184
+ fi
185
+
186
+ if [ -n "$has_dev" ]; then
187
+ DEV_CMD="$pm_run dev"
188
+ fi
189
+ }
190
+
191
+ # Extract from composer.json
192
+ extract_from_composer_json() {
193
+ [ ! -f "composer.json" ] && return 0
194
+
195
+ local has_lint has_format has_test has_phpstan
196
+ has_lint=$(jq -r '.scripts.lint // .scripts["cs:check"] // empty' composer.json 2>/dev/null)
197
+ has_format=$(jq -r '.scripts.format // .scripts["cs:fix"] // empty' composer.json 2>/dev/null)
198
+ has_test=$(jq -r '.scripts.test // empty' composer.json 2>/dev/null)
199
+ has_phpstan=$(jq -r '.scripts.phpstan // .scripts["stan"] // empty' composer.json 2>/dev/null)
200
+
201
+ if [ -n "$has_lint" ]; then
202
+ LINT_CMD="composer run lint"
203
+ fi
204
+
205
+ if [ -n "$has_format" ]; then
206
+ FORMAT_CMD="composer run format"
207
+ fi
208
+
209
+ if [ -n "$has_test" ]; then
210
+ TEST_CMD="composer run test"
211
+ else
212
+ TEST_CMD="vendor/bin/phpunit"
213
+ fi
214
+
215
+ if [ -n "$has_phpstan" ]; then
216
+ TYPECHECK_CMD="composer run phpstan"
217
+ elif [ -f "phpstan.neon" ] || [ -f "Build/phpstan.neon" ]; then
218
+ TYPECHECK_CMD="vendor/bin/phpstan analyze"
219
+ fi
220
+ }
221
+
222
+ # Extract from pyproject.toml
223
+ extract_from_pyproject() {
224
+ [ ! -f "pyproject.toml" ] && return 0
225
+
226
+ # Check for ruff
227
+ if grep -q '\[tool.ruff\]' pyproject.toml; then
228
+ LINT_CMD="ruff check ."
229
+ FORMAT_CMD="ruff format ."
230
+ fi
231
+
232
+ # Check for black
233
+ if grep -q 'black' pyproject.toml; then
234
+ FORMAT_CMD="black ."
235
+ fi
236
+
237
+ # Check for mypy
238
+ if grep -q 'mypy' pyproject.toml; then
239
+ TYPECHECK_CMD="mypy ."
240
+ fi
241
+
242
+ # Check for pytest
243
+ if grep -q 'pytest' pyproject.toml; then
244
+ TEST_CMD="pytest"
245
+ fi
246
+ }
247
+
248
+ # Language-specific defaults
249
+ set_language_defaults() {
250
+ case "$LANGUAGE" in
251
+ "go")
252
+ : "${INSTALL_CMD:=go mod download}"
253
+ : "${TYPECHECK_CMD:=go build -v ./...}"
254
+ if [ -z "$LINT_CMD" ]; then
255
+ if [ -f ".golangci.yml" ] || [ -f ".golangci.yaml" ]; then
256
+ LINT_CMD="golangci-lint run ./..."
257
+ fi
258
+ fi
259
+ : "${FORMAT_CMD:=gofmt -w .}"
260
+ : "${TEST_CMD:=go test -v -race -short ./...}"
261
+ : "${TEST_SINGLE_CMD:=go test -v -race}"
262
+ : "${BUILD_CMD:=go build -v ./...}"
263
+ ;;
264
+
265
+ "php")
266
+ : "${INSTALL_CMD:=composer install}"
267
+ if [ -z "$TYPECHECK_CMD" ]; then
268
+ if [ -f "phpstan.neon" ] || [ -f "Build/phpstan.neon" ]; then
269
+ TYPECHECK_CMD="vendor/bin/phpstan analyze"
270
+ fi
271
+ fi
272
+ : "${LINT_CMD:=vendor/bin/php-cs-fixer fix --dry-run}"
273
+ : "${FORMAT_CMD:=vendor/bin/php-cs-fixer fix}"
274
+ : "${TEST_CMD:=vendor/bin/phpunit}"
275
+ : "${TEST_SINGLE_CMD:=vendor/bin/phpunit}"
276
+ ;;
277
+
278
+ "typescript")
279
+ local pm_dlx
280
+ pm_dlx=$(get_pm_dlx)
281
+ : "${INSTALL_CMD:=$PACKAGE_MANAGER install}"
282
+ : "${TYPECHECK_CMD:=$pm_dlx tsc --noEmit}"
283
+ : "${LINT_CMD:=$pm_dlx eslint .}"
284
+ : "${FORMAT_CMD:=$pm_dlx prettier --write .}"
285
+ if [ -z "$TEST_CMD" ]; then
286
+ if [ -f "jest.config.js" ] || [ -f "jest.config.ts" ]; then
287
+ TEST_CMD="$PACKAGE_MANAGER test"
288
+ TEST_SINGLE_CMD="$pm_dlx jest"
289
+ elif grep -q 'vitest' package.json 2>/dev/null; then
290
+ TEST_CMD="$pm_dlx vitest run"
291
+ TEST_SINGLE_CMD="$pm_dlx vitest run"
292
+ fi
293
+ fi
294
+ ;;
295
+
296
+ "python")
297
+ if [ -f "pyproject.toml" ]; then
298
+ if grep -q '\[tool.poetry\]' pyproject.toml 2>/dev/null; then
299
+ INSTALL_CMD="poetry install"
300
+ elif grep -q '\[tool.uv\]' pyproject.toml 2>/dev/null; then
301
+ INSTALL_CMD="uv sync"
302
+ else
303
+ INSTALL_CMD="pip install -e ."
304
+ fi
305
+ else
306
+ INSTALL_CMD="pip install -r requirements.txt"
307
+ fi
308
+ : "${LINT_CMD:=ruff check .}"
309
+ : "${FORMAT_CMD:=ruff format .}"
310
+ : "${TYPECHECK_CMD:=mypy .}"
311
+ : "${TEST_CMD:=pytest}"
312
+ : "${TEST_SINGLE_CMD:=pytest}"
313
+ ;;
314
+ esac
315
+ }
316
+
317
+ # Run extraction (stack-filtered)
318
+ extract_from_makefile # Always extract Makefile (cross-stack)
319
+ should_extract_node && extract_from_package_json
320
+ should_extract_php && extract_from_composer_json
321
+ should_extract_python && extract_from_pyproject
322
+
323
+ # Only set language defaults if matching stack or auto
324
+ case "$STACK_FILTER" in
325
+ "auto") set_language_defaults ;;
326
+ "node") [[ "$LANGUAGE" == "typescript" || "$LANGUAGE" == "javascript" ]] && set_language_defaults ;;
327
+ "php") [[ "$LANGUAGE" == "php" ]] && set_language_defaults ;;
328
+ "go") [[ "$LANGUAGE" == "go" ]] && set_language_defaults ;;
329
+ "python") [[ "$LANGUAGE" == "python" ]] && set_language_defaults ;;
330
+ *)
331
+ echo "ERROR: Invalid STACK_FILTER value: $STACK_FILTER" >&2
332
+ echo "Valid options: auto, node, php, go, python" >&2
333
+ exit 1
334
+ ;;
335
+ esac
336
+
337
+ # Output JSON
338
+ jq -n \
339
+ --arg install "$INSTALL_CMD" \
340
+ --arg typecheck "$TYPECHECK_CMD" \
341
+ --arg lint "$LINT_CMD" \
342
+ --arg format "$FORMAT_CMD" \
343
+ --arg test "$TEST_CMD" \
344
+ --arg test_single "$TEST_SINGLE_CMD" \
345
+ --arg build "$BUILD_CMD" \
346
+ --arg dev "$DEV_CMD" \
347
+ --arg package_manager "$PACKAGE_MANAGER" \
348
+ '{
349
+ install: $install,
350
+ typecheck: $typecheck,
351
+ lint: $lint,
352
+ format: $format,
353
+ test: $test,
354
+ test_single: $test_single,
355
+ build: $build,
356
+ dev: $dev,
357
+ package_manager: $package_manager
358
+ }'
@@ -0,0 +1,308 @@
1
+ #!/usr/bin/env bash
2
+ # Extract information from documentation files (README, CONTRIBUTING, SECURITY, etc.)
3
+ set -euo pipefail
4
+
5
+ PROJECT_DIR="${1:-.}"
6
+ cd "$PROJECT_DIR"
7
+
8
+ # Initialize outputs
9
+ PROJECT_DESCRIPTION=""
10
+ ARCHITECTURE_SECTION=""
11
+ PR_PROCESS=""
12
+ SECURITY_POLICY=""
13
+ VULNERABILITY_REPORTING=""
14
+ CHANGELOG_FORMAT=""
15
+
16
+ # Helper to extract section from markdown
17
+ # Usage: extract_section "file" "heading" [max_lines]
18
+ extract_section() {
19
+ local file="$1"
20
+ local heading="$2"
21
+ local max_lines="${3:-20}"
22
+
23
+ if [ ! -f "$file" ]; then
24
+ echo ""
25
+ return
26
+ fi
27
+
28
+ # Find section and extract content until next heading
29
+ awk -v heading="$heading" -v max="$max_lines" '
30
+ BEGIN { found=0; count=0 }
31
+ /^##?#?[[:space:]]/ {
32
+ if (found) exit
33
+ if (tolower($0) ~ tolower(heading)) { found=1; next }
34
+ }
35
+ found && count < max { print; count++ }
36
+ ' "$file"
37
+ }
38
+
39
+ # Extract first paragraph after title (project description)
40
+ extract_description() {
41
+ local file="$1"
42
+
43
+ if [ ! -f "$file" ]; then
44
+ echo ""
45
+ return
46
+ fi
47
+
48
+ # Skip title and badges, get first paragraph
49
+ awk '
50
+ BEGIN { started=0; in_para=0 }
51
+ /^#[^#]/ { started=1; next }
52
+ started && /^\[!\[/ { next } # Skip badges
53
+ started && /^[![]/ { next } # Skip images
54
+ started && /^>/ { next } # Skip blockquotes initially
55
+ started && !in_para && /^[A-Za-z]/ { in_para=1 }
56
+ in_para && /^$/ { exit }
57
+ in_para { print }
58
+ ' "$file" | head -5
59
+ }
60
+
61
+ # Extract badges from README
62
+ extract_badges() {
63
+ local file="$1"
64
+ local badges=()
65
+
66
+ if [ ! -f "$file" ]; then
67
+ echo "[]"
68
+ return
69
+ fi
70
+
71
+ # Find badge patterns: [![text](url)](link) or ![text](url)
72
+ while IFS= read -r line; do
73
+ if [[ "$line" =~ \[!\[([^\]]+)\] ]]; then
74
+ badges+=("${BASH_REMATCH[1]}")
75
+ elif [[ "$line" =~ !\[([^\]]+)\] ]]; then
76
+ badges+=("${BASH_REMATCH[1]}")
77
+ fi
78
+ done < <(grep -E '^\[?!\[' "$file" 2>/dev/null || true)
79
+
80
+ if [ ${#badges[@]} -eq 0 ]; then
81
+ echo "[]"
82
+ else
83
+ printf '%s\n' "${badges[@]}" | jq -R . | jq -s .
84
+ fi
85
+ }
86
+
87
+ # Extract key rules from CONTRIBUTING.md
88
+ extract_contributing_rules() {
89
+ local file="$1"
90
+ local rules=()
91
+
92
+ if [ ! -f "$file" ]; then
93
+ echo "[]"
94
+ return
95
+ fi
96
+
97
+ # Extract bullet points from key sections
98
+ while IFS= read -r line; do
99
+ # Clean up the line
100
+ line=$(echo "$line" | sed 's/^[[:space:]]*[-*][[:space:]]*//' | sed 's/[[:space:]]*$//')
101
+ if [ -n "$line" ] && [ ${#line} -gt 10 ] && [ ${#line} -lt 200 ]; then
102
+ rules+=("$line")
103
+ fi
104
+ done < <(grep -E '^[[:space:]]*[-*][[:space:]]' "$file" 2>/dev/null | head -20 || true)
105
+
106
+ if [ ${#rules[@]} -eq 0 ]; then
107
+ echo "[]"
108
+ else
109
+ printf '%s\n' "${rules[@]}" | jq -R . | jq -s .
110
+ fi
111
+ }
112
+
113
+ # Check for PR process documentation
114
+ extract_pr_process() {
115
+ local file="$1"
116
+
117
+ if [ ! -f "$file" ]; then
118
+ echo ""
119
+ return
120
+ fi
121
+
122
+ # Look for PR-related sections
123
+ local section
124
+ section=$(extract_section "$file" "pull request" 15)
125
+ if [ -z "$section" ]; then
126
+ section=$(extract_section "$file" "submitting" 15)
127
+ fi
128
+ if [ -z "$section" ]; then
129
+ section=$(extract_section "$file" "how to contribute" 15)
130
+ fi
131
+
132
+ echo "$section" | head -10
133
+ }
134
+
135
+ # Extract security policy
136
+ extract_security_policy() {
137
+ local file="$1"
138
+
139
+ if [ ! -f "$file" ]; then
140
+ echo ""
141
+ return
142
+ fi
143
+
144
+ # Get main content
145
+ awk '
146
+ BEGIN { started=0 }
147
+ /^#/ { started=1; next }
148
+ started { print }
149
+ ' "$file" | head -20
150
+ }
151
+
152
+ # Detect changelog format
153
+ detect_changelog_format() {
154
+ local file="$1"
155
+
156
+ if [ ! -f "$file" ]; then
157
+ echo "none"
158
+ return
159
+ fi
160
+
161
+ # Check for Keep a Changelog format
162
+ if grep -qi "keep a changelog" "$file" 2>/dev/null; then
163
+ echo "keepachangelog"
164
+ return
165
+ fi
166
+
167
+ # Check for conventional changelog
168
+ if grep -qE '^\s*###?\s*(Added|Changed|Deprecated|Removed|Fixed|Security)' "$file" 2>/dev/null; then
169
+ echo "keepachangelog"
170
+ return
171
+ fi
172
+
173
+ # Check for date-based entries
174
+ if grep -qE '^\s*##\s*\[?[0-9]+\.[0-9]+' "$file" 2>/dev/null; then
175
+ echo "semver-sections"
176
+ return
177
+ fi
178
+
179
+ # Check for simple list format
180
+ if grep -qE '^[-*]\s+' "$file" 2>/dev/null; then
181
+ echo "simple-list"
182
+ return
183
+ fi
184
+
185
+ echo "custom"
186
+ }
187
+
188
+ # Main extraction
189
+
190
+ # README.md
191
+ if [ -f "README.md" ]; then
192
+ PROJECT_DESCRIPTION=$(extract_description "README.md")
193
+ BADGES_JSON=$(extract_badges "README.md")
194
+ ARCHITECTURE_SECTION=$(extract_section "README.md" "architecture" 30)
195
+ if [ -z "$ARCHITECTURE_SECTION" ]; then
196
+ ARCHITECTURE_SECTION=$(extract_section "README.md" "structure" 30)
197
+ fi
198
+ fi
199
+
200
+ # CONTRIBUTING.md (check multiple locations)
201
+ CONTRIBUTING_FILE=""
202
+ for f in CONTRIBUTING.md .github/CONTRIBUTING.md docs/CONTRIBUTING.md; do
203
+ if [ -f "$f" ]; then
204
+ CONTRIBUTING_FILE="$f"
205
+ break
206
+ fi
207
+ done
208
+
209
+ if [ -n "$CONTRIBUTING_FILE" ]; then
210
+ CONTRIBUTING_RULES_JSON=$(extract_contributing_rules "$CONTRIBUTING_FILE")
211
+ PR_PROCESS=$(extract_pr_process "$CONTRIBUTING_FILE")
212
+ CODE_STYLE_SECTION=$(extract_section "$CONTRIBUTING_FILE" "code style" 20)
213
+ if [ -z "$CODE_STYLE_SECTION" ]; then
214
+ CODE_STYLE_SECTION=$(extract_section "$CONTRIBUTING_FILE" "style guide" 20)
215
+ fi
216
+ else
217
+ CONTRIBUTING_RULES_JSON="[]"
218
+ CODE_STYLE_SECTION=""
219
+ fi
220
+
221
+ # SECURITY.md (check multiple locations)
222
+ SECURITY_FILE=""
223
+ for f in SECURITY.md .github/SECURITY.md docs/SECURITY.md; do
224
+ if [ -f "$f" ]; then
225
+ SECURITY_FILE="$f"
226
+ break
227
+ fi
228
+ done
229
+
230
+ if [ -n "$SECURITY_FILE" ]; then
231
+ SECURITY_POLICY=$(extract_security_policy "$SECURITY_FILE")
232
+ VULNERABILITY_REPORTING=$(extract_section "$SECURITY_FILE" "reporting" 15)
233
+ else
234
+ SECURITY_POLICY=""
235
+ VULNERABILITY_REPORTING=""
236
+ fi
237
+
238
+ # CHANGELOG.md
239
+ CHANGELOG_FILE=""
240
+ for f in CHANGELOG.md HISTORY.md CHANGES.md; do
241
+ if [ -f "$f" ]; then
242
+ CHANGELOG_FILE="$f"
243
+ break
244
+ fi
245
+ done
246
+
247
+ if [ -n "$CHANGELOG_FILE" ]; then
248
+ CHANGELOG_FORMAT=$(detect_changelog_format "$CHANGELOG_FILE")
249
+ else
250
+ CHANGELOG_FORMAT="none"
251
+ fi
252
+
253
+ # CODE_OF_CONDUCT.md
254
+ COC_FILE=""
255
+ for f in CODE_OF_CONDUCT.md .github/CODE_OF_CONDUCT.md; do
256
+ if [ -f "$f" ]; then
257
+ COC_FILE="$f"
258
+ break
259
+ fi
260
+ done
261
+
262
+ HAS_CODE_OF_CONDUCT=false
263
+ if [ -n "$COC_FILE" ]; then
264
+ HAS_CODE_OF_CONDUCT=true
265
+ fi
266
+
267
+ # Build JSON output
268
+ jq -n \
269
+ --arg desc "$PROJECT_DESCRIPTION" \
270
+ --argjson badges "${BADGES_JSON:-[]}" \
271
+ --arg arch "$ARCHITECTURE_SECTION" \
272
+ --arg contributing_file "$CONTRIBUTING_FILE" \
273
+ --argjson contributing_rules "${CONTRIBUTING_RULES_JSON:-[]}" \
274
+ --arg pr_process "$PR_PROCESS" \
275
+ --arg code_style "$CODE_STYLE_SECTION" \
276
+ --arg security_file "$SECURITY_FILE" \
277
+ --arg security_policy "$SECURITY_POLICY" \
278
+ --arg vuln_reporting "$VULNERABILITY_REPORTING" \
279
+ --arg changelog_file "$CHANGELOG_FILE" \
280
+ --arg changelog_format "$CHANGELOG_FORMAT" \
281
+ --argjson has_coc "$HAS_CODE_OF_CONDUCT" \
282
+ --arg coc_file "$COC_FILE" \
283
+ '{
284
+ readme: {
285
+ description: $desc,
286
+ badges: $badges,
287
+ architecture_section: $arch
288
+ },
289
+ contributing: {
290
+ file: $contributing_file,
291
+ rules: $contributing_rules,
292
+ pr_process: $pr_process,
293
+ code_style: $code_style
294
+ },
295
+ security: {
296
+ file: $security_file,
297
+ policy: $security_policy,
298
+ vulnerability_reporting: $vuln_reporting
299
+ },
300
+ changelog: {
301
+ file: $changelog_file,
302
+ format: $changelog_format
303
+ },
304
+ code_of_conduct: {
305
+ exists: $has_coc,
306
+ file: $coc_file
307
+ }
308
+ }'