@synapta/skills 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -4
- package/package.json +3 -4
- package/skills/ATTRIBUTION.md +80 -0
- package/skills/accessibility-audit/SKILL.md +325 -0
- package/skills/accessibility-audit/reference/wcag-checklist.md +103 -0
- package/skills/apns-notifier/SKILL.md +86 -0
- package/skills/approval-policy-enforcer/SKILL.md +66 -0
- package/skills/apps-sdk-builder/LICENSE.txt +201 -0
- package/skills/apps-sdk-builder/SKILL.md +328 -0
- package/skills/apps-sdk-builder/agents/openai.yaml +13 -0
- package/skills/apps-sdk-builder/references/app-archetypes.md +132 -0
- package/skills/apps-sdk-builder/references/apps-sdk-docs-workflow.md +135 -0
- package/skills/apps-sdk-builder/references/interactive-state-sync-patterns.md +113 -0
- package/skills/apps-sdk-builder/references/repo-contract-and-validation.md +93 -0
- package/skills/apps-sdk-builder/references/search-fetch-standard.md +67 -0
- package/skills/apps-sdk-builder/references/upstream-example-workflow.md +79 -0
- package/skills/apps-sdk-builder/references/window-openai-patterns.md +79 -0
- package/skills/apps-sdk-builder/scripts/scaffold_node_ext_apps.mjs +606 -0
- package/skills/architecture-selector/SKILL.md +64 -0
- package/skills/backlog-planner/SKILL.md +68 -0
- package/skills/carplay-entitlement-checker/SKILL.md +82 -0
- package/skills/concept-deepener/SKILL.md +86 -0
- package/skills/concept-discovery/SKILL.md +517 -0
- package/skills/concept-discovery/assets/sample-analysis.json +81 -0
- package/skills/concept-discovery/expected_outputs/sample-enum-dictionary.md +25 -0
- package/skills/concept-discovery/expected_outputs/sample-page-user-list.md +83 -0
- package/skills/concept-discovery/expected_outputs/sample-prd-readme.md +43 -0
- package/skills/concept-discovery/references/framework-patterns.md +228 -0
- package/skills/concept-discovery/references/prd-quality-checklist.md +65 -0
- package/skills/concept-discovery/scripts/codebase_analyzer.py +732 -0
- package/skills/concept-discovery/scripts/prd_scaffolder.py +435 -0
- package/skills/dast-zap/SKILL.md +453 -0
- package/skills/dast-zap/assets/.gitkeep +9 -0
- package/skills/dast-zap/assets/github_action.yml +207 -0
- package/skills/dast-zap/assets/gitlab_ci.yml +226 -0
- package/skills/dast-zap/assets/zap_automation.yaml +196 -0
- package/skills/dast-zap/assets/zap_context.xml +192 -0
- package/skills/dast-zap/references/EXAMPLE.md +40 -0
- package/skills/dast-zap/references/api_testing_guide.md +475 -0
- package/skills/dast-zap/references/authentication_guide.md +431 -0
- package/skills/dast-zap/references/false_positive_handling.md +427 -0
- package/skills/dast-zap/references/owasp_mapping.md +255 -0
- package/skills/dep-sbom-scan/SKILL.md +466 -0
- package/skills/deploy-cloudflare/SKILL.md +930 -0
- package/skills/deploy-docker/SKILL.md +55 -0
- package/skills/deploy-fly/SKILL.md +228 -0
- package/skills/deploy-k8s/SKILL.md +108 -0
- package/skills/deploy-k8s/assets/logo.png +0 -0
- package/skills/deploy-k8s/docs/README.md +29 -0
- package/skills/deploy-k8s/docs/SUMMARY.md +56 -0
- package/skills/deploy-k8s/docs/advanced/token-efficiency.md +61 -0
- package/skills/deploy-k8s/docs/architecture/multi-tenancy.md +96 -0
- package/skills/deploy-k8s/docs/architecture/storage-and-state.md +102 -0
- package/skills/deploy-k8s/docs/architecture/workload-patterns.md +87 -0
- package/skills/deploy-k8s/docs/book.json +16 -0
- package/skills/deploy-k8s/docs/community/changelog.md +34 -0
- package/skills/deploy-k8s/docs/community/contributing.md +67 -0
- package/skills/deploy-k8s/docs/core-concepts/failure-modes.md +153 -0
- package/skills/deploy-k8s/docs/core-concepts/philosophy.md +83 -0
- package/skills/deploy-k8s/docs/core-concepts/workflow.md +124 -0
- package/skills/deploy-k8s/docs/examples/bad-patterns.md +47 -0
- package/skills/deploy-k8s/docs/examples/do-dont-checklist.md +37 -0
- package/skills/deploy-k8s/docs/examples/good-patterns.md +49 -0
- package/skills/deploy-k8s/docs/failure-modes/api-drift.md +104 -0
- package/skills/deploy-k8s/docs/failure-modes/fragile-rollouts.md +99 -0
- package/skills/deploy-k8s/docs/failure-modes/insecure-workload-defaults.md +80 -0
- package/skills/deploy-k8s/docs/failure-modes/network-exposure.md +98 -0
- package/skills/deploy-k8s/docs/failure-modes/privilege-sprawl.md +91 -0
- package/skills/deploy-k8s/docs/failure-modes/resource-starvation.md +85 -0
- package/skills/deploy-k8s/docs/getting-started/installation.md +152 -0
- package/skills/deploy-k8s/docs/getting-started/quick-start.md +115 -0
- package/skills/deploy-k8s/docs/guides/helm-patterns.md +71 -0
- package/skills/deploy-k8s/docs/guides/kustomize-patterns.md +65 -0
- package/skills/deploy-k8s/docs/guides/observability.md +67 -0
- package/skills/deploy-k8s/docs/guides/security-hardening.md +59 -0
- package/skills/deploy-k8s/docs/guides/validation-and-policy.md +66 -0
- package/skills/deploy-k8s/docs/integrations/mcp-integration.md +52 -0
- package/skills/deploy-k8s/docs/package-lock.json +2892 -0
- package/skills/deploy-k8s/docs/package.json +13 -0
- package/skills/deploy-k8s/references/api-drift.md +298 -0
- package/skills/deploy-k8s/references/conditional/aks-patterns.md +70 -0
- package/skills/deploy-k8s/references/conditional/eks-patterns.md +79 -0
- package/skills/deploy-k8s/references/conditional/gitops-controllers.md +71 -0
- package/skills/deploy-k8s/references/conditional/gke-patterns.md +74 -0
- package/skills/deploy-k8s/references/conditional/observability-stacks.md +80 -0
- package/skills/deploy-k8s/references/conditional/openshift-patterns.md +67 -0
- package/skills/deploy-k8s/references/daemonset-operator-patterns.md +155 -0
- package/skills/deploy-k8s/references/deployment-patterns.md +146 -0
- package/skills/deploy-k8s/references/do-dont-patterns.md +87 -0
- package/skills/deploy-k8s/references/examples-bad.md +282 -0
- package/skills/deploy-k8s/references/examples-good.md +440 -0
- package/skills/deploy-k8s/references/fragile-rollouts.md +303 -0
- package/skills/deploy-k8s/references/helm-patterns.md +203 -0
- package/skills/deploy-k8s/references/insecure-workload-defaults.md +300 -0
- package/skills/deploy-k8s/references/job-patterns.md +120 -0
- package/skills/deploy-k8s/references/kustomize-patterns.md +239 -0
- package/skills/deploy-k8s/references/multi-tenancy.md +343 -0
- package/skills/deploy-k8s/references/network-exposure.md +481 -0
- package/skills/deploy-k8s/references/observability.md +302 -0
- package/skills/deploy-k8s/references/privilege-sprawl.md +273 -0
- package/skills/deploy-k8s/references/resource-starvation.md +374 -0
- package/skills/deploy-k8s/references/security-hardening.md +209 -0
- package/skills/deploy-k8s/references/stateful-patterns.md +130 -0
- package/skills/deploy-k8s/references/storage-and-state.md +330 -0
- package/skills/deploy-k8s/references/validation-and-policy.md +242 -0
- package/skills/deploy-railway/SKILL.md +235 -0
- package/skills/deploy-railway/references/analyze-db-mongo.md +84 -0
- package/skills/deploy-railway/references/analyze-db-mysql.md +254 -0
- package/skills/deploy-railway/references/analyze-db-postgres.md +479 -0
- package/skills/deploy-railway/references/analyze-db-redis.md +208 -0
- package/skills/deploy-railway/references/analyze-db.md +344 -0
- package/skills/deploy-railway/references/configure.md +309 -0
- package/skills/deploy-railway/references/deploy.md +195 -0
- package/skills/deploy-railway/references/operate.md +214 -0
- package/skills/deploy-railway/references/request.md +248 -0
- package/skills/deploy-railway/references/setup.md +312 -0
- package/skills/deploy-railway/scripts/analyze-mongo.py +1549 -0
- package/skills/deploy-railway/scripts/analyze-mysql.py +1195 -0
- package/skills/deploy-railway/scripts/analyze-postgres.py +3058 -0
- package/skills/deploy-railway/scripts/analyze-redis.py +1090 -0
- package/skills/deploy-railway/scripts/dal.py +671 -0
- package/skills/deploy-railway/scripts/enable-pg-stats.py +170 -0
- package/skills/deploy-railway/scripts/pg-extensions.py +370 -0
- package/skills/deploy-railway/scripts/railway-api.sh +52 -0
- package/skills/deploy-ssh/SKILL.md +91 -0
- package/skills/deploy-vercel/SKILL.md +304 -0
- package/skills/deploy-vercel/resources/deploy-codex.sh +301 -0
- package/skills/deploy-vercel/resources/deploy.sh +301 -0
- package/skills/docs-runbooks/SKILL.md +399 -0
- package/skills/drive-status-renderer/SKILL.md +62 -0
- package/skills/iac-scan/SKILL.md +680 -0
- package/skills/iac-scan/assets/.gitkeep +9 -0
- package/skills/iac-scan/assets/checkov_config.yaml +94 -0
- package/skills/iac-scan/assets/github_actions.yml +199 -0
- package/skills/iac-scan/assets/gitlab_ci.yml +218 -0
- package/skills/iac-scan/assets/pre_commit_config.yaml +92 -0
- package/skills/iac-scan/references/EXAMPLE.md +40 -0
- package/skills/iac-scan/references/compliance_mapping.md +237 -0
- package/skills/iac-scan/references/custom_policies.md +460 -0
- package/skills/iac-scan/references/suppression_guide.md +431 -0
- package/skills/incident-briefing/SKILL.md +66 -0
- package/skills/incident-triage/SKILL.md +481 -0
- package/{LICENSE → skills/mcp-builder/LICENSE.txt} +15 -14
- package/skills/mcp-builder/SKILL.md +244 -0
- package/skills/mcp-builder/reference/evaluation.md +602 -0
- package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/skills/mcp-builder/scripts/connections.py +151 -0
- package/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/skills/mobile-pairing/SKILL.md +52 -0
- package/skills/ops-sre/SKILL.md +297 -0
- package/skills/playwright-qa/LICENSE.txt +201 -0
- package/skills/playwright-qa/NOTICE.txt +14 -0
- package/skills/playwright-qa/SKILL.md +156 -0
- package/skills/playwright-qa/agents/openai.yaml +6 -0
- package/skills/playwright-qa/assets/playwright-small.svg +3 -0
- package/skills/playwright-qa/assets/playwright.png +0 -0
- package/skills/playwright-qa/references/cli.md +116 -0
- package/skills/playwright-qa/references/workflows.md +95 -0
- package/skills/playwright-qa/scripts/playwright_cli.sh +25 -0
- package/skills/release-publish/SKILL.md +85 -0
- package/skills/repo-bootstrap/SKILL.md +92 -0
- package/skills/repo-bootstrap/assets/example-workflows/validate-agents.yml +89 -0
- package/skills/repo-bootstrap/assets/root-thin.md +141 -0
- package/skills/repo-bootstrap/assets/root-verbose.md +149 -0
- package/skills/repo-bootstrap/assets/scoped/backend-go.md +107 -0
- package/skills/repo-bootstrap/assets/scoped/backend-php.md +94 -0
- package/skills/repo-bootstrap/assets/scoped/backend-python.md +84 -0
- package/skills/repo-bootstrap/assets/scoped/backend-typescript.md +89 -0
- package/skills/repo-bootstrap/assets/scoped/claude-code-skill.md +101 -0
- package/skills/repo-bootstrap/assets/scoped/cli.md +83 -0
- package/skills/repo-bootstrap/assets/scoped/concourse.md +196 -0
- package/skills/repo-bootstrap/assets/scoped/ddev.md +68 -0
- package/skills/repo-bootstrap/assets/scoped/docker.md +160 -0
- package/skills/repo-bootstrap/assets/scoped/documentation.md +98 -0
- package/skills/repo-bootstrap/assets/scoped/examples.md +96 -0
- package/skills/repo-bootstrap/assets/scoped/frontend-typescript.md +88 -0
- package/skills/repo-bootstrap/assets/scoped/github-actions.md +174 -0
- package/skills/repo-bootstrap/assets/scoped/gitlab-ci.md +174 -0
- package/skills/repo-bootstrap/assets/scoped/oro-bundle.md +209 -0
- package/skills/repo-bootstrap/assets/scoped/oro-project.md +170 -0
- package/skills/repo-bootstrap/assets/scoped/python-modern.md +170 -0
- package/skills/repo-bootstrap/assets/scoped/resources.md +96 -0
- package/skills/repo-bootstrap/assets/scoped/skill-repo.md +139 -0
- package/skills/repo-bootstrap/assets/scoped/symfony.md +168 -0
- package/skills/repo-bootstrap/assets/scoped/testing.md +87 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-docs.md +103 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-extension.md +133 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-project.md +137 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-testing.md +80 -0
- package/skills/repo-bootstrap/checkpoints.yaml +279 -0
- package/skills/repo-bootstrap/evals/evals.json +385 -0
- package/skills/repo-bootstrap/references/ai-contribution-guidelines.md +63 -0
- package/skills/repo-bootstrap/references/ai-tool-compatibility.md +223 -0
- package/skills/repo-bootstrap/references/directory-coverage.md +82 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/scripts-AGENTS.md +389 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/.env.example +13 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/package.json +33 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/pnpm-lock.yaml +3 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/config.ts +28 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/controllers/userController.ts +74 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/index.ts +26 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/errorHandler.ts +45 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/requestLogger.ts +18 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/health.ts +18 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/users.ts +13 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/errors.ts +40 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/logger.ts +14 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/tsconfig.json +24 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/.env.example +19 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/AGENTS.md +92 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/pyproject.toml +88 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/AGENTS.md +85 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/__init__.py +3 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/config.py +49 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/main.py +66 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/__init__.py +13 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/item.py +43 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/user.py +40 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/__init__.py +5 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/health.py +20 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/items.py +61 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/users.py +55 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/__init__.py +6 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/item_service.py +77 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/user_service.py +69 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/uv.lock +4 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/AGENTS.md +86 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/package.json +20 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/src/App.tsx +5 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/cmd/api/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/go.mod +2 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/AGENTS.md +89 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/go.mod +2 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/AGENTS.md +90 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/package.json +17 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/App.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Button.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Footer.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Header.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Sidebar.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package-lock.json +0 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package.json +12 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-AGENTS.md +371 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-web-AGENTS.md +448 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/composer.json +8 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/package.json +15 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/pnpm-lock.yaml +0 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/src/Controller.php +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/AGENTS.md +92 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/package.json +26 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/App.tsx +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Button.tsx +10 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Footer.tsx +9 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Header.tsx +9 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/main.tsx +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/tsconfig.json +13 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/AGENTS.md +75 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/package.json +7 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/package.json +11 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/src/index.ts +11 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-lock.yaml +42 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-workspace.yaml +2 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/examples-AGENTS.md +45 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/Classes-AGENTS.md +392 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/composer.json +8 -0
- package/skills/repo-bootstrap/references/feedback-memory-schema.md +135 -0
- package/skills/repo-bootstrap/references/git-hooks-setup.md +79 -0
- package/skills/repo-bootstrap/references/output-structure.md +124 -0
- package/skills/repo-bootstrap/references/scripts-guide.md +175 -0
- package/skills/repo-bootstrap/references/verification-guide.md +137 -0
- package/skills/repo-bootstrap/scripts/analyze-git-history.sh +315 -0
- package/skills/repo-bootstrap/scripts/check-freshness.sh +230 -0
- package/skills/repo-bootstrap/scripts/detect-golden-samples.sh +161 -0
- package/skills/repo-bootstrap/scripts/detect-heuristics.sh +93 -0
- package/skills/repo-bootstrap/scripts/detect-project.sh +486 -0
- package/skills/repo-bootstrap/scripts/detect-scopes.sh +330 -0
- package/skills/repo-bootstrap/scripts/detect-utilities.sh +133 -0
- package/skills/repo-bootstrap/scripts/extract-adrs.sh +194 -0
- package/skills/repo-bootstrap/scripts/extract-agent-configs.sh +331 -0
- package/skills/repo-bootstrap/scripts/extract-architecture-rules.sh +522 -0
- package/skills/repo-bootstrap/scripts/extract-ci-commands.sh +385 -0
- package/skills/repo-bootstrap/scripts/extract-ci-rules.sh +384 -0
- package/skills/repo-bootstrap/scripts/extract-commands.sh +358 -0
- package/skills/repo-bootstrap/scripts/extract-documentation.sh +308 -0
- package/skills/repo-bootstrap/scripts/extract-github-rulesets.sh +96 -0
- package/skills/repo-bootstrap/scripts/extract-github-settings.sh +88 -0
- package/skills/repo-bootstrap/scripts/extract-ide-settings.sh +228 -0
- package/skills/repo-bootstrap/scripts/extract-platform-files.sh +290 -0
- package/skills/repo-bootstrap/scripts/extract-quality-configs.sh +442 -0
- package/skills/repo-bootstrap/scripts/generate-agents.sh +2424 -0
- package/skills/repo-bootstrap/scripts/generate-file-map.sh +153 -0
- package/skills/repo-bootstrap/scripts/lib/config-root.sh +211 -0
- package/skills/repo-bootstrap/scripts/lib/summary.sh +244 -0
- package/skills/repo-bootstrap/scripts/lib/template.sh +397 -0
- package/skills/repo-bootstrap/scripts/validate-structure.sh +324 -0
- package/skills/repo-bootstrap/scripts/verify-commands.sh +615 -0
- package/skills/repo-bootstrap/scripts/verify-content.sh +302 -0
- package/skills/schema-api-contracts/SKILL.md +56 -0
- package/skills/secret-hygiene/SKILL.md +511 -0
- package/skills/secret-hygiene/assets/.gitkeep +9 -0
- package/skills/secret-hygiene/assets/config-balanced.toml +81 -0
- package/skills/secret-hygiene/assets/config-custom.toml +178 -0
- package/skills/secret-hygiene/assets/config-strict.toml +48 -0
- package/skills/secret-hygiene/assets/github-action.yml +181 -0
- package/skills/secret-hygiene/assets/gitlab-ci.yml +257 -0
- package/skills/secret-hygiene/assets/precommit-config.yaml +70 -0
- package/skills/secret-hygiene/references/EXAMPLE.md +40 -0
- package/skills/secret-hygiene/references/compliance_mapping.md +538 -0
- package/skills/secret-hygiene/references/detection_rules.md +276 -0
- package/skills/secret-hygiene/references/false_positives.md +598 -0
- package/skills/secret-hygiene/references/remediation_guide.md +530 -0
- package/skills/stack-selector/SKILL.md +56 -0
- package/skills/telegram-control/SKILL.md +110 -0
- package/skills/telegram-control/references/architecture.md +184 -0
- package/skills/telegram-control/references/convex.md +173 -0
- package/skills/telegram-control/references/error_handling.md +212 -0
- package/skills/telegram-control/references/initial_setup.md +165 -0
- package/skills/telegram-control/references/telegram_api.md +156 -0
- package/skills/telegram-control/scripts/cancel_message.ts +53 -0
- package/skills/telegram-control/scripts/list_scheduled.ts +103 -0
- package/skills/telegram-control/scripts/logger.ts +121 -0
- package/skills/telegram-control/scripts/proxy-util.ts +11 -0
- package/skills/telegram-control/scripts/schedule_message.ts +216 -0
- package/skills/telegram-control/scripts/send_message.ts +115 -0
- package/skills/telegram-control/scripts/setup.ts +185 -0
- package/skills/telegram-control/scripts/types.ts +75 -0
- package/skills/telegram-control/scripts/view_history.ts +74 -0
- package/skills/test-strategy/SKILL.md +352 -0
- package/skills/threat-model/SKILL.md +303 -0
- package/skills/threat-model/examples/example-output.md +196 -0
- package/skills/threat-model/template.md +96 -0
- package/skills/ts-lint/SKILL.md +80 -0
- package/skills/ui-flow/SKILL.md +668 -0
- package/skills/voice-command-router/SKILL.md +51 -0
- package/skills/widget-live-activity-sync/SKILL.md +66 -0
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
# Classes/AGENTS.md
|
|
2
|
+
|
|
3
|
+
<!-- Managed by agent: keep sections & order; edit content, not structure. Last updated: 2025-10-15 -->
|
|
4
|
+
|
|
5
|
+
**Scope:** PHP backend components (Controllers, EventListeners, DataHandling, Utils)
|
|
6
|
+
**Parent:** [../AGENTS.md](../AGENTS.md)
|
|
7
|
+
|
|
8
|
+
## 📋 Overview
|
|
9
|
+
|
|
10
|
+
PHP backend implementation for TYPO3 CKEditor Image extension. Components:
|
|
11
|
+
|
|
12
|
+
### Controllers
|
|
13
|
+
- **SelectImageController** - Image browser wizard, file selection, image info API
|
|
14
|
+
- **ImageRenderingController** - Image rendering and processing for frontend
|
|
15
|
+
- **ImageLinkRenderingController** - Link-wrapped image rendering
|
|
16
|
+
|
|
17
|
+
### EventListeners
|
|
18
|
+
- **RteConfigurationListener** - PSR-14 event for RTE configuration injection
|
|
19
|
+
|
|
20
|
+
### DataHandling
|
|
21
|
+
- **RteImagesDbHook** - Database hooks for image magic reference handling
|
|
22
|
+
- **RteImageSoftReferenceParser** - Soft reference parsing for RTE images
|
|
23
|
+
|
|
24
|
+
### Backend Components
|
|
25
|
+
- **RteImagePreviewRenderer** - Backend preview rendering
|
|
26
|
+
|
|
27
|
+
### Utilities
|
|
28
|
+
- **ProcessedFilesHandler** - File processing and manipulation utilities
|
|
29
|
+
|
|
30
|
+
## 🏗️ Architecture Patterns
|
|
31
|
+
|
|
32
|
+
### TYPO3 Patterns
|
|
33
|
+
- **FAL (File Abstraction Layer):** All file operations via ResourceFactory
|
|
34
|
+
- **PSR-7 Request/Response:** HTTP message interfaces for controllers
|
|
35
|
+
- **PSR-14 Events:** Event-driven configuration and hooks
|
|
36
|
+
- **Dependency Injection:** Constructor-based DI (TYPO3 v13+)
|
|
37
|
+
- **Service Configuration:** `Configuration/Services.yaml` for DI registration
|
|
38
|
+
|
|
39
|
+
### File Structure
|
|
40
|
+
```
|
|
41
|
+
Classes/
|
|
42
|
+
├── Backend/
|
|
43
|
+
│ └── Preview/
|
|
44
|
+
│ └── RteImagePreviewRenderer.php
|
|
45
|
+
├── Controller/
|
|
46
|
+
│ ├── ImageLinkRenderingController.php
|
|
47
|
+
│ ├── ImageRenderingController.php
|
|
48
|
+
│ └── SelectImageController.php
|
|
49
|
+
├── DataHandling/
|
|
50
|
+
│ └── SoftReference/
|
|
51
|
+
│ └── RteImageSoftReferenceParser.php
|
|
52
|
+
├── Database/
|
|
53
|
+
│ └── RteImagesDbHook.php
|
|
54
|
+
├── EventListener/
|
|
55
|
+
│ └── RteConfigurationListener.php
|
|
56
|
+
└── Utils/
|
|
57
|
+
└── ProcessedFilesHandler.php
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 🔧 Build & Tests
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# PHP-specific quality checks
|
|
64
|
+
make lint # All linters (syntax + PHPStan + Rector + style)
|
|
65
|
+
composer ci:test:php:lint # PHP syntax check
|
|
66
|
+
composer ci:test:php:phpstan # Static analysis
|
|
67
|
+
composer ci:test:php:rector # Rector modernization check
|
|
68
|
+
composer ci:test:php:cgl # Code style check
|
|
69
|
+
|
|
70
|
+
# Fixes
|
|
71
|
+
make format # Auto-fix code style
|
|
72
|
+
composer ci:cgl # Alternative: fix style
|
|
73
|
+
composer ci:rector # Apply Rector changes
|
|
74
|
+
|
|
75
|
+
# Full CI
|
|
76
|
+
make ci # Complete pipeline
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## 📝 Code Style
|
|
80
|
+
|
|
81
|
+
### Required Patterns
|
|
82
|
+
|
|
83
|
+
**1. Strict Types (Always First)**
|
|
84
|
+
```php
|
|
85
|
+
<?php
|
|
86
|
+
|
|
87
|
+
declare(strict_types=1);
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**2. File Header (Auto-managed by PHP-CS-Fixer)**
|
|
91
|
+
```php
|
|
92
|
+
/**
|
|
93
|
+
* This file is part of the package netresearch/rte-ckeditor-image.
|
|
94
|
+
*
|
|
95
|
+
* For the full copyright and license information, please read the
|
|
96
|
+
* LICENSE file that was distributed with this source code.
|
|
97
|
+
*/
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**3. Import Order**
|
|
101
|
+
- Classes first
|
|
102
|
+
- Functions second
|
|
103
|
+
- Constants third
|
|
104
|
+
- One blank line before namespace
|
|
105
|
+
|
|
106
|
+
**4. Type Hints**
|
|
107
|
+
- All parameters must have type hints
|
|
108
|
+
- All return types must be declared
|
|
109
|
+
- Use nullable types `?Type` when appropriate
|
|
110
|
+
- Use union types `Type1|Type2` for PHP 8+
|
|
111
|
+
|
|
112
|
+
**5. Property Types**
|
|
113
|
+
```php
|
|
114
|
+
private ResourceFactory $resourceFactory; // Required type declaration
|
|
115
|
+
private readonly ResourceFactory $factory; // Readonly for immutability
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**6. Alignment**
|
|
119
|
+
```php
|
|
120
|
+
$config = [
|
|
121
|
+
'short' => 'value', // Align on =>
|
|
122
|
+
'longer' => 'another',
|
|
123
|
+
];
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## 🔒 Security
|
|
127
|
+
|
|
128
|
+
### FAL (File Abstraction Layer)
|
|
129
|
+
- **Always use FAL:** Never direct file system access
|
|
130
|
+
- **ResourceFactory:** For retrieving files by UID
|
|
131
|
+
- **File validation:** Check isDeleted(), isMissing()
|
|
132
|
+
- **ProcessedFile:** Use process() for image manipulation
|
|
133
|
+
|
|
134
|
+
```php
|
|
135
|
+
// ✅ Good: FAL usage
|
|
136
|
+
$file = $this->resourceFactory->getFileObject($id);
|
|
137
|
+
if ($file->isDeleted() || $file->isMissing()) {
|
|
138
|
+
throw new \Exception('File not found');
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// ❌ Bad: Direct file access
|
|
142
|
+
$file = file_get_contents('/var/www/uploads/' . $filename);
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Input Validation
|
|
146
|
+
- **Type cast superglobals:** `(int)($request->getQueryParams()['id'] ?? 0)`
|
|
147
|
+
- **Validate before use:** Check ranges, formats, existence
|
|
148
|
+
- **Exit on error:** Use HTTP status codes with `HttpUtility::HTTP_STATUS_*`
|
|
149
|
+
|
|
150
|
+
### XSS Prevention
|
|
151
|
+
- **Fluid templates:** Auto-escaping enabled by default
|
|
152
|
+
- **JSON responses:** Use `JsonResponse` class
|
|
153
|
+
- **Localization:** Via `LocalizationUtility::translate()`
|
|
154
|
+
|
|
155
|
+
## ✅ PR/Commit Checklist
|
|
156
|
+
|
|
157
|
+
### PHP-Specific Checks
|
|
158
|
+
1. ✅ **Strict types:** `declare(strict_types=1);` in all files
|
|
159
|
+
2. ✅ **Type hints:** All parameters and return types declared
|
|
160
|
+
3. ✅ **PHPStan:** Zero errors (`composer ci:test:php:phpstan`)
|
|
161
|
+
4. ✅ **Code style:** PSR-12/PER-CS2.0 compliant (`make format`)
|
|
162
|
+
5. ✅ **Rector:** No modernization suggestions (`composer ci:test:php:rector`)
|
|
163
|
+
6. ✅ **FAL usage:** No direct file system access
|
|
164
|
+
7. ✅ **DI pattern:** Constructor injection, no `new ClassName()`
|
|
165
|
+
8. ✅ **PSR-7:** Request/Response for controllers
|
|
166
|
+
9. ✅ **Documentation:** PHPDoc for public methods
|
|
167
|
+
|
|
168
|
+
## 🎓 Good vs Bad Examples
|
|
169
|
+
|
|
170
|
+
### ✅ Good: Controller Pattern
|
|
171
|
+
|
|
172
|
+
```php
|
|
173
|
+
<?php
|
|
174
|
+
|
|
175
|
+
declare(strict_types=1);
|
|
176
|
+
|
|
177
|
+
namespace Netresearch\RteCKEditorImage\Controller;
|
|
178
|
+
|
|
179
|
+
use Psr\Http\Message\ResponseInterface;
|
|
180
|
+
use Psr\Http\Message\ServerRequestInterface;
|
|
181
|
+
use TYPO3\CMS\Core\Http\JsonResponse;
|
|
182
|
+
use TYPO3\CMS\Core\Resource\ResourceFactory;
|
|
183
|
+
|
|
184
|
+
final class SelectImageController
|
|
185
|
+
{
|
|
186
|
+
public function __construct(
|
|
187
|
+
private readonly ResourceFactory $resourceFactory
|
|
188
|
+
) {
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
public function infoAction(ServerRequestInterface $request): ResponseInterface
|
|
192
|
+
{
|
|
193
|
+
$fileUid = (int)($request->getQueryParams()['fileId'] ?? 0);
|
|
194
|
+
|
|
195
|
+
if ($fileUid <= 0) {
|
|
196
|
+
return new JsonResponse(['error' => 'Invalid file ID'], 400);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
$file = $this->resourceFactory->getFileObject($fileUid);
|
|
200
|
+
|
|
201
|
+
return new JsonResponse([
|
|
202
|
+
'uid' => $file->getUid(),
|
|
203
|
+
'width' => $file->getProperty('width'),
|
|
204
|
+
'height' => $file->getProperty('height'),
|
|
205
|
+
]);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### ❌ Bad: Anti-patterns
|
|
211
|
+
|
|
212
|
+
```php
|
|
213
|
+
<?php
|
|
214
|
+
// ❌ Missing strict types
|
|
215
|
+
namespace Netresearch\RteCKEditorImage\Controller;
|
|
216
|
+
|
|
217
|
+
// ❌ Missing PSR-7 types
|
|
218
|
+
class SelectImageController
|
|
219
|
+
{
|
|
220
|
+
// ❌ No constructor DI
|
|
221
|
+
public function infoAction($request)
|
|
222
|
+
{
|
|
223
|
+
// ❌ Direct superglobal access
|
|
224
|
+
$fileUid = $_GET['fileId'];
|
|
225
|
+
|
|
226
|
+
// ❌ No DI - manual instantiation
|
|
227
|
+
$factory = new ResourceFactory();
|
|
228
|
+
|
|
229
|
+
// ❌ No type safety, no validation
|
|
230
|
+
$file = $factory->getFileObject($fileUid);
|
|
231
|
+
|
|
232
|
+
// ❌ Manual JSON encoding
|
|
233
|
+
header('Content-Type: application/json');
|
|
234
|
+
echo json_encode(['uid' => $file->getUid()]);
|
|
235
|
+
exit;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### ✅ Good: EventListener Pattern
|
|
241
|
+
|
|
242
|
+
```php
|
|
243
|
+
<?php
|
|
244
|
+
|
|
245
|
+
declare(strict_types=1);
|
|
246
|
+
|
|
247
|
+
namespace Netresearch\RteCKEditorImage\EventListener;
|
|
248
|
+
|
|
249
|
+
use TYPO3\CMS\Backend\Routing\UriBuilder;
|
|
250
|
+
use TYPO3\CMS\RteCKEditor\Form\Element\Event\AfterPrepareConfigurationForEditorEvent;
|
|
251
|
+
|
|
252
|
+
final class RteConfigurationListener
|
|
253
|
+
{
|
|
254
|
+
public function __construct(
|
|
255
|
+
private readonly UriBuilder $uriBuilder
|
|
256
|
+
) {
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
public function __invoke(AfterPrepareConfigurationForEditorEvent $event): void
|
|
260
|
+
{
|
|
261
|
+
$configuration = $event->getConfiguration();
|
|
262
|
+
$configuration['style']['typo3image'] = [
|
|
263
|
+
'routeUrl' => (string)$this->uriBuilder->buildUriFromRoute('rteckeditorimage_wizard_select_image'),
|
|
264
|
+
];
|
|
265
|
+
$event->setConfiguration($configuration);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### ❌ Bad: EventListener Anti-pattern
|
|
271
|
+
|
|
272
|
+
```php
|
|
273
|
+
<?php
|
|
274
|
+
namespace Netresearch\RteCKEditorImage\EventListener;
|
|
275
|
+
|
|
276
|
+
class RteConfigurationListener
|
|
277
|
+
{
|
|
278
|
+
// ❌ Wrong signature - not invokable
|
|
279
|
+
public function handle($event)
|
|
280
|
+
{
|
|
281
|
+
// ❌ Manual instantiation instead of DI
|
|
282
|
+
$uriBuilder = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(UriBuilder::class);
|
|
283
|
+
|
|
284
|
+
// ❌ Array access without type safety
|
|
285
|
+
$config = $event->getConfiguration();
|
|
286
|
+
$config['style']['typo3image']['routeUrl'] = $uriBuilder->buildUriFromRoute('rteckeditorimage_wizard_select_image');
|
|
287
|
+
$event->setConfiguration($config);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### ✅ Good: FAL Usage
|
|
293
|
+
|
|
294
|
+
```php
|
|
295
|
+
protected function getImage(int $id): File
|
|
296
|
+
{
|
|
297
|
+
try {
|
|
298
|
+
$file = $this->resourceFactory->getFileObject($id);
|
|
299
|
+
|
|
300
|
+
if ($file->isDeleted() || $file->isMissing()) {
|
|
301
|
+
throw new FileNotFoundException('File not found or deleted', 1234567890);
|
|
302
|
+
}
|
|
303
|
+
} catch (\Exception $e) {
|
|
304
|
+
throw new FileNotFoundException('Could not load file', 1234567891, $e);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
return $file;
|
|
308
|
+
}
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### ❌ Bad: Direct File Access
|
|
312
|
+
|
|
313
|
+
```php
|
|
314
|
+
// ❌ Multiple issues
|
|
315
|
+
protected function getImage($id) // Missing return type, no type hint
|
|
316
|
+
{
|
|
317
|
+
// ❌ Direct file system access, bypassing FAL
|
|
318
|
+
$path = '/var/www/html/fileadmin/' . $id;
|
|
319
|
+
|
|
320
|
+
// ❌ No validation, no error handling
|
|
321
|
+
if (file_exists($path)) {
|
|
322
|
+
return file_get_contents($path);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
return null; // ❌ Should throw exception or return typed null
|
|
326
|
+
}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
## 🆘 When Stuck
|
|
330
|
+
|
|
331
|
+
### Documentation
|
|
332
|
+
- **API Reference:** [docs/API/Controllers.md](../docs/API/Controllers.md) - Controller APIs
|
|
333
|
+
- **Event Listeners:** [docs/API/EventListeners.md](../docs/API/EventListeners.md) - PSR-14 events
|
|
334
|
+
- **Data Handling:** [docs/API/DataHandling.md](../docs/API/DataHandling.md) - Database hooks
|
|
335
|
+
- **Architecture:** [docs/Architecture/Overview.md](../docs/Architecture/Overview.md) - System design
|
|
336
|
+
|
|
337
|
+
### TYPO3 Resources
|
|
338
|
+
- **FAL Documentation:** https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Fal/Index.html
|
|
339
|
+
- **PSR-14 Events:** https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Events/Index.html
|
|
340
|
+
- **Dependency Injection:** https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/DependencyInjection/Index.html
|
|
341
|
+
- **Controllers:** https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Backend/Controllers/Index.html
|
|
342
|
+
|
|
343
|
+
### Common Issues
|
|
344
|
+
- **ResourceFactory errors:** Check file exists, not deleted, proper UID
|
|
345
|
+
- **DI not working:** Verify `Configuration/Services.yaml` registration
|
|
346
|
+
- **PHPStan errors:** Update baseline: `composer ci:test:php:phpstan:baseline`
|
|
347
|
+
- **Type errors:** Enable strict_types, add all type hints
|
|
348
|
+
|
|
349
|
+
## 📐 House Rules
|
|
350
|
+
|
|
351
|
+
### Controllers
|
|
352
|
+
- **Extend framework controllers:** ElementBrowserController for browsers
|
|
353
|
+
- **Final by default:** Use `final class` unless inheritance required
|
|
354
|
+
- **PSR-7 types:** ServerRequestInterface → ResponseInterface
|
|
355
|
+
- **JSON responses:** Use `JsonResponse` class
|
|
356
|
+
- **Validation first:** Validate all input parameters at method start
|
|
357
|
+
|
|
358
|
+
### EventListeners
|
|
359
|
+
- **Invokable:** Use `__invoke()` method signature
|
|
360
|
+
- **Event type hints:** Type-hint specific event classes
|
|
361
|
+
- **Immutability aware:** Get, modify, set configuration/state
|
|
362
|
+
- **Final classes:** Event listeners should be final
|
|
363
|
+
|
|
364
|
+
### DataHandling
|
|
365
|
+
- **Soft references:** Implement soft reference parsing for data integrity
|
|
366
|
+
- **Database hooks:** Use for maintaining referential integrity
|
|
367
|
+
- **Transaction safety:** Consider rollback scenarios
|
|
368
|
+
|
|
369
|
+
### Dependencies
|
|
370
|
+
- **Constructor injection:** All dependencies via constructor
|
|
371
|
+
- **Readonly properties:** Use `readonly` for immutable dependencies
|
|
372
|
+
- **Interface over implementation:** Depend on interfaces when available
|
|
373
|
+
- **GeneralUtility::makeInstance:** Only for factories or when DI unavailable
|
|
374
|
+
|
|
375
|
+
### Error Handling
|
|
376
|
+
- **Type-specific exceptions:** Use TYPO3 exception hierarchy
|
|
377
|
+
- **HTTP status codes:** Via HttpUtility constants
|
|
378
|
+
- **Meaningful messages:** Include context in exception messages
|
|
379
|
+
- **Log important errors:** Use TYPO3 logging framework
|
|
380
|
+
|
|
381
|
+
### Testing
|
|
382
|
+
- **Functional tests:** For controllers, database operations
|
|
383
|
+
- **Unit tests:** For utilities, isolated logic
|
|
384
|
+
- **Mock FAL:** Use TYPO3 testing framework FAL mocks
|
|
385
|
+
- **Test location:** `Tests/Functional/` and `Tests/Unit/`
|
|
386
|
+
|
|
387
|
+
## 🔗 Related
|
|
388
|
+
|
|
389
|
+
- **[Resources/AGENTS.md](../Resources/AGENTS.md)** - JavaScript/CKEditor integration
|
|
390
|
+
- **[Tests/AGENTS.md](../Tests/AGENTS.md)** - Testing patterns
|
|
391
|
+
- **[Configuration/Services.yaml](../Configuration/Services.yaml)** - DI container configuration
|
|
392
|
+
- **[docs/API/](../docs/API/)** - Complete API documentation
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Feedback Memory Schema
|
|
2
|
+
|
|
3
|
+
Canonical format for **approved session learnings** materialized as project-rule or user-memory files. This schema is the contract between `retro-skill` (which writes these files) and `agent-rules-skill` (which manages how they integrate with AGENTS.md and project documentation).
|
|
4
|
+
|
|
5
|
+
## When this schema applies
|
|
6
|
+
|
|
7
|
+
| Destination | Path |
|
|
8
|
+
|---|---|
|
|
9
|
+
| **user-memory** (personal preference across projects) | `~/.claude/projects/<project-dir-slug>/memory/feedback_<slug>.md` |
|
|
10
|
+
| **project-rule** (project-specific convention) | `<project>/docs/feedback/feedback_<slug>.md` |
|
|
11
|
+
|
|
12
|
+
### Variable definitions
|
|
13
|
+
|
|
14
|
+
| Variable | Meaning | Example |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| `<project-dir-slug>` | Claude Code's encoding of the absolute working directory for user-memory. Slashes are replaced with `-`. | `/home/sme/p` → `-home-sme-p` |
|
|
17
|
+
| `<slug>` | kebab-case filename slug for *this specific learning* | `merge-strategy`, `preserve-commit-signing` |
|
|
18
|
+
|
|
19
|
+
`<project-dir-slug>` and `<slug>` are distinct. `retro-skill` MUST compute `<project-dir-slug>` deterministically from the absolute working directory at the time of materialization (not from any frontmatter field).
|
|
20
|
+
|
|
21
|
+
For user-memory **global** scope (not tied to a single project): place under whatever project-dir-slug Claude Code uses for global memory; consult `~/.claude/projects/` for the convention in use.
|
|
22
|
+
|
|
23
|
+
## Schema
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
---
|
|
27
|
+
name: <human-readable title; may be free prose>
|
|
28
|
+
description: "<one-line summary; used for relevance scoring across sessions>"
|
|
29
|
+
type: feedback
|
|
30
|
+
originSessionId: <session-id-from-jsonl-filename>
|
|
31
|
+
---
|
|
32
|
+
**Why:** <1-2 paragraphs explaining the friction and root cause>
|
|
33
|
+
|
|
34
|
+
**How to apply:** <1-2 paragraphs describing how the assistant should behave next time>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Field semantics
|
|
38
|
+
|
|
39
|
+
| Field | Required | Notes |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| `name` | yes | Human-readable title for the learning. May be a free-form sentence (e.g. `"Preserve commit signing on rewrite operations"`) or a short slug (e.g. `"merge strategy"`). **Not necessarily kebab-case** — the canonical examples use both natural language and slugs. The **filename** uses an independent kebab-case slug (see "Filename slug" below). |
|
|
42
|
+
| `description` | yes | One-line summary, ≤200 chars. Used by retro-skill to score relevance against new friction. **MUST be double-quoted** when it contains any of `: # [ ] { } , & * ! \| > ' " % @` or a leading whitespace, or it may break YAML parsing. Safer rule: quote unconditionally. |
|
|
43
|
+
| `type` | yes | always `feedback` (distinguishes from other memory types). |
|
|
44
|
+
| `originSessionId` | recommended, not required | Session ID where the friction was first observed (audit trail). If absent, the file is still valid but loses traceability. |
|
|
45
|
+
| `**Why:**` body section | yes | Start of line, exact form `**Why:** ` (with trailing space). Without this, the file rots — readers can't judge if it still applies. |
|
|
46
|
+
| `**How to apply:**` body section | yes | Start of line, exact form `**How to apply:** `. Vague rules don't change behavior. |
|
|
47
|
+
|
|
48
|
+
### Filename slug (independent from `name`)
|
|
49
|
+
|
|
50
|
+
The `<slug>` in the filename `feedback_<slug>.md` is **separately chosen** by retro-skill, kebab-case, descriptive of the learning topic. It is NOT required to match `frontmatter.name`.
|
|
51
|
+
|
|
52
|
+
Canonical examples demonstrate the freedom: file `feedback_skill-sources.md` has `name: "skill source vs cache"`; file `feedback_no-version-bumps-in-feature-prs.md` has `name: "No version bumps in feature PRs"`.
|
|
53
|
+
|
|
54
|
+
## Project-rule placement
|
|
55
|
+
|
|
56
|
+
When `retro-skill` materializes a `project-rule` destination:
|
|
57
|
+
|
|
58
|
+
1. **Write file:** `<project>/docs/feedback/feedback_<slug>.md` (create `docs/feedback/` if missing).
|
|
59
|
+
2. **Add AGENTS.md index entry** under a `## Approved learnings` section:
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
## Approved learnings
|
|
63
|
+
|
|
64
|
+
- [feedback_<slug>.md](docs/feedback/feedback_<slug>.md) — <one-line summary from frontmatter description>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The index entry is a single line; the full prose lives in the linked file.
|
|
68
|
+
|
|
69
|
+
### Section position in AGENTS.md
|
|
70
|
+
|
|
71
|
+
`## Approved learnings` should be placed **after `## Key Decisions` and before `## Boundaries`** in the `root-thin.md` template's section order. **Place it outside `<!-- AGENTS-GENERATED:START ... -->` markers** so `generate-agents.sh --update` preserves it — this section is managed by retro-skill, not by the generator.
|
|
72
|
+
|
|
73
|
+
If the project's AGENTS.md is at or near the 150-line cap (the harness AH-02 threshold), prune older inactive learnings or move to a scoped `AGENTS.md` rather than letting the index grow unbounded.
|
|
74
|
+
|
|
75
|
+
## User-memory placement
|
|
76
|
+
|
|
77
|
+
When `retro-skill` materializes a `user-memory` destination:
|
|
78
|
+
|
|
79
|
+
1. **Compute path:** `~/.claude/projects/<project-dir-slug>/memory/feedback_<slug>.md` for project-scoped learnings, OR the global-scope path (consult `~/.claude/projects/`).
|
|
80
|
+
2. **Write file** using the schema above.
|
|
81
|
+
3. **Add MEMORY.md index entry** under the existing flat `## Topic Files` section (no sub-sections):
|
|
82
|
+
|
|
83
|
+
```markdown
|
|
84
|
+
- [feedback_<slug>.md](feedback_<slug>.md) — <one-line summary>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Do not create a separate `## Feedback` heading — MEMORY.md uses a single flat list.
|
|
88
|
+
|
|
89
|
+
## Why this schema (rationale)
|
|
90
|
+
|
|
91
|
+
- **Frontmatter** is machine-readable and tool-discoverable.
|
|
92
|
+
- **`description`** lets retro-skill detect duplicates and rank relevance.
|
|
93
|
+
- **`Why:` + `How to apply:`** structure forces meaningful content; vague file = vague rule.
|
|
94
|
+
- **`originSessionId`** allows tracing back to the friction; supports audit and deprecation.
|
|
95
|
+
|
|
96
|
+
## Validation
|
|
97
|
+
|
|
98
|
+
A valid feedback file has:
|
|
99
|
+
|
|
100
|
+
- YAML frontmatter present and parseable by PyYAML / yq.
|
|
101
|
+
- Required fields populated (non-empty): `name`, `description`, `type`.
|
|
102
|
+
- `description` is double-quoted (or doesn't contain YAML-special characters).
|
|
103
|
+
- Both `**Why:** ` and `**How to apply:** ` body markers present at start-of-line.
|
|
104
|
+
- File path matches `feedback_<slug>.md` where `<slug>` is kebab-case (independent of frontmatter `name`).
|
|
105
|
+
|
|
106
|
+
`originSessionId` is recommended but its absence does NOT invalidate the file.
|
|
107
|
+
|
|
108
|
+
Optional `scripts/verify-feedback-memory.sh` (not yet implemented; tracked as TODO) can enforce this in CI.
|
|
109
|
+
|
|
110
|
+
## Validation gap (current state)
|
|
111
|
+
|
|
112
|
+
`references/verification-guide.md` does **not** yet include a row for feedback files. Adding the check is tracked separately. retro-skill's PR-time validation of materialized files is the de-facto enforcement until the agent-rules-skill validator catches up.
|
|
113
|
+
|
|
114
|
+
## Examples in the wild
|
|
115
|
+
|
|
116
|
+
The user's own memory at `~/.claude/projects/-home-sme-p/memory/` contains **9 files** following this schema:
|
|
117
|
+
|
|
118
|
+
- `feedback_dup-repo-verification.md`
|
|
119
|
+
- `feedback_merge-strategy.md`
|
|
120
|
+
- `feedback_merge-vs-rollout.md`
|
|
121
|
+
- `feedback_no-version-bumps-in-feature-prs.md`
|
|
122
|
+
- `feedback_obsolete-docs-prefer-delete.md`
|
|
123
|
+
- `feedback_preserve-commit-signing.md`
|
|
124
|
+
- `feedback_skill-iteration-cadence.md`
|
|
125
|
+
- `feedback_skill-sources.md`
|
|
126
|
+
- `feedback_subagent-default.md`
|
|
127
|
+
|
|
128
|
+
Some include an extended `metadata:` block (e.g. `feedback_merge-vs-rollout.md` has `metadata: { node_type: memory, type: feedback }`); that variant is tolerated, not required.
|
|
129
|
+
|
|
130
|
+
## See also
|
|
131
|
+
|
|
132
|
+
- `retro-skill/references/destination-taxonomy.md` — Where this schema applies (in retro-skill repo)
|
|
133
|
+
- `retro-skill/references/patch-workflow.md` — How retro-skill writes these (in retro-skill repo)
|
|
134
|
+
- `references/output-structure.md` — How AGENTS.md indexes feedback files
|
|
135
|
+
- `references/verification-guide.md` — How to validate the resulting AGENTS.md
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Git Hooks Setup for Autonomous Agents
|
|
2
|
+
|
|
3
|
+
## Why Hooks Matter
|
|
4
|
+
|
|
5
|
+
Git hooks catch formatting errors, lint violations, and test failures **before commit** -- not minutes later in CI. For autonomous agents, this is critical: a failed CI run wastes time, tokens, and creates noisy fix-up commits. Hooks provide immediate feedback in the local loop.
|
|
6
|
+
|
|
7
|
+
## Detecting the Hook Framework
|
|
8
|
+
|
|
9
|
+
Check for these files in the repository root:
|
|
10
|
+
|
|
11
|
+
| File | Framework | Language ecosystem |
|
|
12
|
+
|------|-----------|-------------------|
|
|
13
|
+
| `lefthook.yml` or `.lefthook.yml` | [Lefthook](https://github.com/evilmartians/lefthook) | Any (Go binary) |
|
|
14
|
+
| `captainhook.json` | [CaptainHook](https://github.com/captainhookphp/captainhook) | PHP / Composer |
|
|
15
|
+
| `.husky/` directory | [Husky](https://github.com/typicode/husky) | Node.js / npm |
|
|
16
|
+
| `.pre-commit-config.yaml` | [pre-commit](https://pre-commit.com/) | Python / Any |
|
|
17
|
+
|
|
18
|
+
## Setup Commands
|
|
19
|
+
|
|
20
|
+
### Lefthook
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# If a Makefile target exists (preferred)
|
|
24
|
+
make setup
|
|
25
|
+
|
|
26
|
+
# Otherwise install directly
|
|
27
|
+
go install github.com/evilmartians/lefthook@latest
|
|
28
|
+
lefthook install
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### CaptainHook (PHP)
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Hooks install automatically via Composer plugin
|
|
35
|
+
composer install
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
CaptainHook registers itself as a Composer plugin. Running `composer install` triggers the post-install hook that sets up git hooks. No extra step needed.
|
|
39
|
+
|
|
40
|
+
### Husky (Node.js)
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Hooks install automatically via npm prepare script
|
|
44
|
+
npm install
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Husky uses the `prepare` lifecycle script in `package.json`. Running `npm install` (or `yarn install`) automatically runs `husky install`.
|
|
48
|
+
|
|
49
|
+
### pre-commit (Python)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pip install pre-commit
|
|
53
|
+
pre-commit install
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Or if the project uses a virtual environment:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Inside activated venv
|
|
60
|
+
pre-commit install
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## When No Hooks Exist
|
|
64
|
+
|
|
65
|
+
If no hook framework is detected:
|
|
66
|
+
|
|
67
|
+
1. **Do not skip this step.** The absence of hooks is a gap worth flagging.
|
|
68
|
+
2. Suggest adding hooks to the project -- recommend Lefthook for polyglot repos, or the ecosystem-native tool (Husky for JS, CaptainHook for PHP, pre-commit for Python).
|
|
69
|
+
3. See the `git-workflow` skill for hook framework setup guidance.
|
|
70
|
+
|
|
71
|
+
## Never Skip Hooks
|
|
72
|
+
|
|
73
|
+
**NEVER** use `--no-verify` to bypass hooks. If a hook fails:
|
|
74
|
+
|
|
75
|
+
1. Read the hook output to understand the failure.
|
|
76
|
+
2. Fix the underlying issue (formatting, lint error, failing test).
|
|
77
|
+
3. Stage the fix and commit again.
|
|
78
|
+
|
|
79
|
+
Skipping hooks defeats their purpose and pushes problems to CI where they are more expensive to fix.
|