@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,315 @@
1
+ #!/usr/bin/env bash
2
+ # Analyze git history for patterns (commit conventions, branching, releases)
3
+ set -euo pipefail
4
+
5
+ PROJECT_DIR="${1:-.}"
6
+ cd "$PROJECT_DIR"
7
+
8
+ # Check if we're in a git repository
9
+ if ! git rev-parse --git-dir > /dev/null 2>&1; then
10
+ echo '{"error": "Not a git repository"}'
11
+ exit 0
12
+ fi
13
+
14
+ SAMPLE_SIZE=100
15
+
16
+ # Helper to count grep matches (returns 0 if no matches instead of error)
17
+ count_matches() {
18
+ local pattern="$1"
19
+ local input="$2"
20
+ local flags="${3:-}"
21
+ local count
22
+ # shellcheck disable=SC2086 # flags must be unquoted to work as separate arguments
23
+ count=$(echo "$input" | grep $flags -cE "$pattern" 2>/dev/null) || count=0
24
+ echo "$count"
25
+ }
26
+
27
+ # Analyze commit message conventions
28
+ analyze_commit_convention() {
29
+ local commits
30
+ commits=$(git log --oneline -"$SAMPLE_SIZE" --pretty=format:"%s" 2>/dev/null || echo "")
31
+
32
+ if [ -z "$commits" ]; then
33
+ echo '{"convention": "unknown", "confidence": 0}'
34
+ return
35
+ fi
36
+
37
+ local total_commits
38
+ total_commits=$(echo "$commits" | wc -l)
39
+
40
+ # Count conventional commits (feat:, fix:, docs:, style:, refactor:, test:, chore:, etc.)
41
+ local conventional_count
42
+ conventional_count=$(count_matches '^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?(!)?:' "$commits")
43
+
44
+ # Count [TAG] style commits
45
+ local tag_count
46
+ tag_count=$(count_matches '^\[.+\]' "$commits")
47
+
48
+ # Count ticket reference commits (JIRA-123, #123, etc.)
49
+ local ticket_count
50
+ ticket_count=$(count_matches '([A-Z]+-[0-9]+|#[0-9]+)' "$commits" "-i")
51
+
52
+ # Count emoji commits
53
+ local emoji_count
54
+ emoji_count=$(count_matches '^(✨|🐛|📝|🎨|♻️|🚀|✅|🔧|⬆️|🔒)' "$commits")
55
+
56
+ # Determine convention
57
+ local convention="freeform"
58
+ local confidence=0
59
+
60
+ local conventional_pct=$((conventional_count * 100 / total_commits))
61
+ local tag_pct=$((tag_count * 100 / total_commits))
62
+ local ticket_pct=$((ticket_count * 100 / total_commits))
63
+ local emoji_pct=$((emoji_count * 100 / total_commits))
64
+
65
+ if [ "$conventional_pct" -ge 50 ]; then
66
+ convention="conventional-commits"
67
+ confidence=$conventional_pct
68
+ elif [ "$tag_pct" -ge 50 ]; then
69
+ convention="tag-prefix"
70
+ confidence=$tag_pct
71
+ elif [ "$emoji_pct" -ge 30 ]; then
72
+ convention="emoji"
73
+ confidence=$emoji_pct
74
+ elif [ "$ticket_pct" -ge 50 ]; then
75
+ convention="ticket-reference"
76
+ confidence=$ticket_pct
77
+ fi
78
+
79
+ # Extract common prefixes
80
+ local prefixes=()
81
+ if [ "$convention" = "conventional-commits" ]; then
82
+ mapfile -t prefixes < <(echo "$commits" | grep -oE '^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)' | sort | uniq -c | sort -rn | head -5 | awk '{print $2}')
83
+ elif [ "$convention" = "tag-prefix" ]; then
84
+ mapfile -t prefixes < <(echo "$commits" | grep -oE '^\[[^\]]+\]' | sort | uniq -c | sort -rn | head -5 | awk '{print $2}')
85
+ fi
86
+
87
+ local prefixes_json="[]"
88
+ [ ${#prefixes[@]} -gt 0 ] && prefixes_json=$(printf '%s\n' "${prefixes[@]}" | jq -R . | jq -s .)
89
+
90
+ jq -n \
91
+ --arg convention "$convention" \
92
+ --arg confidence "$confidence" \
93
+ --argjson prefixes "$prefixes_json" \
94
+ --arg total "$total_commits" \
95
+ --arg conventional "$conventional_count" \
96
+ --arg tag "$tag_count" \
97
+ --arg ticket "$ticket_count" \
98
+ '{
99
+ convention: $convention,
100
+ confidence: ($confidence | tonumber),
101
+ common_prefixes: $prefixes,
102
+ stats: {
103
+ total_analyzed: ($total | tonumber),
104
+ conventional_commits: ($conventional | tonumber),
105
+ tag_style: ($tag | tonumber),
106
+ ticket_references: ($ticket | tonumber)
107
+ }
108
+ }'
109
+ }
110
+
111
+ # Analyze branch naming
112
+ analyze_branch_naming() {
113
+ local branches
114
+ branches=$(git branch -r 2>/dev/null | grep -v HEAD | sed 's/.*\///' | head -50 || echo "")
115
+
116
+ if [ -z "$branches" ]; then
117
+ echo '{"pattern": "unknown", "stats": {"total_branches": 0}}'
118
+ return
119
+ fi
120
+
121
+ local total_branches
122
+ total_branches=$(echo "$branches" | grep -c . || echo "0")
123
+
124
+ if [ "$total_branches" -eq 0 ]; then
125
+ echo '{"pattern": "unknown", "stats": {"total_branches": 0}}'
126
+ return
127
+ fi
128
+
129
+ # Count different patterns
130
+ local feature_count
131
+ feature_count=$(count_matches '^feature[/-]' "$branches")
132
+
133
+ local fix_count
134
+ fix_count=$(count_matches '^(fix|bugfix|hotfix)[/-]' "$branches")
135
+
136
+ local release_count
137
+ release_count=$(count_matches '^release[/-]' "$branches")
138
+
139
+ local ticket_count
140
+ ticket_count=$(count_matches '[A-Z]+-[0-9]+' "$branches" "-i")
141
+
142
+ # Determine pattern
143
+ local pattern="freeform"
144
+ local has_feature="false"
145
+ local has_fix="false"
146
+
147
+ [[ "$feature_count" -gt 2 ]] && has_feature="true"
148
+ [[ "$fix_count" -gt 2 ]] && has_fix="true"
149
+
150
+ if [[ "$has_feature" == "true" ]] || [[ "$has_fix" == "true" ]]; then
151
+ pattern="gitflow-style"
152
+ fi
153
+ if [ "$total_branches" -gt 0 ] && [ "$ticket_count" -gt $((total_branches / 3)) ]; then
154
+ pattern="ticket-based"
155
+ fi
156
+
157
+ jq -n \
158
+ --arg pattern "$pattern" \
159
+ --argjson has_feature "$has_feature" \
160
+ --argjson has_fix "$has_fix" \
161
+ --arg total "$total_branches" \
162
+ --arg feature "$feature_count" \
163
+ --arg fix "$fix_count" \
164
+ --arg release "$release_count" \
165
+ '{
166
+ pattern: $pattern,
167
+ uses_feature_branches: $has_feature,
168
+ uses_fix_branches: $has_fix,
169
+ stats: {
170
+ total_branches: ($total | tonumber),
171
+ feature_branches: ($feature | tonumber),
172
+ fix_branches: ($fix | tonumber),
173
+ release_branches: ($release | tonumber)
174
+ }
175
+ }'
176
+ }
177
+
178
+ # Analyze merge strategy
179
+ analyze_merge_strategy() {
180
+ local merge_commits
181
+ merge_commits=$(git log --oneline -"$SAMPLE_SIZE" --merges 2>/dev/null | wc -l || echo "0")
182
+
183
+ local total_commits
184
+ total_commits=$(git log --oneline -"$SAMPLE_SIZE" 2>/dev/null | wc -l || echo "0")
185
+
186
+ if [ "$total_commits" -eq 0 ]; then
187
+ echo '{"strategy": "unknown"}'
188
+ return
189
+ fi
190
+
191
+ local merge_pct=$((merge_commits * 100 / total_commits))
192
+
193
+ local strategy="unknown"
194
+ if [ "$merge_pct" -lt 5 ]; then
195
+ strategy="squash-and-merge"
196
+ elif [ "$merge_pct" -gt 20 ]; then
197
+ strategy="merge-commits"
198
+ else
199
+ strategy="mixed"
200
+ fi
201
+
202
+ # Check for squash patterns in commit messages
203
+ local squash_patterns
204
+ squash_patterns=$(git log --oneline -"$SAMPLE_SIZE" 2>/dev/null | grep -cE '\(#[0-9]+\)$' || echo "0")
205
+
206
+ if [ "$squash_patterns" -gt $((total_commits / 3)) ]; then
207
+ strategy="squash-and-merge"
208
+ fi
209
+
210
+ jq -n \
211
+ --arg strategy "$strategy" \
212
+ --arg merge_pct "$merge_pct" \
213
+ --arg merge_commits "$merge_commits" \
214
+ --arg total "$total_commits" \
215
+ '{
216
+ strategy: $strategy,
217
+ merge_commit_percentage: ($merge_pct | tonumber),
218
+ stats: {
219
+ merge_commits: ($merge_commits | tonumber),
220
+ total_commits: ($total | tonumber)
221
+ }
222
+ }'
223
+ }
224
+
225
+ # Analyze release tagging
226
+ analyze_releases() {
227
+ local tags
228
+ tags=$(git tag -l 2>/dev/null | tail -20 || echo "")
229
+
230
+ if [ -z "$tags" ]; then
231
+ echo '{"pattern": "none", "total_tags": 0}'
232
+ return
233
+ fi
234
+
235
+ local total_tags
236
+ total_tags=$(echo "$tags" | wc -l)
237
+
238
+ # Check for semver pattern (v1.2.3 or 1.2.3)
239
+ local semver_count
240
+ semver_count=$(echo "$tags" | grep -cE '^v?[0-9]+\.[0-9]+\.[0-9]+' 2>/dev/null || echo "0")
241
+
242
+ # Check for calver pattern (2024.01.15 or similar)
243
+ local calver_count
244
+ calver_count=$(echo "$tags" | grep -cE '^[0-9]{4}\.[0-9]{2}' 2>/dev/null || echo "0")
245
+
246
+ local pattern="custom"
247
+ if [ "$semver_count" -gt $((total_tags / 2)) ]; then
248
+ pattern="semver"
249
+ elif [ "$calver_count" -gt $((total_tags / 2)) ]; then
250
+ pattern="calver"
251
+ fi
252
+
253
+ # Check for v prefix
254
+ local has_v_prefix
255
+ has_v_prefix=$([[ $(echo "$tags" | grep -cE '^v' || echo "0") -gt $((total_tags / 2)) ]] && echo "true" || echo "false")
256
+
257
+ # Get latest tag
258
+ local latest_tag
259
+ latest_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
260
+
261
+ jq -n \
262
+ --arg pattern "$pattern" \
263
+ --argjson has_v_prefix "$has_v_prefix" \
264
+ --arg latest "$latest_tag" \
265
+ --arg total "$total_tags" \
266
+ --arg semver "$semver_count" \
267
+ '{
268
+ pattern: $pattern,
269
+ uses_v_prefix: $has_v_prefix,
270
+ latest_tag: $latest,
271
+ stats: {
272
+ total_tags: ($total | tonumber),
273
+ semver_tags: ($semver | tonumber)
274
+ }
275
+ }'
276
+ }
277
+
278
+ # Analyze default branch
279
+ analyze_default_branch() {
280
+ local default_branch
281
+ default_branch=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "")
282
+
283
+ if [ -z "$default_branch" ]; then
284
+ # Try to detect from common names
285
+ if git show-ref --verify --quiet refs/heads/main 2>/dev/null; then
286
+ default_branch="main"
287
+ elif git show-ref --verify --quiet refs/heads/master 2>/dev/null; then
288
+ default_branch="master"
289
+ fi
290
+ fi
291
+
292
+ jq -n --arg branch "$default_branch" '{default_branch: $branch}'
293
+ }
294
+
295
+ # Run all analyses
296
+ COMMIT_CONVENTION=$(analyze_commit_convention)
297
+ BRANCH_NAMING=$(analyze_branch_naming)
298
+ MERGE_STRATEGY=$(analyze_merge_strategy)
299
+ RELEASES=$(analyze_releases)
300
+ DEFAULT_BRANCH=$(analyze_default_branch)
301
+
302
+ # Build final JSON output
303
+ jq -n \
304
+ --argjson commits "$COMMIT_CONVENTION" \
305
+ --argjson branches "$BRANCH_NAMING" \
306
+ --argjson merge "$MERGE_STRATEGY" \
307
+ --argjson releases "$RELEASES" \
308
+ --argjson default "$DEFAULT_BRANCH" \
309
+ '{
310
+ commit_convention: $commits,
311
+ branch_naming: $branches,
312
+ merge_strategy: $merge,
313
+ releases: $releases,
314
+ default_branch: $default.default_branch
315
+ }'
@@ -0,0 +1,230 @@
1
+ #!/usr/bin/env bash
2
+ # Check if AGENTS.md files are up to date with recent git commits
3
+ # Compares the "Last updated" date in each AGENTS.md with commits affecting that scope
4
+ set -euo pipefail
5
+
6
+ PROJECT_DIR="${1:-.}"
7
+ cd "$PROJECT_DIR"
8
+
9
+ # Options
10
+ VERBOSE=false
11
+ DAYS_THRESHOLD=7 # Warn if commits are older than this many days after last update (used below)
12
+
13
+ # Parse flags
14
+ while [[ $# -gt 0 ]]; do
15
+ case $1 in
16
+ --verbose|-v)
17
+ VERBOSE=true
18
+ shift
19
+ ;;
20
+ --threshold=*)
21
+ # shellcheck disable=SC2034 # Reserved for future threshold-based staleness check
22
+ DAYS_THRESHOLD="${1#*=}"
23
+ shift
24
+ ;;
25
+ --help|-h)
26
+ cat <<EOF
27
+ Usage: check-freshness.sh [PROJECT_DIR] [OPTIONS]
28
+
29
+ Check if AGENTS.md files are up to date with recent git commits.
30
+
31
+ Options:
32
+ --verbose, -v Show detailed output including commit lists
33
+ --threshold=DAYS Days after last update to consider stale (default: 7)
34
+ --help, -h Show this help message
35
+
36
+ Examples:
37
+ check-freshness.sh . # Check all AGENTS.md freshness
38
+ check-freshness.sh . --verbose # Show commit details
39
+ check-freshness.sh . --threshold=14 # Use 14-day threshold
40
+ EOF
41
+ exit 0
42
+ ;;
43
+ *)
44
+ PROJECT_DIR="$1"
45
+ shift
46
+ ;;
47
+ esac
48
+ done
49
+
50
+ # Ensure we're in a git repository
51
+ if ! git rev-parse --git-dir > /dev/null 2>&1; then
52
+ echo "Error: Not a git repository"
53
+ exit 1
54
+ fi
55
+
56
+ STALE_COUNT=0
57
+ FRESH_COUNT=0
58
+ UNKNOWN_COUNT=0
59
+
60
+ log() {
61
+ if [ "$VERBOSE" = true ]; then
62
+ echo "[INFO] $*" >&2
63
+ fi
64
+ }
65
+
66
+ # Extract the "Last updated" date from AGENTS.md header
67
+ # Format: <!-- Managed by agent: ... Last updated: YYYY-MM-DD -->
68
+ extract_last_updated() {
69
+ local file="$1"
70
+ local date_str
71
+
72
+ # Try to extract date from header comment
73
+ date_str=$(grep -o 'Last updated: [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}' "$file" 2>/dev/null | head -1 | sed 's/Last updated: //')
74
+
75
+ if [ -n "$date_str" ]; then
76
+ echo "$date_str"
77
+ return 0
78
+ fi
79
+
80
+ # Try alternative formats
81
+ # "Created: YYYY-MM-DD" or "Updated: YYYY-MM-DD"
82
+ date_str=$(grep -oE '(Created|Updated): [0-9]{4}-[0-9]{2}-[0-9]{2}' "$file" 2>/dev/null | head -1 | grep -oE '[0-9]{4}-[0-9]{2}-[0-9]{2}')
83
+
84
+ if [ -n "$date_str" ]; then
85
+ echo "$date_str"
86
+ return 0
87
+ fi
88
+
89
+ return 1
90
+ }
91
+
92
+ # Get the scope directory for an AGENTS.md file
93
+ # Root AGENTS.md covers the whole repo, scoped files cover their directory
94
+ get_scope_path() {
95
+ local agents_file="$1"
96
+ local dir
97
+
98
+ dir=$(dirname "$agents_file")
99
+
100
+ if [ "$dir" = "." ]; then
101
+ echo "." # Root covers everything
102
+ else
103
+ echo "$dir"
104
+ fi
105
+ }
106
+
107
+ # Count commits in a scope since a given date
108
+ count_commits_since() {
109
+ local scope_path="$1"
110
+ local since_date="$2"
111
+ local count
112
+
113
+ if [ "$scope_path" = "." ]; then
114
+ # Root: check all commits except AGENTS.md files themselves
115
+ count=$(git log --oneline --since="$since_date" -- . ':(exclude)**/AGENTS.md' 2>/dev/null | wc -l)
116
+ else
117
+ # Scoped: check commits in that directory
118
+ count=$(git log --oneline --since="$since_date" -- "$scope_path" ':(exclude)**/AGENTS.md' 2>/dev/null | wc -l)
119
+ fi
120
+
121
+ echo "$count"
122
+ }
123
+
124
+ # Get commit summary for a scope since a given date
125
+ get_commits_since() {
126
+ local scope_path="$1"
127
+ local since_date="$2"
128
+
129
+ if [ "$scope_path" = "." ]; then
130
+ git log --oneline --since="$since_date" -- . ':(exclude)**/AGENTS.md' 2>/dev/null | head -10
131
+ else
132
+ git log --oneline --since="$since_date" -- "$scope_path" ':(exclude)**/AGENTS.md' 2>/dev/null | head -10
133
+ fi
134
+ }
135
+
136
+ # Get files changed in a scope since a given date
137
+ get_changed_files_since() {
138
+ local scope_path="$1"
139
+ local since_date="$2"
140
+
141
+ if [ "$scope_path" = "." ]; then
142
+ git log --name-only --pretty=format: --since="$since_date" -- . ':(exclude)**/AGENTS.md' 2>/dev/null | sort -u | grep -v '^$' | head -20
143
+ else
144
+ git log --name-only --pretty=format: --since="$since_date" -- "$scope_path" ':(exclude)**/AGENTS.md' 2>/dev/null | sort -u | grep -v '^$' | head -20
145
+ fi
146
+ }
147
+
148
+ # Check freshness of a single AGENTS.md file
149
+ check_file_freshness() {
150
+ local agents_file="$1"
151
+ local rel_path="${agents_file#"$PROJECT_DIR"/}"
152
+ local last_updated
153
+ local scope_path
154
+ local commit_count
155
+
156
+ echo "Checking: $rel_path"
157
+
158
+ # Extract last updated date
159
+ if ! last_updated=$(extract_last_updated "$agents_file"); then
160
+ echo " ⚠️ No 'Last updated' date found in header"
161
+ ((UNKNOWN_COUNT++)) || true
162
+ return 1
163
+ fi
164
+
165
+ log " Last updated: $last_updated"
166
+
167
+ # Get scope path
168
+ scope_path=$(get_scope_path "$agents_file")
169
+ log " Scope: $scope_path"
170
+
171
+ # Count commits since last update
172
+ commit_count=$(count_commits_since "$scope_path" "$last_updated")
173
+
174
+ if [ "$commit_count" -eq 0 ]; then
175
+ echo " ✅ Up to date (no commits since $last_updated)"
176
+ ((FRESH_COUNT++)) || true
177
+ return 0
178
+ fi
179
+
180
+ # Check if commits are significant
181
+ echo " ⚠️ Potentially stale: $commit_count commit(s) since $last_updated"
182
+ ((STALE_COUNT++)) || true
183
+
184
+ if [ "$VERBOSE" = true ]; then
185
+ echo " Recent commits:"
186
+ get_commits_since "$scope_path" "$last_updated" | while read -r line; do
187
+ echo " - $line"
188
+ done
189
+
190
+ echo " Changed files:"
191
+ get_changed_files_since "$scope_path" "$last_updated" | while read -r line; do
192
+ echo " - $line"
193
+ done
194
+ fi
195
+
196
+ return 1
197
+ }
198
+
199
+ # Main
200
+ echo "Checking AGENTS.md freshness in: $PROJECT_DIR"
201
+ echo ""
202
+
203
+ # Find all AGENTS.md files
204
+ AGENTS_FILES=$(find "$PROJECT_DIR" -name "AGENTS.md" -type f 2>/dev/null | sort)
205
+
206
+ if [ -z "$AGENTS_FILES" ]; then
207
+ echo "No AGENTS.md files found"
208
+ exit 0
209
+ fi
210
+
211
+ # Check each file
212
+ while read -r file; do
213
+ check_file_freshness "$file"
214
+ echo ""
215
+ done <<< "$AGENTS_FILES"
216
+
217
+ # Summary
218
+ echo "=== Freshness Summary ==="
219
+ echo "✅ Up to date: $FRESH_COUNT"
220
+ echo "⚠️ Potentially stale: $STALE_COUNT"
221
+ [ "$UNKNOWN_COUNT" -gt 0 ] && echo "❓ Unknown (no date): $UNKNOWN_COUNT"
222
+
223
+ if [ "$STALE_COUNT" -gt 0 ]; then
224
+ echo ""
225
+ echo "Recommendation: Review the stale AGENTS.md files and update if needed."
226
+ echo "Use --verbose to see which commits and files have changed."
227
+ exit 1
228
+ fi
229
+
230
+ exit 0
@@ -0,0 +1,161 @@
1
+ #!/usr/bin/env bash
2
+ # Detect golden sample files (canonical patterns to follow)
3
+ set -euo pipefail
4
+
5
+ PROJECT_DIR="${1:-.}"
6
+ cd "$PROJECT_DIR"
7
+
8
+ # Check if git is available
9
+ if ! git rev-parse --git-dir > /dev/null 2>&1; then
10
+ echo ""
11
+ exit 0
12
+ fi
13
+
14
+ # Get project language
15
+ PROJECT_INFO=$(bash "$(dirname "$0")/detect-project.sh" "$PROJECT_DIR" 2>/dev/null || echo '{"language":"unknown"}')
16
+ LANGUAGE=$(echo "$PROJECT_INFO" | jq -r '.language')
17
+
18
+ # Find high-churn files (frequently modified = important)
19
+ get_high_churn_files() {
20
+ git log --name-only --pretty=format: --since="6 months ago" 2>/dev/null | \
21
+ grep -v '^$' | \
22
+ sort | uniq -c | sort -rn | head -20
23
+ }
24
+
25
+ # Find entrypoint files
26
+ find_entrypoints() {
27
+ case "$LANGUAGE" in
28
+ "go")
29
+ find . -name "main.go" -type f 2>/dev/null | head -5
30
+ ;;
31
+ "typescript")
32
+ for f in src/index.ts src/index.tsx src/main.ts src/main.tsx app/page.tsx pages/index.tsx; do
33
+ [ -f "$f" ] && echo "$f"
34
+ done
35
+ ;;
36
+ "php")
37
+ for f in public/index.php src/Kernel.php ext_localconf.php; do
38
+ [ -f "$f" ] && echo "$f"
39
+ done
40
+ ;;
41
+ "python")
42
+ for f in src/main.py main.py app/main.py __main__.py; do
43
+ [ -f "$f" ] && echo "$f"
44
+ done
45
+ ;;
46
+ esac
47
+ }
48
+
49
+ # Find component/model examples
50
+ find_examples() {
51
+ case "$LANGUAGE" in
52
+ "go")
53
+ # Find a service or handler file
54
+ find . -path ./vendor -prune -o -name "*_service.go" -type f -print 2>/dev/null | head -1
55
+ find . -path ./vendor -prune -o -name "*_handler.go" -type f -print 2>/dev/null | head -1
56
+ ;;
57
+ "typescript")
58
+ # Find a component
59
+ find . -path ./node_modules -prune -o -name "*.tsx" -type f -print 2>/dev/null | \
60
+ grep -E "(Button|Card|Modal|Form)" | head -1
61
+ # Find an API route
62
+ find . -path ./node_modules -prune -o -path "*/api/*" -name "*.ts" -type f -print 2>/dev/null | head -1
63
+ ;;
64
+ "php")
65
+ # Find a controller
66
+ find . -path ./vendor -prune -o -name "*Controller.php" -type f -print 2>/dev/null | head -1
67
+ # Find a service
68
+ find . -path ./vendor -prune -o -name "*Service.php" -type f -print 2>/dev/null | head -1
69
+ ;;
70
+ "python")
71
+ # Find a service or model
72
+ find . -path ./.venv -prune -o -name "*_service.py" -type f -print 2>/dev/null | head -1
73
+ find . -path ./.venv -prune -o -name "models.py" -type f -print 2>/dev/null | head -1
74
+ ;;
75
+ esac
76
+ }
77
+
78
+ # Find test examples
79
+ find_test_examples() {
80
+ case "$LANGUAGE" in
81
+ "go")
82
+ find . -path ./vendor -prune -o -name "*_test.go" -type f -print 2>/dev/null | head -1
83
+ ;;
84
+ "typescript")
85
+ find . -path ./node_modules -prune -o -name "*.test.ts" -o -name "*.test.tsx" -type f -print 2>/dev/null | head -1
86
+ ;;
87
+ "php")
88
+ find . -path ./vendor -prune -o -name "*Test.php" -type f -print 2>/dev/null | head -1
89
+ ;;
90
+ "python")
91
+ find . -path ./.venv -prune -o -name "test_*.py" -type f -print 2>/dev/null | head -1
92
+ ;;
93
+ esac
94
+ }
95
+
96
+ # Describe file based on name/path
97
+ describe_file() {
98
+ local file="$1"
99
+ case "$file" in
100
+ *main.go|*main.ts|*main.py|*/index.ts*) echo "Entrypoint" ;;
101
+ *Controller*) echo "Controller" ;;
102
+ *Service*|*_service*) echo "Service" ;;
103
+ *Handler*|*_handler*) echo "Handler" ;;
104
+ *Model*|*models*) echo "Model" ;;
105
+ *Test*|*_test*) echo "Test" ;;
106
+ *Button*|*Card*|*Modal*) echo "Component" ;;
107
+ */api/*) echo "API route" ;;
108
+ *) echo "Reference" ;;
109
+ esac
110
+ }
111
+
112
+ # Describe key patterns in file
113
+ describe_patterns() {
114
+ local file="$1"
115
+ local patterns=""
116
+
117
+ if [ -f "$file" ]; then
118
+ # Check for common patterns
119
+ grep -l "interface" "$file" > /dev/null 2>&1 && patterns="$patterns, interface"
120
+ grep -l "async" "$file" > /dev/null 2>&1 && patterns="$patterns, async"
121
+ grep -l "class" "$file" > /dev/null 2>&1 && patterns="$patterns, class"
122
+ grep -l "test\|describe\|it(" "$file" > /dev/null 2>&1 && patterns="$patterns, tests"
123
+ grep -l "func.*error" "$file" > /dev/null 2>&1 && patterns="$patterns, error handling"
124
+ fi
125
+
126
+ # Remove leading ", "
127
+ echo "${patterns#, }"
128
+ }
129
+
130
+ # Generate output in table row format
131
+ output=""
132
+
133
+ # Add entrypoints
134
+ while IFS= read -r file; do
135
+ [ -z "$file" ] && continue
136
+ file="${file#./}"
137
+ desc=$(describe_file "$file")
138
+ patterns=$(describe_patterns "$file")
139
+ [ -n "$patterns" ] && patterns=" ($patterns)"
140
+ output="$output| $desc | \`$file\` | ${patterns:-standard patterns} |\n"
141
+ done < <(find_entrypoints)
142
+
143
+ # Add examples
144
+ while IFS= read -r file; do
145
+ [ -z "$file" ] && continue
146
+ file="${file#./}"
147
+ desc=$(describe_file "$file")
148
+ patterns=$(describe_patterns "$file")
149
+ [ -n "$patterns" ] && patterns=" ($patterns)"
150
+ output="$output| $desc | \`$file\` | ${patterns:-standard patterns} |\n"
151
+ done < <(find_examples)
152
+
153
+ # Add test example
154
+ while IFS= read -r file; do
155
+ [ -z "$file" ] && continue
156
+ file="${file#./}"
157
+ output="$output| Test | \`$file\` | test structure |\n"
158
+ done < <(find_test_examples)
159
+
160
+ # Output (remove empty lines, duplicates)
161
+ echo -e "$output" | sed '/^$/d' | sort -u | head -10