@mohammadhprp/system-prompt 0.10.1
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/LICENSE +21 -0
- package/README.md +35 -0
- package/bin/system-prompt.js +8 -0
- package/framework/README.md +163 -0
- package/framework/agents/README.md +49 -0
- package/framework/agents/backend-architect.md +146 -0
- package/framework/agents/researcher.md +79 -0
- package/framework/agents/reviewer.md +183 -0
- package/framework/agents/security-auditor.md +131 -0
- package/framework/commands/README.md +43 -0
- package/framework/commands/changelog.md +44 -0
- package/framework/commands/commit.md +31 -0
- package/framework/commands/learn.md +24 -0
- package/framework/commands/mr.md +46 -0
- package/framework/commands/pr.md +39 -0
- package/framework/commands/release.md +34 -0
- package/framework/commands/review.md +24 -0
- package/framework/commands/summarize-changes.md +49 -0
- package/framework/mcps/README.md +78 -0
- package/framework/mcps/excalidraw/README.md +37 -0
- package/framework/mcps/excalidraw/capabilities.md +54 -0
- package/framework/mcps/excalidraw/configs/opencode.json +8 -0
- package/framework/mcps/excalidraw/install.md +92 -0
- package/framework/mcps/excalidraw/troubleshooting.md +67 -0
- package/framework/mcps/figma-mcp-go/README.md +51 -0
- package/framework/mcps/figma-mcp-go/capabilities.md +190 -0
- package/framework/mcps/figma-mcp-go/configs/opencode.json +9 -0
- package/framework/mcps/figma-mcp-go/install.md +74 -0
- package/framework/mcps/figma-mcp-go/troubleshooting.md +99 -0
- package/framework/mcps/github-mcp/README.md +51 -0
- package/framework/mcps/github-mcp/capabilities.md +83 -0
- package/framework/mcps/github-mcp/configs/.env.example +1 -0
- package/framework/mcps/github-mcp/configs/opencode.json +13 -0
- package/framework/mcps/github-mcp/install.md +60 -0
- package/framework/mcps/github-mcp/troubleshooting.md +79 -0
- package/framework/mcps/gitlab-mcp/README.md +54 -0
- package/framework/mcps/gitlab-mcp/capabilities.md +216 -0
- package/framework/mcps/gitlab-mcp/configs/.env.example +2 -0
- package/framework/mcps/gitlab-mcp/configs/opencode.json +13 -0
- package/framework/mcps/gitlab-mcp/install.md +99 -0
- package/framework/mcps/gitlab-mcp/troubleshooting.md +116 -0
- package/framework/mcps/jira-mcp/README.md +53 -0
- package/framework/mcps/jira-mcp/capabilities.md +79 -0
- package/framework/mcps/jira-mcp/configs/.env.example +2 -0
- package/framework/mcps/jira-mcp/configs/opencode.json +13 -0
- package/framework/mcps/jira-mcp/install.md +94 -0
- package/framework/mcps/jira-mcp/troubleshooting.md +113 -0
- package/framework/mcps/laravel-boost/README.md +53 -0
- package/framework/mcps/laravel-boost/capabilities.md +92 -0
- package/framework/mcps/laravel-boost/configs/opencode.json +9 -0
- package/framework/mcps/laravel-boost/install.md +106 -0
- package/framework/mcps/laravel-boost/troubleshooting.md +119 -0
- package/framework/mcps/notion-mcp/README.md +58 -0
- package/framework/mcps/notion-mcp/capabilities.md +118 -0
- package/framework/mcps/notion-mcp/configs/opencode.json +9 -0
- package/framework/mcps/notion-mcp/install.md +70 -0
- package/framework/mcps/notion-mcp/troubleshooting.md +95 -0
- package/framework/mcps/playwright-mcp/README.md +50 -0
- package/framework/mcps/playwright-mcp/capabilities.md +149 -0
- package/framework/mcps/playwright-mcp/configs/opencode.json +9 -0
- package/framework/mcps/playwright-mcp/install.md +136 -0
- package/framework/mcps/playwright-mcp/troubleshooting.md +154 -0
- package/framework/mcps/supabase-mcp/README.md +66 -0
- package/framework/mcps/supabase-mcp/capabilities.md +127 -0
- package/framework/mcps/supabase-mcp/configs/opencode.json +9 -0
- package/framework/mcps/supabase-mcp/install.md +85 -0
- package/framework/mcps/supabase-mcp/troubleshooting.md +113 -0
- package/framework/memory/README.md +17 -0
- package/framework/memory/codebase-insights.md +6 -0
- package/framework/memory/user-preferences.md +5 -0
- package/framework/modes/README.md +52 -0
- package/framework/modes/audit.md +88 -0
- package/framework/plugins/README.md +65 -0
- package/framework/plugins/opencode-goal-plugin/README.md +45 -0
- package/framework/plugins/opencode-goal-plugin/capabilities.md +127 -0
- package/framework/plugins/opencode-goal-plugin/install.md +71 -0
- package/framework/plugins/opencode-goal-plugin/troubleshooting.md +112 -0
- package/framework/plugins/ponytail/README.md +44 -0
- package/framework/plugins/ponytail/capabilities.md +112 -0
- package/framework/plugins/ponytail/install.md +77 -0
- package/framework/plugins/ponytail/troubleshooting.md +116 -0
- package/framework/references/standards/api.md +44 -0
- package/framework/references/standards/architecture.md +43 -0
- package/framework/references/standards/database.md +43 -0
- package/framework/references/standards/debugging.md +44 -0
- package/framework/references/standards/documentation.md +43 -0
- package/framework/references/standards/logging.md +43 -0
- package/framework/references/standards/naming.md +43 -0
- package/framework/references/standards/observability.md +43 -0
- package/framework/references/standards/performance.md +43 -0
- package/framework/references/standards/pull-requests.md +43 -0
- package/framework/references/standards/security.md +43 -0
- package/framework/references/standards/testing.md +43 -0
- package/framework/references/templates/adr.md +28 -0
- package/framework/references/templates/api-spec.md +56 -0
- package/framework/references/templates/design-document.md +39 -0
- package/framework/references/templates/incident-report.md +38 -0
- package/framework/references/templates/postmortem.md +41 -0
- package/framework/references/templates/pull-request.md +34 -0
- package/framework/references/templates/runbook.md +48 -0
- package/framework/references/templates/task.md +27 -0
- package/framework/skills/README.md +68 -0
- package/framework/skills/agent-browser/SKILL.md +51 -0
- package/framework/skills/backend-best-practices/SKILL.md +136 -0
- package/framework/skills/backend-best-practices/examples.md +31 -0
- package/framework/skills/backend-best-practices/references/api-design.md +79 -0
- package/framework/skills/backend-best-practices/references/architecture-review.md +77 -0
- package/framework/skills/backend-best-practices/references/database-design.md +78 -0
- package/framework/skills/backend-best-practices/references/debugging.md +76 -0
- package/framework/skills/backend-best-practices/references/observability.md +78 -0
- package/framework/skills/backend-best-practices/references/performance.md +78 -0
- package/framework/skills/backend-best-practices/references/refactoring.md +77 -0
- package/framework/skills/backend-best-practices/references/security.md +80 -0
- package/framework/skills/backend-best-practices/references/testing.md +77 -0
- package/framework/skills/backend-engineer/SKILL.md +76 -0
- package/framework/skills/backend-engineer/examples.md +31 -0
- package/framework/skills/brainstorming/SKILL.md +159 -0
- package/framework/skills/brainstorming/examples.md +49 -0
- package/framework/skills/brainstorming/scripts/frame-template.html +213 -0
- package/framework/skills/brainstorming/scripts/helper.js +167 -0
- package/framework/skills/brainstorming/scripts/server.cjs +723 -0
- package/framework/skills/brainstorming/scripts/start-server.sh +209 -0
- package/framework/skills/brainstorming/scripts/stop-server.sh +120 -0
- package/framework/skills/brainstorming/visual-companion.md +291 -0
- package/framework/skills/brand-guidelines/LICENSE.txt +202 -0
- package/framework/skills/brand-guidelines/SKILL.md +73 -0
- package/framework/skills/code-review/SKILL.md +72 -0
- package/framework/skills/code-review/examples.md +31 -0
- package/framework/skills/design/SKILL.md +399 -0
- package/framework/skills/design/examples.md +34 -0
- package/framework/skills/diagram-design/SKILL.md +485 -0
- package/framework/skills/diagram-design/assets/example-architecture-dark.html +180 -0
- package/framework/skills/diagram-design/assets/example-architecture-full.html +192 -0
- package/framework/skills/diagram-design/assets/example-architecture.html +181 -0
- package/framework/skills/diagram-design/assets/example-bar-dark.html +127 -0
- package/framework/skills/diagram-design/assets/example-bar-full.html +103 -0
- package/framework/skills/diagram-design/assets/example-bar.html +127 -0
- package/framework/skills/diagram-design/assets/example-data-flow-dark.html +143 -0
- package/framework/skills/diagram-design/assets/example-data-flow-full.html +185 -0
- package/framework/skills/diagram-design/assets/example-data-flow.html +143 -0
- package/framework/skills/diagram-design/assets/example-datalake-dark.html +241 -0
- package/framework/skills/diagram-design/assets/example-datalake-full.html +246 -0
- package/framework/skills/diagram-design/assets/example-datalake.html +267 -0
- package/framework/skills/diagram-design/assets/example-dp-integration-dark.html +78 -0
- package/framework/skills/diagram-design/assets/example-dp-integration-full.html +88 -0
- package/framework/skills/diagram-design/assets/example-dp-integration.html +78 -0
- package/framework/skills/diagram-design/assets/example-dp-security-matrix-dark.html +31 -0
- package/framework/skills/diagram-design/assets/example-dp-security-matrix-full.html +32 -0
- package/framework/skills/diagram-design/assets/example-dp-security-matrix.html +88 -0
- package/framework/skills/diagram-design/assets/example-er-dark.html +200 -0
- package/framework/skills/diagram-design/assets/example-er-full.html +203 -0
- package/framework/skills/diagram-design/assets/example-er.html +200 -0
- package/framework/skills/diagram-design/assets/example-flowchart-dark.html +154 -0
- package/framework/skills/diagram-design/assets/example-flowchart-full.html +157 -0
- package/framework/skills/diagram-design/assets/example-flowchart.html +154 -0
- package/framework/skills/diagram-design/assets/example-gantt-dark.html +135 -0
- package/framework/skills/diagram-design/assets/example-gantt-full.html +125 -0
- package/framework/skills/diagram-design/assets/example-gantt.html +135 -0
- package/framework/skills/diagram-design/assets/example-high-level-dark.html +249 -0
- package/framework/skills/diagram-design/assets/example-high-level-full.html +245 -0
- package/framework/skills/diagram-design/assets/example-high-level-vertical-dark.html +272 -0
- package/framework/skills/diagram-design/assets/example-high-level-vertical-full.html +250 -0
- package/framework/skills/diagram-design/assets/example-high-level-vertical.html +323 -0
- package/framework/skills/diagram-design/assets/example-high-level.html +299 -0
- package/framework/skills/diagram-design/assets/example-it-state-dark.html +90 -0
- package/framework/skills/diagram-design/assets/example-it-state-full.html +69 -0
- package/framework/skills/diagram-design/assets/example-it-state.html +128 -0
- package/framework/skills/diagram-design/assets/example-layers-dark.html +121 -0
- package/framework/skills/diagram-design/assets/example-layers-full.html +124 -0
- package/framework/skills/diagram-design/assets/example-layers.html +121 -0
- package/framework/skills/diagram-design/assets/example-line-dark.html +109 -0
- package/framework/skills/diagram-design/assets/example-line-full.html +103 -0
- package/framework/skills/diagram-design/assets/example-line.html +109 -0
- package/framework/skills/diagram-design/assets/example-loop-dark.html +100 -0
- package/framework/skills/diagram-design/assets/example-loop-full.html +137 -0
- package/framework/skills/diagram-design/assets/example-loop-terminal.html +347 -0
- package/framework/skills/diagram-design/assets/example-loop.html +100 -0
- package/framework/skills/diagram-design/assets/example-medallion-dark.html +159 -0
- package/framework/skills/diagram-design/assets/example-medallion-full.html +201 -0
- package/framework/skills/diagram-design/assets/example-medallion.html +159 -0
- package/framework/skills/diagram-design/assets/example-nested-dark.html +130 -0
- package/framework/skills/diagram-design/assets/example-nested-full.html +133 -0
- package/framework/skills/diagram-design/assets/example-nested.html +134 -0
- package/framework/skills/diagram-design/assets/example-org-chart-dark.html +45 -0
- package/framework/skills/diagram-design/assets/example-org-chart-full.html +45 -0
- package/framework/skills/diagram-design/assets/example-org-chart.html +45 -0
- package/framework/skills/diagram-design/assets/example-process-dark.html +62 -0
- package/framework/skills/diagram-design/assets/example-process-full.html +72 -0
- package/framework/skills/diagram-design/assets/example-process.html +62 -0
- package/framework/skills/diagram-design/assets/example-pyramid-dark.html +117 -0
- package/framework/skills/diagram-design/assets/example-pyramid-full.html +120 -0
- package/framework/skills/diagram-design/assets/example-pyramid.html +117 -0
- package/framework/skills/diagram-design/assets/example-quadrant-consultant.html +164 -0
- package/framework/skills/diagram-design/assets/example-quadrant-dark.html +133 -0
- package/framework/skills/diagram-design/assets/example-quadrant-full.html +136 -0
- package/framework/skills/diagram-design/assets/example-quadrant.html +133 -0
- package/framework/skills/diagram-design/assets/example-radar-dark.html +137 -0
- package/framework/skills/diagram-design/assets/example-radar-full.html +133 -0
- package/framework/skills/diagram-design/assets/example-radar.html +137 -0
- package/framework/skills/diagram-design/assets/example-scatter-dark.html +139 -0
- package/framework/skills/diagram-design/assets/example-scatter-full.html +114 -0
- package/framework/skills/diagram-design/assets/example-scatter.html +139 -0
- package/framework/skills/diagram-design/assets/example-sequence-dark.html +220 -0
- package/framework/skills/diagram-design/assets/example-sequence-full.html +386 -0
- package/framework/skills/diagram-design/assets/example-sequence.html +220 -0
- package/framework/skills/diagram-design/assets/example-state-dark.html +145 -0
- package/framework/skills/diagram-design/assets/example-state-full.html +148 -0
- package/framework/skills/diagram-design/assets/example-state.html +145 -0
- package/framework/skills/diagram-design/assets/example-swimlane-dark.html +170 -0
- package/framework/skills/diagram-design/assets/example-swimlane-full.html +173 -0
- package/framework/skills/diagram-design/assets/example-swimlane.html +170 -0
- package/framework/skills/diagram-design/assets/example-timeline-dark.html +133 -0
- package/framework/skills/diagram-design/assets/example-timeline-full.html +136 -0
- package/framework/skills/diagram-design/assets/example-timeline.html +133 -0
- package/framework/skills/diagram-design/assets/example-tree-dark.html +171 -0
- package/framework/skills/diagram-design/assets/example-tree-full.html +174 -0
- package/framework/skills/diagram-design/assets/example-tree.html +171 -0
- package/framework/skills/diagram-design/assets/example-venn-dark.html +130 -0
- package/framework/skills/diagram-design/assets/example-venn-full.html +133 -0
- package/framework/skills/diagram-design/assets/example-venn.html +108 -0
- package/framework/skills/diagram-design/assets/icons.html +230 -0
- package/framework/skills/diagram-design/assets/index.html +333 -0
- package/framework/skills/diagram-design/assets/template-dark.html +82 -0
- package/framework/skills/diagram-design/assets/template-full.html +410 -0
- package/framework/skills/diagram-design/assets/template-terminal.html +170 -0
- package/framework/skills/diagram-design/assets/template.html +83 -0
- package/framework/skills/diagram-design/references/export.md +107 -0
- package/framework/skills/diagram-design/references/onboarding.md +268 -0
- package/framework/skills/diagram-design/references/primitive-annotation.md +36 -0
- package/framework/skills/diagram-design/references/primitive-icons.md +821 -0
- package/framework/skills/diagram-design/references/primitive-sketchy.md +43 -0
- package/framework/skills/diagram-design/references/primitive-terminal.md +76 -0
- package/framework/skills/diagram-design/references/style-guide.md +139 -0
- package/framework/skills/diagram-design/references/type-architecture.md +78 -0
- package/framework/skills/diagram-design/references/type-bar.md +48 -0
- package/framework/skills/diagram-design/references/type-data-flow.md +374 -0
- package/framework/skills/diagram-design/references/type-dp-integration.md +410 -0
- package/framework/skills/diagram-design/references/type-dp-security-matrix.md +379 -0
- package/framework/skills/diagram-design/references/type-er.md +23 -0
- package/framework/skills/diagram-design/references/type-flowchart.md +23 -0
- package/framework/skills/diagram-design/references/type-gantt.md +45 -0
- package/framework/skills/diagram-design/references/type-high-level.md +458 -0
- package/framework/skills/diagram-design/references/type-it-state.md +470 -0
- package/framework/skills/diagram-design/references/type-layers.md +26 -0
- package/framework/skills/diagram-design/references/type-line.md +44 -0
- package/framework/skills/diagram-design/references/type-loop.md +223 -0
- package/framework/skills/diagram-design/references/type-medallion.md +356 -0
- package/framework/skills/diagram-design/references/type-nested.md +22 -0
- package/framework/skills/diagram-design/references/type-org-chart.md +44 -0
- package/framework/skills/diagram-design/references/type-process.md +495 -0
- package/framework/skills/diagram-design/references/type-pyramid.md +33 -0
- package/framework/skills/diagram-design/references/type-quadrant.md +81 -0
- package/framework/skills/diagram-design/references/type-radar.md +80 -0
- package/framework/skills/diagram-design/references/type-scatter.md +39 -0
- package/framework/skills/diagram-design/references/type-sequence.md +35 -0
- package/framework/skills/diagram-design/references/type-state.md +21 -0
- package/framework/skills/diagram-design/references/type-swimlane.md +20 -0
- package/framework/skills/diagram-design/references/type-timeline.md +20 -0
- package/framework/skills/diagram-design/references/type-tree.md +24 -0
- package/framework/skills/diagram-design/references/type-venn.md +26 -0
- package/framework/skills/documentation/SKILL.md +74 -0
- package/framework/skills/documentation/examples.md +31 -0
- package/framework/skills/find-skills/SKILL.md +141 -0
- package/framework/skills/find-skills/examples.md +35 -0
- package/framework/skills/gitlab-mcp/SKILL.md +83 -0
- package/framework/skills/gitlab-mcp/examples.md +31 -0
- package/framework/skills/gitlab-mcp/references/code-review.md +110 -0
- package/framework/skills/gitlab-mcp/references/issues.md +141 -0
- package/framework/skills/gitlab-mcp/references/merge-requests.md +120 -0
- package/framework/skills/gitlab-mcp/references/pipelines.md +67 -0
- package/framework/skills/gitlab-mcp/references/search.md +17 -0
- package/framework/skills/gitlab-mcp/references/webhooks.md +32 -0
- package/framework/skills/gitlab-mcp/references/work-items.md +50 -0
- package/framework/skills/jira-mcp/SKILL.md +57 -0
- package/framework/skills/jira-mcp/examples.md +31 -0
- package/framework/skills/jira-mcp/references/comments.md +27 -0
- package/framework/skills/jira-mcp/references/issues.md +97 -0
- package/framework/skills/jira-mcp/references/projects.md +39 -0
- package/framework/skills/laravel-best-practices/SKILL.md +229 -0
- package/framework/skills/laravel-best-practices/examples.md +31 -0
- package/framework/skills/laravel-best-practices/references/advanced-queries.md +106 -0
- package/framework/skills/laravel-best-practices/references/architecture.md +202 -0
- package/framework/skills/laravel-best-practices/references/blade-views.md +36 -0
- package/framework/skills/laravel-best-practices/references/caching.md +70 -0
- package/framework/skills/laravel-best-practices/references/collections.md +44 -0
- package/framework/skills/laravel-best-practices/references/config.md +73 -0
- package/framework/skills/laravel-best-practices/references/db-performance.md +192 -0
- package/framework/skills/laravel-best-practices/references/eloquent.md +148 -0
- package/framework/skills/laravel-best-practices/references/error-handling.md +72 -0
- package/framework/skills/laravel-best-practices/references/events-notifications.md +52 -0
- package/framework/skills/laravel-best-practices/references/http-client.md +160 -0
- package/framework/skills/laravel-best-practices/references/mail.md +27 -0
- package/framework/skills/laravel-best-practices/references/migrations.md +121 -0
- package/framework/skills/laravel-best-practices/references/passport.md +197 -0
- package/framework/skills/laravel-best-practices/references/pennant.md +61 -0
- package/framework/skills/laravel-best-practices/references/pest-testing.md +166 -0
- package/framework/skills/laravel-best-practices/references/pulse.md +196 -0
- package/framework/skills/laravel-best-practices/references/queue-jobs.md +144 -0
- package/framework/skills/laravel-best-practices/references/routing.md +99 -0
- package/framework/skills/laravel-best-practices/references/scheduling.md +39 -0
- package/framework/skills/laravel-best-practices/references/scout.md +176 -0
- package/framework/skills/laravel-best-practices/references/security.md +198 -0
- package/framework/skills/laravel-best-practices/references/spatie-laravel-backup.md +222 -0
- package/framework/skills/laravel-best-practices/references/spatie-laravel-permission.md +272 -0
- package/framework/skills/laravel-best-practices/references/spatie-medialibrary.md +672 -0
- package/framework/skills/laravel-best-practices/references/style.md +125 -0
- package/framework/skills/laravel-best-practices/references/tailwindcss.md +112 -0
- package/framework/skills/laravel-best-practices/references/testing.md +43 -0
- package/framework/skills/laravel-best-practices/references/validation.md +75 -0
- package/framework/skills/lavish/SKILL.md +67 -0
- package/framework/skills/lavish/examples.md +31 -0
- package/framework/skills/notion-mcp/SKILL.md +57 -0
- package/framework/skills/notion-mcp/examples.md +31 -0
- package/framework/skills/notion-mcp/references/comments.md +112 -0
- package/framework/skills/notion-mcp/references/databases.md +193 -0
- package/framework/skills/notion-mcp/references/pages.md +235 -0
- package/framework/skills/skill-creator/LICENSE.txt +202 -0
- package/framework/skills/skill-creator/SKILL.md +485 -0
- package/framework/skills/skill-creator/agents/analyzer.md +274 -0
- package/framework/skills/skill-creator/agents/comparator.md +202 -0
- package/framework/skills/skill-creator/agents/grader.md +223 -0
- package/framework/skills/skill-creator/assets/eval_review.html +146 -0
- package/framework/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/framework/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/framework/skills/skill-creator/examples.md +31 -0
- package/framework/skills/skill-creator/references/schemas.md +430 -0
- package/framework/skills/skill-creator/scripts/__init__.py +0 -0
- package/framework/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/framework/skills/skill-creator/scripts/generate_report.py +326 -0
- package/framework/skills/skill-creator/scripts/improve_description.py +247 -0
- package/framework/skills/skill-creator/scripts/package_skill.py +136 -0
- package/framework/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/framework/skills/skill-creator/scripts/run_eval.py +310 -0
- package/framework/skills/skill-creator/scripts/run_loop.py +328 -0
- package/framework/skills/skill-creator/scripts/utils.py +47 -0
- package/framework/styles/README.md +35 -0
- package/framework/styles/linear/DESIGN.md +478 -0
- package/framework/styles/linear/README.md +36 -0
- package/framework/styles/linear/assets/preview.jpg +0 -0
- package/framework/styles/raycast/DESIGN.md +495 -0
- package/framework/styles/raycast/README.md +35 -0
- package/framework/styles/raycast/assets/preview.jpg +0 -0
- package/package.json +33 -0
- package/src/agent-configs.js +96 -0
- package/src/catalog.js +145 -0
- package/src/cli.js +254 -0
- package/src/installer.js +303 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Logging Standard
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Define reusable backend engineering rules for logging decisions across projects. This standard is canonical guidance for related skills.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- All logs must be structured JSON: every event has `timestamp`, `level`, `logger`, `message`, `trace_id`, and `correlation_id`.
|
|
10
|
+
- Log levels follow strict semantics: ERROR for definite failures, WARN for unexpected-but-recoverable situations, INFO for significant lifecycle events, DEBUG for troubleshooting details, TRACE for step-by-step execution paths.
|
|
11
|
+
- Every request must carry a `correlation_id` generated at the ingress boundary and propagated to all downstream calls; include it in every request-scoped log line.
|
|
12
|
+
- Never log sensitive data: passwords, tokens, API keys, PII (email, phone, SSN), or payment card numbers; use a scrubber at the log sink level as a safety net.
|
|
13
|
+
- Production log level must be INFO or higher; DEBUG and TRACE must be toggleable at runtime without restart.
|
|
14
|
+
|
|
15
|
+
## Best Practices
|
|
16
|
+
|
|
17
|
+
- Log at entry and exit of every service boundary with duration: `"handling request"` / `"request complete (12ms)"`.
|
|
18
|
+
- Use structured key-value pairs instead of string interpolation: `{"event": "payment_failed", "amount": 5000, "currency": "USD"}` instead of `"payment failed for $50.00"`.
|
|
19
|
+
- Include actionable context in ERROR logs: the operation attempted, the input that caused the failure, and the error type; never log just the stack trace.
|
|
20
|
+
- Set log sampling at the trace level (not per-line) to preserve correlation; log the sample rate in the log metadata so consumers can adjust counts.
|
|
21
|
+
- Use asynchronous, non-blocking log appenders to avoid log writes from blocking application threads.
|
|
22
|
+
|
|
23
|
+
## Anti-patterns
|
|
24
|
+
|
|
25
|
+
- Logging in tight loops or hot paths (every database query, every iteration); log at operation granularity, not per-element.
|
|
26
|
+
- Using `print()` or `console.log()` instead of a structured logger; they bypass routing, formatting, and correlation.
|
|
27
|
+
- Logging the same event at multiple levels (both INFO and DEBUG for the same call).
|
|
28
|
+
- Including stack traces in INFO or WARN logs; stack traces belong in ERROR logs only.
|
|
29
|
+
- Sending debug-level logs to production with no runtime toggle; they bury signal in noise.
|
|
30
|
+
|
|
31
|
+
## Checklist
|
|
32
|
+
|
|
33
|
+
- [ ] All logs are structured JSON with standard fields (`timestamp`, `level`, `message`, `trace_id`).
|
|
34
|
+
- [ ] Correlation IDs are propagated from ingress through all downstream calls.
|
|
35
|
+
- [ ] No sensitive data (PII, secrets, tokens) appears in any log line.
|
|
36
|
+
- [ ] Production log level is configured to INFO; DEBUG/TRACE is toggleable at runtime.
|
|
37
|
+
- [ ] Hot paths have been reviewed to avoid logging in tight loops.
|
|
38
|
+
|
|
39
|
+
## Related Skills
|
|
40
|
+
|
|
41
|
+
- `skills/backend-engineer/SKILL.md`
|
|
42
|
+
- `skills/code-review/SKILL.md`
|
|
43
|
+
- `skills/backend-best-practices/references/observability.md`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Naming Standard
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Define reusable backend engineering rules for naming decisions across projects. This standard is canonical guidance for related skills.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- Follow language conventions: Go uses `camelCase` for exported, `camelCase` for unexported; Python/JS uses `snake_case` for everything; Java/C#/TypeScript uses `PascalCase` for types and `camelCase` for methods/variables; SQL uses `snake_case`.
|
|
10
|
+
- File names match the primary export: `user_repository.go`, `order_handler.py`, `PaymentService.ts`.
|
|
11
|
+
- Boolean variables and parameters must use a predicate prefix: `is_`, `has_`, `can_`, `should_`, `was_` (e.g., `is_active`, `has_permission`).
|
|
12
|
+
- Classes/types must be nouns or noun phrases; functions/methods must be verbs or verb phrases.
|
|
13
|
+
- Abbreviations must be in the project glossary; avoid ambiguous or non-standard abbreviations (`cust` for customer, `addr` for address, `calc` for calculate).
|
|
14
|
+
|
|
15
|
+
## Best Practices
|
|
16
|
+
|
|
17
|
+
- Name things by what they mean in the business domain, not by their implementation: `InvoiceRepository` not `MySQLInvoiceRepo`, `calculateDiscount` not `applyFormula`.
|
|
18
|
+
- Use consistent suffixes for similar concerns: `Factory`, `Repository`, `Service`, `Controller`, `DTO`, `Mapper`.
|
|
19
|
+
- Keep names proportional to scope: short names for small scopes (`i` for loop index), descriptive names for wide scopes (`calculateMonthlySubscriptionRevenue`).
|
|
20
|
+
- Rename aggressively when code reveals a clearer abstraction; naming debt compounds faster than any other technical debt.
|
|
21
|
+
- Group related constants and enums with a shared prefix: `OrderStatus.Pending`, `OrderStatus.Shipped`, `OrderStatus.Delivered`.
|
|
22
|
+
|
|
23
|
+
## Anti-patterns
|
|
24
|
+
|
|
25
|
+
- Hungarian notation or type-encoding in names (`strName`, `intCount`, `objUser`); use the type system instead.
|
|
26
|
+
- Name stuttering: `OrderService.getOrder()`, `UserEntity.getId()`, `Invoice.invoiceNumber`.
|
|
27
|
+
- Single-letter names outside of loop variables, throwaway lambdas, or mathematical contexts.
|
|
28
|
+
- Naming things after the person who wrote it or inside jokes; names must be meaningful to any future reader.
|
|
29
|
+
- Using the same term for different concepts (`Account` for both user accounts and financial accounts in the same system).
|
|
30
|
+
|
|
31
|
+
## Checklist
|
|
32
|
+
|
|
33
|
+
- [ ] Names follow the language-appropriate casing convention consistently.
|
|
34
|
+
- [ ] Boolean variables use `is_`/`has_`/`can_` prefix.
|
|
35
|
+
- [ ] No stuttering or Hungarian notation in the codebase.
|
|
36
|
+
- [ ] All abbreviations are in the project glossary.
|
|
37
|
+
- [ ] Renames are applied when code evolves; naming debt is not accumulated.
|
|
38
|
+
|
|
39
|
+
## Related Skills
|
|
40
|
+
|
|
41
|
+
- `skills/backend-engineer/SKILL.md`
|
|
42
|
+
- `skills/code-review/SKILL.md`
|
|
43
|
+
- `skills/backend-best-practices/references/refactoring.md`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Observability Standard
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Define reusable backend engineering rules for observability decisions across projects. This standard is canonical guidance for related skills.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- Every service must expose three endpoint types: `/healthz` (liveness — is the process alive?), `/readyz` (readiness — can it serve traffic?), and `/metrics` (prometheus format).
|
|
10
|
+
- Define at least one SLI per service dependency (latency, error rate, throughput, saturation) with an SLO target; record SLO compliance as a metric.
|
|
11
|
+
- Every production alert must have a runbook link and be actionable; pages for symptoms, not causes, and must fire before the SLO burn rate violates the error budget.
|
|
12
|
+
- Use three metric types: Counter (cumulative, only increases), Gauge (point-in-time value), Histogram (latency/size distributions with configurable buckets).
|
|
13
|
+
- Trace every request from ingress to egress with OpenTelemetry; sample at head (consistent per trace_id) with a minimum 5% rate in production.
|
|
14
|
+
|
|
15
|
+
## Best Practices
|
|
16
|
+
|
|
17
|
+
- Keep metric cardinality bounded: label values must have a known, finite set (e.g., `status_code`, `endpoint`, `region`); never put user IDs, request IDs, or unbounded values in labels.
|
|
18
|
+
- Build dashboards in tiers: Tier 1 (on-call, red/green, ~5 graphs), Tier 2 (team, weekly review, ~15 graphs), Tier 3 (deep-dive, ad-hoc).
|
|
19
|
+
- Use RED metrics for request-driven services (Rate, Errors, Duration) and USE metrics for resources (Utilization, Saturation, Errors).
|
|
20
|
+
- Set up synthetic probes from outside the cluster to measure real user-facing latency independently of internal metrics.
|
|
21
|
+
- Conduct a quarterly SLO review: adjust targets, retire unused alerts, validate runbooks against actual incidents.
|
|
22
|
+
|
|
23
|
+
## Anti-patterns
|
|
24
|
+
|
|
25
|
+
- Alerting on every 5xx without aggregation or burn-rate logic; one noisy alert trains everyone to ignore it.
|
|
26
|
+
- Dashboards with dozens of unrelated graphs that nobody looks at; prefer focused views owned by specific teams.
|
|
27
|
+
- Adding high-cardinality labels (user_id, email, session_id) to metrics; use logging for individual entities, metrics for aggregates.
|
|
28
|
+
- Deploying without metrics or tracing, then trying to add observability retroactively during an incident.
|
|
29
|
+
- Using liveness probes that depend on downstream services; a failing database should cause readiness to fail, but the process should stay alive.
|
|
30
|
+
|
|
31
|
+
## Checklist
|
|
32
|
+
|
|
33
|
+
- [ ] `/healthz`, `/readyz`, and `/metrics` endpoints exist and are tested.
|
|
34
|
+
- [ ] SLOs are defined per service dependency and recorded as metrics.
|
|
35
|
+
- [ ] Alerts use burn-rate logic, have runbook links, and are pager-worthy.
|
|
36
|
+
- [ ] Metric label cardinality is bounded and reviewed for explosion risk.
|
|
37
|
+
- [ ] Distributed tracing is configured with consistent sampling across services.
|
|
38
|
+
|
|
39
|
+
## Related Skills
|
|
40
|
+
|
|
41
|
+
- `skills/backend-engineer/SKILL.md`
|
|
42
|
+
- `skills/code-review/SKILL.md`
|
|
43
|
+
- `skills/backend-best-practices/references/observability.md`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Performance Standard
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Define reusable backend engineering rules for performance decisions across projects. This standard is canonical guidance for related skills.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- Every endpoint must have a latency budget (p50, p95, p99) documented before implementation; any change that exceeds the budget must be justified and approved.
|
|
10
|
+
- Profile before optimizing: measure with production-representative load before any performance change; never optimize based on intuition alone.
|
|
11
|
+
- Cache only when measured latency or load is unacceptable; document the cache key, TTL, invalidation strategy, and failure behavior (cache miss degrades to origin).
|
|
12
|
+
- Prevent N+1 queries by eager-loading relationships; use batching for bulk operations; review all ORM-generated queries before shipping.
|
|
13
|
+
- Use connection pooling for databases and HTTP clients; configure pool sizes based on measured concurrency, not defaults.
|
|
14
|
+
|
|
15
|
+
## Best Practices
|
|
16
|
+
|
|
17
|
+
- Load test every new endpoint against a production-sized dataset before shipping; include ramp-up, peak, and sustained load phases.
|
|
18
|
+
- Choose caching layer by data characteristics: in-process for hot, rarely-changing data (config, feature flags); Redis/Memcached for shared, high-read data; CDN for static and cacheable API responses.
|
|
19
|
+
- Use lazy loading sparingly and only when the optional data is rarely accessed; prefer explicit fetch methods (e.g., `loadUserWithOrders`) over transparent proxies.
|
|
20
|
+
- Set read and write timeouts on every outbound call (HTTP, DB, queue, cache); a missing timeout is a production incident waiting to happen.
|
|
21
|
+
- Batch database writes in transactions (not per-row inserts); prefer bulk insert/upsert operations where the API supports them.
|
|
22
|
+
|
|
23
|
+
## Anti-patterns
|
|
24
|
+
|
|
25
|
+
- Adding a cache before measuring the actual performance problem; caching adds complexity, staleness risks, and invalidation bugs.
|
|
26
|
+
- Turning every field into a database index; indexes speed reads but slow writes and consume storage. Index based on query patterns, not speculation.
|
|
27
|
+
- Using eager loading for every relationship "just in case"; load only the data the current code path needs.
|
|
28
|
+
- Premature denormalization; normalize first, then denormalize only when profiling proves a performance need.
|
|
29
|
+
- Synchronous in-process computation of expensive results that could be precomputed or cached.
|
|
30
|
+
|
|
31
|
+
## Checklist
|
|
32
|
+
|
|
33
|
+
- [ ] Latency budgets are defined for every endpoint before implementation.
|
|
34
|
+
- [ ] Profiling data (not guesses) motivated each optimization decision.
|
|
35
|
+
- [ ] Caching strategy is documented including key structure, TTL, and invalidation.
|
|
36
|
+
- [ ] ORM queries are reviewed and no N+1 patterns exist.
|
|
37
|
+
- [ ] Connection pools and timeouts are configured on all outbound clients.
|
|
38
|
+
|
|
39
|
+
## Related Skills
|
|
40
|
+
|
|
41
|
+
- `skills/backend-engineer/SKILL.md`
|
|
42
|
+
- `skills/code-review/SKILL.md`
|
|
43
|
+
- `skills/backend-best-practices/references/performance.md`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Pull Requests Standard
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Define reusable backend engineering rules for pull request decisions across projects. This standard is canonical guidance for related skills.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- PRs must be smaller than 400 lines of changed code (excluding generated files, lockfiles, and tests for the change); split larger changes into stacked or sequential PRs.
|
|
10
|
+
- Branch names follow `<type>/<description>`: `feat/add-invoice-export`, `fix/null-pointer-on-login`, `refactor/order-service`, `chore/upgrade-go-1.21`.
|
|
11
|
+
- Title must follow Conventional Commits: `type(scope): description` (e.g., `feat(payments): add idempotency key support`).
|
|
12
|
+
- Description must include: what problem this solves, how it solves it, any breaking changes or migration steps, and links to related issues/ADRs.
|
|
13
|
+
- Separate behavior changes from refactors into distinct commits within the same PR or into separate PRs; a single commit must not mix both.
|
|
14
|
+
|
|
15
|
+
## Best Practices
|
|
16
|
+
|
|
17
|
+
- Self-review your PR before requesting review: check for TODOs, debug code, missing error handling, and correct test coverage.
|
|
18
|
+
- Request specific types of review: "focus on error handling in the payment flow" or "check the migration script for backward compatibility".
|
|
19
|
+
- Blocking changes (API contract changes, schema migrations, security fixes) require two approvals; non-blocking changes require one.
|
|
20
|
+
- Respond to every review comment; mark resolved discussions with a brief explanation of the resolution.
|
|
21
|
+
- Squash-merge into the main branch, using the PR title as the commit message; preserve co-author attribution.
|
|
22
|
+
|
|
23
|
+
## Anti-patterns
|
|
24
|
+
|
|
25
|
+
- PRs that refactor a codebase while adding a feature in the same diff; they cannot be reviewed or reverted independently.
|
|
26
|
+
- Review comments left unaddressed for more than 24 hours without communication; they block the author and the team.
|
|
27
|
+
- Requesting review before CI passes; reviewers should not waste time on code that fails tests.
|
|
28
|
+
- Leaving "LGTM" or approval without actually reading through the diff; code review catches bugs, not rubber stamps.
|
|
29
|
+
- Merging PRs with failing CI or unresolved conversations; every merge commit to main must be green.
|
|
30
|
+
|
|
31
|
+
## Checklist
|
|
32
|
+
|
|
33
|
+
- [ ] PR is under 400 lines (excluding generated files and tests).
|
|
34
|
+
- [ ] Title follows Conventional Commits format.
|
|
35
|
+
- [ ] Description includes problem, solution, migration steps, and issue links.
|
|
36
|
+
- [ ] CI is green before requesting review.
|
|
37
|
+
- [ ] Refactors and behavior changes are in separate commits or PRs.
|
|
38
|
+
|
|
39
|
+
## Related Skills
|
|
40
|
+
|
|
41
|
+
- `skills/backend-engineer/SKILL.md`
|
|
42
|
+
- `skills/code-review/SKILL.md`
|
|
43
|
+
- `skills/pull-request/SKILL.md`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Security Standard
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Define reusable backend engineering rules for security decisions across projects. This standard is canonical guidance for related skills.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- Authenticate every request except explicitly public endpoints; use OAuth 2.0 / OpenID Connect with short-lived access tokens (15-60 min) and refresh tokens.
|
|
10
|
+
- Authorize every action using RBAC or ABAC at the service layer, not just at the API gateway; enforce least privilege per operation.
|
|
11
|
+
- Never store secrets (API keys, DB passwords, signing keys) in code, config files committed to git, or environment variables on shared infrastructure; use a secrets manager (Vault, AWS Secrets Manager, GCP Secret Manager).
|
|
12
|
+
- Validate, sanitize, and type-check all input at the boundary; use an allowlist approach for permitted characters, values, and lengths where possible.
|
|
13
|
+
- Encrypt all data in transit with TLS 1.2 minimum (prefer 1.3); encrypt all sensitive data at rest with AES-256 and envelope encryption.
|
|
14
|
+
|
|
15
|
+
## Best Practices
|
|
16
|
+
|
|
17
|
+
- Output-encode all dynamic data rendered in HTML, JSON, or XML context to prevent injection (XSS, SSTI, LDAP injection); use context-aware encoders.
|
|
18
|
+
- Implement CSRF protection for cookie-authenticated endpoints; use SameSite=Strict cookies and CSRF tokens for state-changing operations.
|
|
19
|
+
- Run dependency scanning (OWASP Dependency-Check, Snyk, Dependabot) on every commit; fix critical and high-severity vulnerabilities before merging.
|
|
20
|
+
- Set security headers: `Content-Security-Policy`, `X-Content-Type-Options: nosniff`, `Strict-Transport-Security`, `X-Frame-Options: DENY`.
|
|
21
|
+
- Log all authentication failures and authorization denials for audit; never store plaintext passwords — use bcrypt, Argon2, or PBKDF2 with a work factor.
|
|
22
|
+
|
|
23
|
+
## Anti-patterns
|
|
24
|
+
|
|
25
|
+
- Relying on client-side validation alone; all security controls must be enforced server-side.
|
|
26
|
+
- Using JWTs without validating the signature, expiration (`exp`), issuer (`iss`), or audience (`aud`).
|
|
27
|
+
- Returning stack traces or internal error details in API responses; use generic messages and log the details internally.
|
|
28
|
+
- Hard-coded API keys or database passwords in any file, including test files and CI configuration.
|
|
29
|
+
- Implementing custom cryptography; use well-audited, standard libraries (Tink, libsodium, JCA, Bouncy Castle).
|
|
30
|
+
|
|
31
|
+
## Checklist
|
|
32
|
+
|
|
33
|
+
- [ ] Authentication and authorization are enforced at the service layer, not just the gateway.
|
|
34
|
+
- [ ] No secrets are in source code, config files, or CI variables; a secrets manager is used.
|
|
35
|
+
- [ ] All inputs are validated and sanitized at the boundary.
|
|
36
|
+
- [ ] TLS 1.2+ is enforced for all in-transit data; sensitive data at rest is AES-256 encrypted.
|
|
37
|
+
- [ ] Dependency scanning is integrated into CI and critical/high findings are resolved before merge.
|
|
38
|
+
|
|
39
|
+
## Related Skills
|
|
40
|
+
|
|
41
|
+
- `skills/backend-engineer/SKILL.md`
|
|
42
|
+
- `skills/code-review/SKILL.md`
|
|
43
|
+
- `skills/backend-best-practices/references/security.md`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Testing Standard
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Define reusable backend engineering rules for testing decisions across projects. This standard is canonical guidance for related skills.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- Unit tests cover domain logic in isolation: mock or stub every out-of-process dependency (database, network, filesystem); run in < 1ms per test.
|
|
10
|
+
- Integration tests cover real adapter behavior: use test containers or ephemeral databases for repositories, message producers, and HTTP clients; run against a real instance.
|
|
11
|
+
- Contract tests verify provider-consumer API agreements: use Pact or Spring Cloud Contract for producer-side; run in CI as a blocking check.
|
|
12
|
+
- E2E tests cover critical user journeys only: happy path for the top 3-5 business flows; never attempt comprehensive e2e coverage.
|
|
13
|
+
- All tests must be deterministic: no shared mutable state, no sleep/retry for timing, no dependency on test execution order.
|
|
14
|
+
|
|
15
|
+
## Best Practices
|
|
16
|
+
|
|
17
|
+
- Name tests following `Given_When_Then` or `UnitOfWork_StateUnderTest_ExpectedBehavior`: `GivenEmptyCart_WhenCheckout_ThrowsValidationError`.
|
|
18
|
+
- Follow the Test Pyramid: 70% unit, 20% integration, 10% contract/e2e; CI must run unit and integration on every push, e2e on merge to main.
|
|
19
|
+
- Use dependency injection to support test doubles at the port boundary; prefer fakes (in-memory implementations) over mocks for ports that have simple in-memory versions.
|
|
20
|
+
- Write a test for every bug fix before applying the fix; the added test proves the bug exists and prevents regression.
|
|
21
|
+
- Aim for > 80% line coverage on domain logic and > 60% on adapters; coverage is a floor, not a target — test for correctness, not percentages.
|
|
22
|
+
|
|
23
|
+
## Anti-patterns
|
|
24
|
+
|
|
25
|
+
- Testing framework internals (e.g., mocking the ORM and asserting SQL strings) instead of testing behavior through the public API.
|
|
26
|
+
- Flaky tests that pass intermittently due to timing, ordering, or shared state; tag them and fix immediately or remove them — they erode trust in the suite entirely.
|
|
27
|
+
- Writing e2e tests for every code path; e2e is for validation of critical flows only — most bugs are caught by unit and integration tests at a fraction of the cost.
|
|
28
|
+
- Tests that share fixtures or database state across test files; each test must set up and tear down its own state.
|
|
29
|
+
- Asserting implementation details (private methods, internal state) instead of observable behavior; tests should break when behavior changes, not when code is refactored.
|
|
30
|
+
|
|
31
|
+
## Checklist
|
|
32
|
+
|
|
33
|
+
- [ ] Unit tests isolate domain logic with mocked/stubbed dependencies.
|
|
34
|
+
- [ ] Integration tests run against real infrastructure (test containers or ephemeral instances).
|
|
35
|
+
- [ ] Contract tests exist for all provider-consumer API boundaries.
|
|
36
|
+
- [ ] No flaky tests — verified by running the suite 10 times locally.
|
|
37
|
+
- [ ] Coverage meets thresholds: >80% domain, >60% adapters.
|
|
38
|
+
|
|
39
|
+
## Related Skills
|
|
40
|
+
|
|
41
|
+
- `skills/backend-engineer/SKILL.md`
|
|
42
|
+
- `skills/code-review/SKILL.md`
|
|
43
|
+
- `skills/backend-best-practices/references/testing.md`
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Architecture Decision Record
|
|
2
|
+
|
|
3
|
+
## Title
|
|
4
|
+
Short decision title (e.g., "Use PostgreSQL for Order Storage")
|
|
5
|
+
|
|
6
|
+
## Status
|
|
7
|
+
Proposed | Accepted | Deprecated | Superseded
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
What is the problem, constraint, or opportunity? What forces are at play?
|
|
11
|
+
|
|
12
|
+
## Decision
|
|
13
|
+
What was decided? Be specific about the choice.
|
|
14
|
+
|
|
15
|
+
## Consequences
|
|
16
|
+
What becomes easier or harder? What tradeoffs were accepted?
|
|
17
|
+
|
|
18
|
+
## Alternatives Considered
|
|
19
|
+
| Option | Why rejected |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| Alternative A | Fails because... |
|
|
22
|
+
| Alternative B | Fails because... |
|
|
23
|
+
|
|
24
|
+
## Compliance
|
|
25
|
+
How will adherence to this decision be verified?
|
|
26
|
+
|
|
27
|
+
## Notes
|
|
28
|
+
References, related ADRs, date, author.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# API Specification
|
|
2
|
+
|
|
3
|
+
## Endpoint
|
|
4
|
+
`<METHOD> /<path>`
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
What does this endpoint do in business terms?
|
|
8
|
+
|
|
9
|
+
## Request
|
|
10
|
+
|
|
11
|
+
### Headers
|
|
12
|
+
| Header | Required | Description |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
|
|
15
|
+
### Path Parameters
|
|
16
|
+
| Parameter | Type | Description |
|
|
17
|
+
| --- | --- | --- |
|
|
18
|
+
|
|
19
|
+
### Query Parameters
|
|
20
|
+
| Parameter | Type | Required | Default | Description |
|
|
21
|
+
| --- | --- | --- | --- | --- |
|
|
22
|
+
|
|
23
|
+
### Body (for POST/PUT/PATCH)
|
|
24
|
+
```json
|
|
25
|
+
{ "example": "request body" }
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Authorization
|
|
29
|
+
What auth method is required? What scopes or permissions?
|
|
30
|
+
|
|
31
|
+
## Response
|
|
32
|
+
|
|
33
|
+
### Status Codes
|
|
34
|
+
| Code | Condition | Body shape |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
|
|
37
|
+
### Success Body
|
|
38
|
+
```json
|
|
39
|
+
{ "example": "response body" }
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Error Body
|
|
43
|
+
```json
|
|
44
|
+
{ "error": { "code": "...", "message": "...", "details": [...] } }
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Rate Limits
|
|
48
|
+
Limit, window, retry-after header behavior.
|
|
49
|
+
|
|
50
|
+
## Examples
|
|
51
|
+
|
|
52
|
+
### Request
|
|
53
|
+
|
|
54
|
+
### Response
|
|
55
|
+
|
|
56
|
+
### Error
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Design Document
|
|
2
|
+
|
|
3
|
+
## Problem Statement
|
|
4
|
+
What problem is being solved? What is the user-visible impact?
|
|
5
|
+
|
|
6
|
+
## Scope
|
|
7
|
+
In scope / out of scope.
|
|
8
|
+
|
|
9
|
+
## Proposed Solution
|
|
10
|
+
High-level approach with key design decisions.
|
|
11
|
+
|
|
12
|
+
## Detailed Design
|
|
13
|
+
|
|
14
|
+
### Data Model
|
|
15
|
+
Entities, relationships, constraints.
|
|
16
|
+
|
|
17
|
+
### API / Contracts
|
|
18
|
+
Interfaces this component exposes or consumes.
|
|
19
|
+
|
|
20
|
+
### Behavior
|
|
21
|
+
Key algorithms, state machines, workflow steps.
|
|
22
|
+
|
|
23
|
+
### Failure Handling
|
|
24
|
+
What happens when each dependency fails?
|
|
25
|
+
|
|
26
|
+
### Observability
|
|
27
|
+
Logs, metrics, traces, alerts, dashboards.
|
|
28
|
+
|
|
29
|
+
## Migration Plan
|
|
30
|
+
Steps to go from current state to target state.
|
|
31
|
+
|
|
32
|
+
## Rollback Plan
|
|
33
|
+
How to revert at each stage.
|
|
34
|
+
|
|
35
|
+
## Test Plan
|
|
36
|
+
Unit, integration, contract, and E2E coverage.
|
|
37
|
+
|
|
38
|
+
## Open Questions
|
|
39
|
+
What is not yet decided?
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Incident Report
|
|
2
|
+
|
|
3
|
+
## Severity
|
|
4
|
+
Critical | Major | Minor
|
|
5
|
+
|
|
6
|
+
## Duration
|
|
7
|
+
Start: <datetime> End: <datetime> Total: <duration>
|
|
8
|
+
|
|
9
|
+
## Detection
|
|
10
|
+
How was the incident detected? Monitoring, alert, user report?
|
|
11
|
+
|
|
12
|
+
## Timeline
|
|
13
|
+
| Time | Event |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| HH:MM | What happened |
|
|
16
|
+
| HH:MM | What was done |
|
|
17
|
+
|
|
18
|
+
## Root Cause
|
|
19
|
+
One paragraph describing the underlying cause.
|
|
20
|
+
|
|
21
|
+
## Impact
|
|
22
|
+
Users affected, data lost, revenue impact, SLA breach.
|
|
23
|
+
|
|
24
|
+
## Response
|
|
25
|
+
What was done to mitigate and resolve.
|
|
26
|
+
|
|
27
|
+
## Lessons Learned
|
|
28
|
+
|
|
29
|
+
### What went well
|
|
30
|
+
|
|
31
|
+
### What went wrong
|
|
32
|
+
|
|
33
|
+
### Where we got lucky
|
|
34
|
+
|
|
35
|
+
## Action Items
|
|
36
|
+
- [ ] Owner: Prevent recurrence (Specific change to prevent this root cause)
|
|
37
|
+
- [ ] Owner: Improve detection (Monitoring, alert, or test that would catch this faster)
|
|
38
|
+
- [ ] Owner: Improve response (Runbook, automation, or process change)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Postmortem
|
|
2
|
+
|
|
3
|
+
## Incident Summary
|
|
4
|
+
One paragraph describing what happened and the impact.
|
|
5
|
+
|
|
6
|
+
## Severity
|
|
7
|
+
Critical | Major | Minor
|
|
8
|
+
|
|
9
|
+
## Timeline
|
|
10
|
+
| Time (UTC) | Event |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| | |
|
|
13
|
+
|
|
14
|
+
## Detection
|
|
15
|
+
How was this discovered? By whom? How long after introduction?
|
|
16
|
+
|
|
17
|
+
## Root Cause Analysis
|
|
18
|
+
|
|
19
|
+
### Trigger
|
|
20
|
+
What event started the chain?
|
|
21
|
+
|
|
22
|
+
### Contributing Factors
|
|
23
|
+
What conditions made it possible?
|
|
24
|
+
|
|
25
|
+
### Why Analysis
|
|
26
|
+
1. Why did X happen? Because...
|
|
27
|
+
2. Why did Y happen? Because...
|
|
28
|
+
|
|
29
|
+
## Impact
|
|
30
|
+
Metric changes, user impact, duration, cost.
|
|
31
|
+
|
|
32
|
+
## Mitigation
|
|
33
|
+
What was done to stop the incident? How long did it take?
|
|
34
|
+
|
|
35
|
+
## Corrective Actions
|
|
36
|
+
- [ ] Type: Short description (owner, tracking link)
|
|
37
|
+
- [ ] Type: Short description (owner, tracking link)
|
|
38
|
+
Types: Prevent recurrence | Improve detection | Improve mitigation | Process improvement
|
|
39
|
+
|
|
40
|
+
## Appendix
|
|
41
|
+
Links to dashboards, logs, PRs, related documents.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Pull Request
|
|
2
|
+
|
|
3
|
+
## Problem
|
|
4
|
+
What does this change solve? Link to issue/ticket.
|
|
5
|
+
|
|
6
|
+
## Solution
|
|
7
|
+
High-level approach. What changed and why this approach was chosen.
|
|
8
|
+
|
|
9
|
+
## Changes
|
|
10
|
+
- `path/to/file`: what changed and why
|
|
11
|
+
- `path/to/file`: what changed and why
|
|
12
|
+
|
|
13
|
+
## Testing
|
|
14
|
+
- [ ] Unit tests added/updated
|
|
15
|
+
- [ ] Integration tests added/updated
|
|
16
|
+
- [ ] Manual testing performed
|
|
17
|
+
- [ ] Test evidence attached or linked
|
|
18
|
+
|
|
19
|
+
## Risks
|
|
20
|
+
- Migration: [yes/no] - [details]
|
|
21
|
+
- Config change: [yes/no] - [details]
|
|
22
|
+
- Breaking change: [yes/no] - [details]
|
|
23
|
+
- Rollback complexity: [simple/complex]
|
|
24
|
+
|
|
25
|
+
## Deployment
|
|
26
|
+
- Feature flag: [yes/no - name]
|
|
27
|
+
- Migration order: [what runs first]
|
|
28
|
+
- Monitoring: [what to watch after deploy]
|
|
29
|
+
|
|
30
|
+
## Rollback
|
|
31
|
+
Steps to revert this change safely.
|
|
32
|
+
|
|
33
|
+
## Reviewer Notes
|
|
34
|
+
What the reviewer should focus on, what is intentionally out of scope.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Runbook
|
|
2
|
+
|
|
3
|
+
## Service / Component
|
|
4
|
+
Name and brief description.
|
|
5
|
+
|
|
6
|
+
## Prerequisites
|
|
7
|
+
Access, tools, credentials needed.
|
|
8
|
+
|
|
9
|
+
## Normal Operations
|
|
10
|
+
|
|
11
|
+
### Start / Restart
|
|
12
|
+
Steps to start or restart the service.
|
|
13
|
+
|
|
14
|
+
### Stop
|
|
15
|
+
Steps to gracefully stop the service.
|
|
16
|
+
|
|
17
|
+
### Health Check
|
|
18
|
+
How to verify the service is healthy.
|
|
19
|
+
|
|
20
|
+
## Diagnosis
|
|
21
|
+
|
|
22
|
+
### Symptoms and Likely Causes
|
|
23
|
+
| Symptom | Likely cause | Check |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| | | |
|
|
26
|
+
|
|
27
|
+
### Key Metrics and Logs
|
|
28
|
+
What to check, where to find it, what is normal vs abnormal.
|
|
29
|
+
|
|
30
|
+
### Debug Commands
|
|
31
|
+
Useful commands for inspection.
|
|
32
|
+
|
|
33
|
+
## Incident Response
|
|
34
|
+
|
|
35
|
+
### Severity Levels
|
|
36
|
+
What qualifies as what severity.
|
|
37
|
+
|
|
38
|
+
### Mitigation Steps
|
|
39
|
+
Ordered steps to reduce impact.
|
|
40
|
+
|
|
41
|
+
### Escalation
|
|
42
|
+
Who to contact and when.
|
|
43
|
+
|
|
44
|
+
## Recovery
|
|
45
|
+
Steps to restore normal operation after mitigation.
|
|
46
|
+
|
|
47
|
+
## Appendix
|
|
48
|
+
Links to dashboards, playbooks, design docs, team contacts.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Engineering Task
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
What needs to be done in one sentence.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Why is this needed? What is the user or system impact?
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Functional requirement 1
|
|
11
|
+
- Functional requirement 2
|
|
12
|
+
- Non-functional requirement (performance, security, observability)
|
|
13
|
+
|
|
14
|
+
## Out of Scope
|
|
15
|
+
Work that is intentionally excluded.
|
|
16
|
+
|
|
17
|
+
## Technical Notes
|
|
18
|
+
Relevant architecture, existing code paths, data model details.
|
|
19
|
+
|
|
20
|
+
## Verification
|
|
21
|
+
How will this task be verified as complete?
|
|
22
|
+
- Test criteria
|
|
23
|
+
- Review criteria
|
|
24
|
+
- Deployment criteria
|
|
25
|
+
|
|
26
|
+
## Related
|
|
27
|
+
Links to issues, PRs, docs, designs.
|