@schneiderjoseph/devia 0.1.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/AGENTS.md +149 -0
- package/CHANGELOG.md +78 -0
- package/GOVERNANCE.md +51 -0
- package/LEVELS.md +78 -0
- package/LICENSE +21 -0
- package/MATURITY.md +79 -0
- package/MEMORY.md +122 -0
- package/MIGRATION.md +62 -0
- package/PRINCIPLES.md +110 -0
- package/README.md +125 -0
- package/REFERENCES.md +30 -0
- package/VERSION +5 -0
- package/bin/devia.mjs +13 -0
- package/checklists/README.md +39 -0
- package/checklists/design/accessibility-review.md +11 -0
- package/checklists/design/design-to-code-review.md +10 -0
- package/checklists/design/responsive-review.md +7 -0
- package/checklists/design/ui-review.md +8 -0
- package/checklists/design/ux-review.md +10 -0
- package/checklists/engineering/accessibility.md +8 -0
- package/checklists/engineering/api.md +12 -0
- package/checklists/engineering/architecture.md +8 -0
- package/checklists/engineering/database.md +11 -0
- package/checklists/engineering/devops.md +9 -0
- package/checklists/engineering/disaster-recovery.md +9 -0
- package/checklists/engineering/frontend.md +9 -0
- package/checklists/engineering/incident.md +9 -0
- package/checklists/engineering/performance.md +7 -0
- package/checklists/engineering/production.md +26 -0
- package/checklists/engineering/release.md +17 -0
- package/checklists/engineering/security.md +33 -0
- package/checklists/engineering/testing.md +8 -0
- package/compliance/COVERAGE.md +46 -0
- package/compliance/REQUIREMENTS.md +8 -0
- package/compliance/TRACEABILITY.md +160 -0
- package/compliance/WAIVERS.md +13 -0
- package/package.json +74 -0
- package/rules/LIFECYCLE.md +16 -0
- package/rules/README.md +166 -0
- package/rules/accessibility/A11Y-001.md +42 -0
- package/rules/accessibility/A11Y-002.md +41 -0
- package/rules/accessibility/A11Y-003.md +40 -0
- package/rules/accessibility/A11Y-004.md +40 -0
- package/rules/accessibility/A11Y-005.md +39 -0
- package/rules/accessibility/A11Y-006.md +42 -0
- package/rules/accessibility/A11Y-007.md +39 -0
- package/rules/accessibility/A11Y-008.md +40 -0
- package/rules/accessibility/A11Y-009.md +41 -0
- package/rules/accessibility/A11Y-010.md +40 -0
- package/rules/accessibility/A11Y-011.md +39 -0
- package/rules/accessibility/A11Y-012.md +39 -0
- package/rules/agent/AGT-001.md +42 -0
- package/rules/agent/AGT-002.md +39 -0
- package/rules/agent/AGT-003.md +38 -0
- package/rules/agent/AGT-004.md +39 -0
- package/rules/agent/AGT-005.md +38 -0
- package/rules/agent/AGT-006.md +38 -0
- package/rules/agent/AGT-007.md +38 -0
- package/rules/agent/AGT-008.md +38 -0
- package/rules/agent/AGT-009.md +39 -0
- package/rules/agent/AGT-010.md +38 -0
- package/rules/agent/AGT-011.md +38 -0
- package/rules/ai/AI-001.md +44 -0
- package/rules/ai/AI-002.md +39 -0
- package/rules/ai/AI-003.md +40 -0
- package/rules/ai/AI-004.md +39 -0
- package/rules/ai/AI-005.md +38 -0
- package/rules/api/API-001.md +39 -0
- package/rules/api/API-002.md +39 -0
- package/rules/api/API-003.md +39 -0
- package/rules/api/API-004.md +38 -0
- package/rules/api/API-005.md +39 -0
- package/rules/api/API-006.md +40 -0
- package/rules/architecture/ARC-001.md +41 -0
- package/rules/architecture/ARC-002.md +43 -0
- package/rules/architecture/ARC-003.md +43 -0
- package/rules/architecture/ARC-004.md +40 -0
- package/rules/architecture/ARC-005.md +39 -0
- package/rules/architecture/ARC-006.md +39 -0
- package/rules/components/CMP-001.md +39 -0
- package/rules/components/CMP-002.md +38 -0
- package/rules/components/CMP-003.md +39 -0
- package/rules/components/CMP-004.md +40 -0
- package/rules/components/CMP-005.md +39 -0
- package/rules/content/CNT-001.md +39 -0
- package/rules/data-display/DATA-001.md +39 -0
- package/rules/data-display/DATA-002.md +39 -0
- package/rules/data-display/DATA-003.md +40 -0
- package/rules/data-display/DATA-004.md +40 -0
- package/rules/database/DB-001.md +43 -0
- package/rules/database/DB-002.md +38 -0
- package/rules/database/DB-003.md +40 -0
- package/rules/database/DB-004.md +44 -0
- package/rules/database/DB-005.md +39 -0
- package/rules/database/DB-006.md +38 -0
- package/rules/database/DB-007.md +40 -0
- package/rules/database/DB-008.md +40 -0
- package/rules/design-system/DS-001.md +39 -0
- package/rules/design-system/DS-002.md +40 -0
- package/rules/design-system/DS-003.md +38 -0
- package/rules/devops/OPS-001.md +43 -0
- package/rules/devops/OPS-002.md +39 -0
- package/rules/devops/OPS-003.md +38 -0
- package/rules/devops/OPS-004.md +40 -0
- package/rules/devops/OPS-005.md +43 -0
- package/rules/devops/OPS-006.md +38 -0
- package/rules/devops/OPS-007.md +40 -0
- package/rules/interaction/INT-001.md +39 -0
- package/rules/interaction/INT-002.md +39 -0
- package/rules/localization/I18N-001.md +38 -0
- package/rules/localization/I18N-002.md +40 -0
- package/rules/localization/I18N-003.md +39 -0
- package/rules/memory/MEM-001.md +44 -0
- package/rules/memory/MEM-002.md +39 -0
- package/rules/memory/MEM-003.md +38 -0
- package/rules/memory/MEM-004.md +38 -0
- package/rules/memory/MEM-005.md +38 -0
- package/rules/memory/MEM-006.md +38 -0
- package/rules/memory/MEM-007.md +38 -0
- package/rules/memory/MEM-008.md +38 -0
- package/rules/memory/MEM-009.md +39 -0
- package/rules/memory/MEM-010.md +38 -0
- package/rules/memory/MEM-011.md +38 -0
- package/rules/motion/MOT-001.md +38 -0
- package/rules/observability/OBS-001.md +40 -0
- package/rules/observability/OBS-002.md +40 -0
- package/rules/observability/OBS-003.md +38 -0
- package/rules/observability/OBS-004.md +38 -0
- package/rules/privacy/PRIV-001.md +38 -0
- package/rules/privacy/PRIV-002.md +44 -0
- package/rules/privacy/PRIV-003.md +40 -0
- package/rules/privacy/PRIV-004.md +41 -0
- package/rules/responsive/RWD-001.md +40 -0
- package/rules/responsive/RWD-002.md +39 -0
- package/rules/responsive/RWD-003.md +39 -0
- package/rules/security/SEC-001.md +44 -0
- package/rules/security/SEC-002.md +44 -0
- package/rules/security/SEC-003.md +41 -0
- package/rules/security/SEC-004.md +40 -0
- package/rules/security/SEC-005.md +42 -0
- package/rules/security/SEC-006.md +40 -0
- package/rules/security/SEC-007.md +44 -0
- package/rules/security/SEC-008.md +39 -0
- package/rules/security/SEC-009.md +40 -0
- package/rules/security/SEC-010.md +40 -0
- package/rules/security/SEC-011.md +40 -0
- package/rules/security/SEC-012.md +40 -0
- package/rules/states/STATE-001.md +38 -0
- package/rules/states/STATE-002.md +39 -0
- package/rules/states/STATE-003.md +39 -0
- package/rules/states/STATE-004.md +38 -0
- package/rules/testing/TST-001.md +39 -0
- package/rules/testing/TST-002.md +39 -0
- package/rules/testing/TST-003.md +39 -0
- package/rules/testing/TST-004.md +38 -0
- package/rules/testing/TST-005.md +40 -0
- package/rules/testing/TST-006.md +39 -0
- package/rules/ui/UI-001.md +40 -0
- package/rules/ui/UI-002.md +38 -0
- package/rules/ui/UI-003.md +41 -0
- package/rules/ui/UI-004.md +41 -0
- package/rules/ui/UI-005.md +41 -0
- package/rules/ui/UI-006.md +40 -0
- package/rules/ui/UI-007.md +41 -0
- package/rules/ux/UX-001.md +41 -0
- package/rules/ux/UX-002.md +41 -0
- package/rules/ux/UX-003.md +39 -0
- package/rules/ux/UX-004.md +39 -0
- package/rules/ux/UX-005.md +40 -0
- package/rules/ux/UX-006.md +40 -0
- package/rules/ux/UX-007.md +44 -0
- package/rules/ux/UX-008.md +41 -0
- package/rules/ux/UX-009.md +39 -0
- package/rules/ux/UX-010.md +40 -0
- package/rules/ux/UX-011.md +40 -0
- package/rules/ux/UX-012.md +40 -0
- package/rules/ux/UX-013.md +39 -0
- package/schema/README.md +19 -0
- package/schema/checklist.schema.json +34 -0
- package/schema/component.schema.json +37 -0
- package/schema/project-config.schema.json +70 -0
- package/schema/rule.schema.json +104 -0
- package/schema/token.schema.json +15 -0
- package/schema/waiver.schema.json +33 -0
- package/scripts/build-index.mjs +178 -0
- package/scripts/validate-links.mjs +43 -0
- package/scripts/validate-rules.mjs +42 -0
- package/skills/devia/SKILL.md +114 -0
- package/src/cli.mjs +107 -0
- package/src/commands/check.mjs +483 -0
- package/src/commands/doctor.mjs +139 -0
- package/src/commands/init.mjs +186 -0
- package/src/commands/registry.mjs +154 -0
- package/src/commands/rules.mjs +101 -0
- package/src/commands/skills.mjs +97 -0
- package/src/commands/sync.mjs +83 -0
- package/src/commands/validate.mjs +194 -0
- package/src/lib/fs.mjs +89 -0
- package/src/lib/git.mjs +31 -0
- package/src/lib/rules.mjs +85 -0
- package/src/lib/ui.mjs +52 -0
- package/src/lib/vendor.mjs +74 -0
- package/src/lib/version.mjs +19 -0
- package/src/lib/yaml.mjs +152 -0
- package/standard/README.md +31 -0
- package/standard/design/README.md +51 -0
- package/standard/design/REFERENCES.md +39 -0
- package/standard/design/accessibility/aria.md +7 -0
- package/standard/design/accessibility/contrast.md +6 -0
- package/standard/design/accessibility/focus.md +6 -0
- package/standard/design/accessibility/forms.md +3 -0
- package/standard/design/accessibility/keyboard.md +6 -0
- package/standard/design/accessibility/reduced-motion.md +3 -0
- package/standard/design/accessibility/reflow.md +3 -0
- package/standard/design/accessibility/screen-readers.md +3 -0
- package/standard/design/accessibility/target-size.md +3 -0
- package/standard/design/accessibility/testing.md +3 -0
- package/standard/design/accessibility/wcag-2.2.md +16 -0
- package/standard/design/accessibility/zoom.md +3 -0
- package/standard/design/ai/ai-design-rules.md +8 -0
- package/standard/design/ai/anti-patterns.md +1 -0
- package/standard/design/ai/compliance-format.md +22 -0
- package/standard/design/ai/design-review.md +10 -0
- package/standard/design/ai/evals/README.md +1 -0
- package/standard/design/ai/instructions.md +7 -0
- package/standard/design/ai/prompts/accessibility-review.md +5 -0
- package/standard/design/ai/prompts/design-system-review.md +5 -0
- package/standard/design/ai/prompts/ui-review.md +5 -0
- package/standard/design/ai/prompts/ux-review.md +5 -0
- package/standard/design/ai/review-protocol.md +11 -0
- package/standard/design/anti-patterns/accessibility.md +7 -0
- package/standard/design/anti-patterns/ai-generated.md +6 -0
- package/standard/design/anti-patterns/dashboards.md +5 -0
- package/standard/design/anti-patterns/forms.md +5 -0
- package/standard/design/anti-patterns/responsive.md +5 -0
- package/standard/design/anti-patterns/ui.md +6 -0
- package/standard/design/anti-patterns/ux.md +5 -0
- package/standard/design/components/buttons.md +6 -0
- package/standard/design/components/dialogs.md +5 -0
- package/standard/design/components/feedback.md +3 -0
- package/standard/design/components/forms.md +3 -0
- package/standard/design/components/navigation.md +3 -0
- package/standard/design/components/tables.md +6 -0
- package/standard/design/content/error-messages.md +4 -0
- package/standard/design/content/ux-writing.md +5 -0
- package/standard/design/data-display/README.md +5 -0
- package/standard/design/data-display/currency.md +3 -0
- package/standard/design/data-display/dates.md +3 -0
- package/standard/design/data-display/density.md +3 -0
- package/standard/design/data-display/filtering.md +3 -0
- package/standard/design/data-display/localization.md +3 -0
- package/standard/design/data-display/numbers.md +3 -0
- package/standard/design/data-display/pagination.md +3 -0
- package/standard/design/data-display/percentages.md +3 -0
- package/standard/design/data-display/sorting.md +3 -0
- package/standard/design/data-display/tables.md +3 -0
- package/standard/design/data-display/time.md +3 -0
- package/standard/design/decisions/ADR-001-token-naming.md +13 -0
- package/standard/design/decisions/ADR-002-radius-scale.md +9 -0
- package/standard/design/decisions/ADR-003-color-system.md +9 -0
- package/standard/design/decisions/ADR-004-component-versioning.md +9 -0
- package/standard/design/decisions/README.md +3 -0
- package/standard/design/design-system/components.md +9 -0
- package/standard/design/design-system/naming.md +19 -0
- package/standard/design/design-system/tokens.md +7 -0
- package/standard/design/design-system/variants.md +5 -0
- package/standard/design/design-system/versioning.md +5 -0
- package/standard/design/health/coverage.md +1 -0
- package/standard/design/health/dashboard.md +14 -0
- package/standard/design/health/maturity-model.md +9 -0
- package/standard/design/health/score.md +14 -0
- package/standard/design/interaction/README.md +10 -0
- package/standard/design/interaction/keyboard.md +3 -0
- package/standard/design/interaction/mouse.md +2 -0
- package/standard/design/interaction/pen.md +1 -0
- package/standard/design/interaction/touch.md +3 -0
- package/standard/design/interaction/touchscreen.md +6 -0
- package/standard/design/interaction/voice.md +2 -0
- package/standard/design/localization/README.md +5 -0
- package/standard/design/localization/currency.md +3 -0
- package/standard/design/localization/date-time.md +3 -0
- package/standard/design/localization/i18n.md +3 -0
- package/standard/design/localization/locale-testing.md +3 -0
- package/standard/design/localization/number-formatting.md +3 -0
- package/standard/design/localization/pluralization.md +3 -0
- package/standard/design/localization/rtl.md +3 -0
- package/standard/design/localization/text-expansion.md +3 -0
- package/standard/design/motion/animation.md +6 -0
- package/standard/design/penpot/WORKFLOW.md +27 -0
- package/standard/design/platforms/README.md +12 -0
- package/standard/design/platforms/desktop/README.md +5 -0
- package/standard/design/platforms/mobile/android.md +5 -0
- package/standard/design/platforms/mobile/ios.md +5 -0
- package/standard/design/platforms/tablet/README.md +5 -0
- package/standard/design/platforms/web/README.md +1 -0
- package/standard/design/principles/design-principles.md +9 -0
- package/standard/design/principles/ui-principles.md +7 -0
- package/standard/design/principles/ux-principles.md +14 -0
- package/standard/design/references/atlassian.md +3 -0
- package/standard/design/references/carbon.md +3 -0
- package/standard/design/references/figma-sds.md +5 -0
- package/standard/design/references/govuk.md +3 -0
- package/standard/design/references/material.md +3 -0
- package/standard/design/references/nng.md +3 -0
- package/standard/design/references/openui.md +3 -0
- package/standard/design/references/primer.md +5 -0
- package/standard/design/references/storybook.md +3 -0
- package/standard/design/references/uswds.md +3 -0
- package/standard/design/references/w3c.md +3 -0
- package/standard/design/responsive/desktop.md +4 -0
- package/standard/design/responsive/mobile.md +6 -0
- package/standard/design/responsive/tablet.md +3 -0
- package/standard/design/states/async.md +3 -0
- package/standard/design/states/conflict.md +3 -0
- package/standard/design/states/empty.md +3 -0
- package/standard/design/states/error.md +3 -0
- package/standard/design/states/interaction.md +5 -0
- package/standard/design/states/loading.md +3 -0
- package/standard/design/states/offline.md +3 -0
- package/standard/design/states/optimistic.md +3 -0
- package/standard/design/states/partial.md +3 -0
- package/standard/design/states/permission-denied.md +3 -0
- package/standard/design/states/rate-limited.md +3 -0
- package/standard/design/states/read-only.md +3 -0
- package/standard/design/states/retry.md +3 -0
- package/standard/design/states/skeleton.md +3 -0
- package/standard/design/states/stale.md +3 -0
- package/standard/design/states/success.md +3 -0
- package/standard/design/states/timeout.md +3 -0
- package/standard/design/states/unsaved-changes.md +3 -0
- package/standard/design/ui/color.md +6 -0
- package/standard/design/ui/grids.md +5 -0
- package/standard/design/ui/icons.md +5 -0
- package/standard/design/ui/imagery.md +5 -0
- package/standard/design/ui/layout.md +5 -0
- package/standard/design/ui/spacing.md +5 -0
- package/standard/design/ui/typography.md +6 -0
- package/standard/design/ui/visual-design.md +7 -0
- package/standard/design/ux/cognitive-load.md +5 -0
- package/standard/design/ux/errors.md +6 -0
- package/standard/design/ux/feedback.md +5 -0
- package/standard/design/ux/forms.md +7 -0
- package/standard/design/ux/heuristics.md +14 -0
- package/standard/design/ux/information-architecture.md +6 -0
- package/standard/design/ux/navigation.md +6 -0
- package/standard/design/ux/usability.md +6 -0
- package/standard/engineering/README.md +29 -0
- package/standard/engineering/REFERENCES.md +42 -0
- package/standard/engineering/ai/AI_SECURITY.md +15 -0
- package/standard/engineering/ai/PROMPT_SECURITY.md +6 -0
- package/standard/engineering/architecture/ADR.md +11 -0
- package/standard/engineering/architecture/ARCHITECTURE.md +25 -0
- package/standard/engineering/architecture/PRINCIPLES.md +17 -0
- package/standard/engineering/architecture/THREAT_MODEL.md +14 -0
- package/standard/engineering/backend/API.md +29 -0
- package/standard/engineering/backend/BACKGROUND_JOBS.md +12 -0
- package/standard/engineering/backend/ERROR_HANDLING.md +26 -0
- package/standard/engineering/backend/LOGGING.md +12 -0
- package/standard/engineering/compliance/DATA_RETENTION.md +10 -0
- package/standard/engineering/compliance/PRIVACY.md +11 -0
- package/standard/engineering/database/BACKUPS.md +19 -0
- package/standard/engineering/database/DATABASE.md +30 -0
- package/standard/engineering/database/MIGRATIONS.md +12 -0
- package/standard/engineering/devops/BRANCH_PROTECTION.md +17 -0
- package/standard/engineering/devops/CI_CD.md +48 -0
- package/standard/engineering/devops/DEPLOYMENT.md +12 -0
- package/standard/engineering/devops/DOCKER.md +9 -0
- package/standard/engineering/devops/ENVIRONMENTS.md +12 -0
- package/standard/engineering/devops/RELEASE.md +6 -0
- package/standard/engineering/devops/ROLLBACK.md +9 -0
- package/standard/engineering/frontend/ACCESSIBILITY.md +16 -0
- package/standard/engineering/frontend/DESIGN_SYSTEM.md +10 -0
- package/standard/engineering/frontend/FRONTEND.md +17 -0
- package/standard/engineering/frontend/UX.md +15 -0
- package/standard/engineering/observability/ALERTING.md +11 -0
- package/standard/engineering/observability/INCIDENTS.md +10 -0
- package/standard/engineering/observability/MONITORING.md +17 -0
- package/standard/engineering/payments/PAYMENTS.md +15 -0
- package/standard/engineering/performance/PERFORMANCE.md +19 -0
- package/standard/engineering/security/API_SECURITY.md +22 -0
- package/standard/engineering/security/ASVS_5.0/V10_MALICIOUS_CODE.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V11_BUSINESS_LOGIC.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V12_FILES.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V13_API.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V14_CONFIGURATION.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V1_ARCHITECTURE.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V2_AUTHENTICATION.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V3_SESSION.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V4_ACCESS_CONTROL.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V5_VALIDATION.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V6_CRYPTOGRAPHY.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V7_ERROR_HANDLING.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V8_DATA_PROTECTION.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V9_COMMUNICATION.md +31 -0
- package/standard/engineering/security/ASVS_REGISTRY.md +31 -0
- package/standard/engineering/security/AUTHENTICATION.md +28 -0
- package/standard/engineering/security/AUTHORIZATION.md +27 -0
- package/standard/engineering/security/DATA_SECURITY.md +14 -0
- package/standard/engineering/security/OWASP_ASVS.md +31 -0
- package/standard/engineering/security/SECRETS.md +28 -0
- package/standard/engineering/security/SECURITY.md +28 -0
- package/standard/engineering/testing/TESTING.md +27 -0
- package/templates/agents/AGENTS.md +34 -0
- package/templates/agents/CLAUDE.md +33 -0
- package/templates/agents/copilot-instructions.md +15 -0
- package/templates/agents/cursor.mdc +27 -0
- package/templates/agents/windsurfrules.md +17 -0
- package/templates/docs/ADR.md +16 -0
- package/templates/docs/FEATURE.md +19 -0
- package/templates/docs/SECURITY_REPORT.md +15 -0
- package/templates/docs/accessibility-review.md +9 -0
- package/templates/docs/component.md +9 -0
- package/templates/docs/decision-record.md +9 -0
- package/templates/docs/design-review.md +9 -0
- package/templates/docs/exception.md +9 -0
- package/templates/docs/page.md +9 -0
- package/templates/docs/pattern.md +9 -0
- package/templates/docs/user-flow.md +9 -0
- package/templates/github/workflows/app-ci.yml +91 -0
- package/templates/project/00_OVERVIEW.md +51 -0
- package/templates/project/01_ARCHITECTURE.md +37 -0
- package/templates/project/02_SURFACES.md +30 -0
- package/templates/project/03_DATA_MODEL.md +31 -0
- package/templates/project/04_PERMISSIONS.md +32 -0
- package/templates/project/05_FLOWS.md +20 -0
- package/templates/project/06_INTEGRATIONS.md +21 -0
- package/templates/project/07_DESIGN.md +33 -0
- package/templates/project/10_NEVER_ALWAYS.md +26 -0
- package/templates/project/11_GAPS.md +18 -0
- package/templates/project/12_DEBT.md +19 -0
- package/templates/project/13_RECIPES.md +35 -0
- package/templates/project/14_INDEX.md +50 -0
- package/templates/project/AGENTS.md +51 -0
- package/templates/project/README.md +49 -0
- package/templates/project/impact-map.yaml +41 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Engineering standard
|
|
2
|
+
|
|
3
|
+
Deep policy by domain. Pair every change with the matching rules and the checklist under
|
|
4
|
+
[`../../checklists/engineering/`](../../checklists/README.md).
|
|
5
|
+
|
|
6
|
+
Spine: [`../../PRINCIPLES.md`](../../PRINCIPLES.md) · [`../../LEVELS.md`](../../LEVELS.md) ·
|
|
7
|
+
[`../../MATURITY.md`](../../MATURITY.md) · `devia check`
|
|
8
|
+
|
|
9
|
+
| Domain | Pages | Rules |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Architecture | [`architecture/`](architecture/ARCHITECTURE.md), [`ADR.md`](architecture/ADR.md), [`THREAT_MODEL.md`](architecture/THREAT_MODEL.md) | `ARC-*` |
|
|
12
|
+
| Security | [`security/`](security/SECURITY.md), [`AUTHENTICATION.md`](security/AUTHENTICATION.md), [`AUTHORIZATION.md`](security/AUTHORIZATION.md), [`SECRETS.md`](security/SECRETS.md), [`API_SECURITY.md`](security/API_SECURITY.md), [`DATA_SECURITY.md`](security/DATA_SECURITY.md) | `SEC-*` |
|
|
13
|
+
| ASVS mapping | [`security/OWASP_ASVS.md`](security/OWASP_ASVS.md), [`security/ASVS_REGISTRY.md`](security/ASVS_REGISTRY.md), [`security/ASVS_5.0/`](security/ASVS_5.0/V1_ARCHITECTURE.md) | `SEC-*` |
|
|
14
|
+
| Database | [`database/DATABASE.md`](database/DATABASE.md), [`MIGRATIONS.md`](database/MIGRATIONS.md), [`BACKUPS.md`](database/BACKUPS.md) | `DB-*` |
|
|
15
|
+
| API / backend | [`backend/API.md`](backend/API.md), [`ERROR_HANDLING.md`](backend/ERROR_HANDLING.md), [`LOGGING.md`](backend/LOGGING.md), [`BACKGROUND_JOBS.md`](backend/BACKGROUND_JOBS.md) | `API-*` |
|
|
16
|
+
| Testing | [`testing/TESTING.md`](testing/TESTING.md) | `TST-*` |
|
|
17
|
+
| DevOps | [`devops/CI_CD.md`](devops/CI_CD.md), [`BRANCH_PROTECTION.md`](devops/BRANCH_PROTECTION.md), [`DEPLOYMENT.md`](devops/DEPLOYMENT.md), [`ENVIRONMENTS.md`](devops/ENVIRONMENTS.md), [`DOCKER.md`](devops/DOCKER.md), [`RELEASE.md`](devops/RELEASE.md), [`ROLLBACK.md`](devops/ROLLBACK.md) | `OPS-*` |
|
|
18
|
+
| Observability | [`observability/MONITORING.md`](observability/MONITORING.md), [`ALERTING.md`](observability/ALERTING.md), [`INCIDENTS.md`](observability/INCIDENTS.md) | `OBS-*` |
|
|
19
|
+
| Performance | [`performance/PERFORMANCE.md`](performance/PERFORMANCE.md) | — |
|
|
20
|
+
| Privacy | [`compliance/PRIVACY.md`](compliance/PRIVACY.md), [`DATA_RETENTION.md`](compliance/DATA_RETENTION.md) | `PRIV-*` |
|
|
21
|
+
| Payments | [`payments/PAYMENTS.md`](payments/PAYMENTS.md) | `SEC-007`, `API-004` |
|
|
22
|
+
| AI features | [`ai/AI_SECURITY.md`](ai/AI_SECURITY.md), [`PROMPT_SECURITY.md`](ai/PROMPT_SECURITY.md) | `AI-*` |
|
|
23
|
+
| Frontend | [`frontend/FRONTEND.md`](frontend/FRONTEND.md), [`ACCESSIBILITY.md`](frontend/ACCESSIBILITY.md), [`UX.md`](frontend/UX.md), [`DESIGN_SYSTEM.md`](frontend/DESIGN_SYSTEM.md) | design rules — see [`../design/README.md`](../design/README.md) |
|
|
24
|
+
|
|
25
|
+
Sources: [`REFERENCES.md`](REFERENCES.md).
|
|
26
|
+
|
|
27
|
+
Frontend pages here cover the engineering side of the interface — bundles, state, XSS, storage.
|
|
28
|
+
The interface itself is governed by [`../design/README.md`](../design/README.md); a UI that ships
|
|
29
|
+
without its design rules is not done, however clean the code is.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Reference standards
|
|
2
|
+
|
|
3
|
+
This standard is intentionally built on recognized sources. Prefer the primary documents when details matter.
|
|
4
|
+
|
|
5
|
+
## Security
|
|
6
|
+
|
|
7
|
+
- [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) — verifiable application security requirements
|
|
8
|
+
- [OWASP Top 10](https://owasp.org/www-project-top-ten/) — common risk classes
|
|
9
|
+
- [OWASP API Security Top 10](https://owasp.org/www-project-api-security/)
|
|
10
|
+
- [OWASP Cheat Sheet Series](https://cheatsheetseries.owasp.org/)
|
|
11
|
+
|
|
12
|
+
## Architecture & delivery
|
|
13
|
+
|
|
14
|
+
- [12-Factor App](https://12factor.net/)
|
|
15
|
+
- AWS Well-Architected (cloud design trade-offs)
|
|
16
|
+
- SOLID principles (when they reduce complexity, not as dogma)
|
|
17
|
+
|
|
18
|
+
## Web & accessibility
|
|
19
|
+
|
|
20
|
+
- [WCAG](https://www.w3.org/WAI/standards-guidelines/wcag/)
|
|
21
|
+
- [WAI-ARIA APG](https://www.w3.org/WAI/ARIA/apg/)
|
|
22
|
+
- HTTP semantics / status codes
|
|
23
|
+
- [OpenAPI Specification](https://www.openapis.org/)
|
|
24
|
+
- UX/UI operational rules: [`../design/REFERENCES.md`](../design/REFERENCES.md) (WCAG, NN/g, GOV.UK, Carbon and the rest)
|
|
25
|
+
|
|
26
|
+
## Supply chain & DevOps
|
|
27
|
+
|
|
28
|
+
- OpenSSF / secure software practices
|
|
29
|
+
- SBOM generation for releases when appropriate
|
|
30
|
+
- Container minimal base images + non-root + image scanning
|
|
31
|
+
|
|
32
|
+
## Data
|
|
33
|
+
|
|
34
|
+
- PostgreSQL operational best practices
|
|
35
|
+
- Encryption in transit / at rest as required by threat model
|
|
36
|
+
- Backup **and restore testing**
|
|
37
|
+
|
|
38
|
+
## Quality
|
|
39
|
+
|
|
40
|
+
- Semantic Versioning
|
|
41
|
+
- Conventional Commits (optional but useful)
|
|
42
|
+
- Automated testing pyramid + critical-path E2E
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# AI feature security
|
|
2
|
+
|
|
3
|
+
## P0
|
|
4
|
+
|
|
5
|
+
1. Never ship raw model output to users without validation/encoding
|
|
6
|
+
2. Treat model output as untrusted (XSS, data exfiltration, tool abuse)
|
|
7
|
+
3. Protect against prompt injection when tools/browsing/files are connected
|
|
8
|
+
4. Provider keys stay on the server; rate-limit user-triggered generations
|
|
9
|
+
|
|
10
|
+
## P1
|
|
11
|
+
|
|
12
|
+
1. Human approval for high-impact automated actions
|
|
13
|
+
2. Audit logs for tool calls that mutate data
|
|
14
|
+
3. Cost/token controls and model routing for expensive tasks
|
|
15
|
+
4. Evaluation sets for contractual behaviors
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Prompt security
|
|
2
|
+
|
|
3
|
+
- Separate trusted system instructions from untrusted user/content input
|
|
4
|
+
- Don’t exfiltrate secrets into prompts/logs
|
|
5
|
+
- For tool-using agents: least privilege tools, confirm destructive actions
|
|
6
|
+
- Version prompts that affect production behavior
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Architecture Decision Records
|
|
2
|
+
|
|
3
|
+
Use ADRs for decisions that are expensive to reverse: auth provider, multi-tenancy model, event bus, payment provider, primary database, public API shape.
|
|
4
|
+
|
|
5
|
+
Template: [`templates/ADR.md`](../../../templates/docs/ADR.md)
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
- One decision per ADR
|
|
10
|
+
- Include context, options, decision, consequences
|
|
11
|
+
- Never silently reverse an ADR in code — supersede it with a new ADR
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
## P0
|
|
4
|
+
|
|
5
|
+
1. Document what you are building, for whom, and which data is sensitive **before** large features ship.
|
|
6
|
+
2. Keep UI, API/application services, and persistence boundaries clear — business rules do not live only in React components.
|
|
7
|
+
3. Identify critical components and single points of failure; plan recovery for them.
|
|
8
|
+
4. Dependency direction is inward toward domain rules (UI/infrastructure depend on domain — not the reverse).
|
|
9
|
+
|
|
10
|
+
## P1
|
|
11
|
+
|
|
12
|
+
1. Record non-trivial decisions as ADRs ([`templates/ADR.md`](../../../templates/docs/ADR.md)).
|
|
13
|
+
2. Maintain a simple architecture diagram and data-flow sketch in the app repo.
|
|
14
|
+
3. Define scalability and availability assumptions explicitly (even if “single region, vertical scale for now”).
|
|
15
|
+
|
|
16
|
+
## Detect
|
|
17
|
+
|
|
18
|
+
- Business rules duplicated across frontend and backend with divergent behavior
|
|
19
|
+
- Direct DB access from UI code
|
|
20
|
+
- No threat model for auth, payments, or PII
|
|
21
|
+
|
|
22
|
+
## Verify
|
|
23
|
+
|
|
24
|
+
- A new engineer can explain the system from `ARCHITECTURE.md` alone
|
|
25
|
+
- Sensitive data flows are listed end-to-end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture principles
|
|
2
|
+
|
|
3
|
+
See root [`PRINCIPLES.md`](../../../PRINCIPLES.md) for the full set (complexity earned, dependency liability).
|
|
4
|
+
|
|
5
|
+
## Architecture-specific
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
Simple > Clever
|
|
9
|
+
Explicit > Implicit
|
|
10
|
+
Modular > Spaghetti
|
|
11
|
+
Typed > Untyped (when the stack allows)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
- Prefer a modular monolith until scale or team boundaries **force** services.
|
|
15
|
+
- Prefer Postgres features you already run over a new data store.
|
|
16
|
+
- Prefer boring, operable patterns over novel ones.
|
|
17
|
+
- Every irreversible choice gets an ADR ([`ADR.md`](ADR.md)).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Threat model (lightweight)
|
|
2
|
+
|
|
3
|
+
For every app, answer:
|
|
4
|
+
|
|
5
|
+
1. What assets matter (credentials, PII, payments, admin actions)?
|
|
6
|
+
2. Who are the actors (anon, user, admin, attacker, insider)?
|
|
7
|
+
3. What are the trust boundaries (browser, API, DB, third parties)?
|
|
8
|
+
4. What happens on abuse (credential stuffing, IDOR, webhook forgery, prompt injection)?
|
|
9
|
+
|
|
10
|
+
Minimum outputs:
|
|
11
|
+
|
|
12
|
+
- List of assets + impact if lost
|
|
13
|
+
- Top abuse cases mapped to controls in `docs/security/`
|
|
14
|
+
- Residual risks accepted by the owner
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# API standard
|
|
2
|
+
|
|
3
|
+
## Request pipeline (conceptual)
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
Request → AuthN → AuthZ → Validation → Idempotency → Business rules
|
|
7
|
+
→ Transaction → Persistence → Audit log → Response
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## P0
|
|
11
|
+
|
|
12
|
+
1. Explicit contract per endpoint (accept / return / error / auth)
|
|
13
|
+
2. Validate inputs before business logic
|
|
14
|
+
3. Re-check permissions and ownership on mutating operations
|
|
15
|
+
4. Correct HTTP status codes; stable error codes for clients
|
|
16
|
+
5. No stack traces or SQL text in production responses
|
|
17
|
+
|
|
18
|
+
## P1
|
|
19
|
+
|
|
20
|
+
1. Version public APIs (`/v1`, …) + changelog
|
|
21
|
+
2. Pagination / filtering conventions documented
|
|
22
|
+
3. Timeouts on outbound calls; bounded retries
|
|
23
|
+
4. OpenAPI (or equivalent) kept current for public/partner APIs
|
|
24
|
+
5. Request IDs / correlation IDs
|
|
25
|
+
|
|
26
|
+
## Webhooks
|
|
27
|
+
|
|
28
|
+
- Verify signatures
|
|
29
|
+
- Handle duplicate deliveries idempotently
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Background jobs
|
|
2
|
+
|
|
3
|
+
## P0
|
|
4
|
+
|
|
5
|
+
1. Heavy work (email, LLM, webhooks fan-out, reports) runs out of band — not on the request thread when latency matters
|
|
6
|
+
2. Jobs are idempotent where retries exist
|
|
7
|
+
3. Failed jobs are visible (log + alert on spikes)
|
|
8
|
+
|
|
9
|
+
## P1
|
|
10
|
+
|
|
11
|
+
1. Dead-letter / retry limits
|
|
12
|
+
2. Job payloads exclude secrets when possible
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Error handling
|
|
2
|
+
|
|
3
|
+
## Client-safe error shape (example)
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"error": {
|
|
8
|
+
"code": "ORDER_NOT_FOUND",
|
|
9
|
+
"message": "Order not found",
|
|
10
|
+
"requestId": "req_123"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Never expose in production
|
|
16
|
+
|
|
17
|
+
- Stack traces
|
|
18
|
+
- SQL queries
|
|
19
|
+
- Internal paths
|
|
20
|
+
- Secrets / env values
|
|
21
|
+
- Raw third-party error dumps
|
|
22
|
+
|
|
23
|
+
## P0
|
|
24
|
+
|
|
25
|
+
1. Centralize mapping: detailed logs internally, safe messages externally
|
|
26
|
+
2. Bound retries; prefer idempotent handlers
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Logging
|
|
2
|
+
|
|
3
|
+
## P0
|
|
4
|
+
|
|
5
|
+
1. Structured logs with request/correlation ids
|
|
6
|
+
2. Authz failures and payment events are auditable
|
|
7
|
+
3. No secrets or unnecessary PII in logs
|
|
8
|
+
|
|
9
|
+
## P1
|
|
10
|
+
|
|
11
|
+
1. Log levels sane in production (`info`/`warn`/`error`)
|
|
12
|
+
2. Retention aligned with privacy policy
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Data retention
|
|
2
|
+
|
|
3
|
+
Document:
|
|
4
|
+
|
|
5
|
+
- What categories of data you store
|
|
6
|
+
- How long each category is kept
|
|
7
|
+
- When soft-delete becomes hard-delete
|
|
8
|
+
- What remains in backups and for how long
|
|
9
|
+
|
|
10
|
+
Deletion requests must account for backups and derived data (search indexes, logs, warehouses).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Privacy
|
|
2
|
+
|
|
3
|
+
Apply what your product and jurisdiction require (GDPR and similar). This is not legal advice.
|
|
4
|
+
|
|
5
|
+
## Engineering P0/P1
|
|
6
|
+
|
|
7
|
+
1. Data minimization — collect only what you need
|
|
8
|
+
2. Deletion/export pipelines that actually remove orphaned PII
|
|
9
|
+
3. Retention policy documented and enforced
|
|
10
|
+
4. Tenant/user isolation for private data
|
|
11
|
+
5. Consent/cookie flows when applicable to your UI surface
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Backups & restore
|
|
2
|
+
|
|
3
|
+
> A backup that has never been restored successfully is not a backup.
|
|
4
|
+
|
|
5
|
+
## P0
|
|
6
|
+
|
|
7
|
+
1. Automated database backups
|
|
8
|
+
2. Defined retention
|
|
9
|
+
3. Restore procedure documented
|
|
10
|
+
4. Restore tested on a schedule (and after major version upgrades)
|
|
11
|
+
|
|
12
|
+
## P1
|
|
13
|
+
|
|
14
|
+
1. Off-site / separate-account storage when risk warrants
|
|
15
|
+
2. Backup encryption
|
|
16
|
+
3. File/object storage backups if user content exists
|
|
17
|
+
4. Explicit RPO / RTO targets (example: RPO 15m, RTO 1h)
|
|
18
|
+
|
|
19
|
+
See [`checklists/disaster-recovery.md`](../../../checklists/engineering/disaster-recovery.md).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Database
|
|
2
|
+
|
|
3
|
+
Treat the database as a critical production component — not a dumping ground.
|
|
4
|
+
|
|
5
|
+
## P0
|
|
6
|
+
|
|
7
|
+
1. Versioned migrations only — **no manual production schema edits**
|
|
8
|
+
2. Primary keys, foreign keys, and essential constraints exist
|
|
9
|
+
3. Tenant/user ownership enforced in queries (or RLS)
|
|
10
|
+
4. Automated backups exist **and restore has been tested**
|
|
11
|
+
5. Connection pooling configured before “scale the DB” theater
|
|
12
|
+
|
|
13
|
+
## P1
|
|
14
|
+
|
|
15
|
+
1. Indexes justified by real query paths; eliminate obvious N+1
|
|
16
|
+
2. Transactions around multi-step critical writes
|
|
17
|
+
3. Pagination on large lists
|
|
18
|
+
4. Expand/contract compatible migrations for breaking changes
|
|
19
|
+
|
|
20
|
+
## Detect
|
|
21
|
+
|
|
22
|
+
- Schema drift between environments
|
|
23
|
+
- Missing FKs “for speed”
|
|
24
|
+
- Untested backups
|
|
25
|
+
|
|
26
|
+
## Verify
|
|
27
|
+
|
|
28
|
+
- Migrate from empty DB to head successfully
|
|
29
|
+
- Restore latest backup into staging and boot the app
|
|
30
|
+
- Cross-tenant read test fails closed
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Migrations
|
|
2
|
+
|
|
3
|
+
## Rules
|
|
4
|
+
|
|
5
|
+
- Every schema change is a migration committed to git
|
|
6
|
+
- Migrations are reviewed like code
|
|
7
|
+
- Avoid destructive changes without a expand → backfill → contract plan
|
|
8
|
+
- Seed data is separate from migrations
|
|
9
|
+
|
|
10
|
+
## Agent rule
|
|
11
|
+
|
|
12
|
+
If you need a new column/table/index: create a migration. Do not “just alter prod”.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Branch protection (enforcement checklist)
|
|
2
|
+
|
|
3
|
+
On `main` (GitHub → Settings → Branches):
|
|
4
|
+
|
|
5
|
+
- [ ] Require a pull request before merging
|
|
6
|
+
- [ ] Require status checks to pass
|
|
7
|
+
- [ ] Require branches to be up to date (recommended)
|
|
8
|
+
- [ ] Required checks include at least:
|
|
9
|
+
- [ ] Lint · Typecheck · Unit
|
|
10
|
+
- [ ] Dependency audit
|
|
11
|
+
- [ ] Secret scan
|
|
12
|
+
- [ ] Production check (P0) — when adopted
|
|
13
|
+
- [ ] E2E / smoke — for release-critical repos
|
|
14
|
+
- [ ] Restrict who can push / bypass (no casual admin bypass)
|
|
15
|
+
- [ ] Do not allow bypassing without break-glass policy
|
|
16
|
+
|
|
17
|
+
Without required checks, Level 3 does not exist — only theater.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# CI/CD — Level 3 Enforcement
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
GitHub must be able to say **NO** to a PR that violates a critical rule.
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
PR #N
|
|
9
|
+
├── Lint / Typecheck / Unit ✅/❌
|
|
10
|
+
├── Integration ✅/❌
|
|
11
|
+
├── Dependency audit ✅/❌
|
|
12
|
+
├── Secret scan ✅/❌
|
|
13
|
+
├── Production check (P0) ✅/❌
|
|
14
|
+
├── E2E / smoke ✅/❌
|
|
15
|
+
└── MERGE BLOCKED on required ❌
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Recommended PR pipeline
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
Format → Lint → Typecheck → Unit → Integration → Dependency audit
|
|
22
|
+
→ Secret scan → SAST (as available) → Build → (Docker build/scan)
|
|
23
|
+
→ Staging deploy → Smoke/E2E → Production (protected)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## P0
|
|
27
|
+
|
|
28
|
+
1. `main` protected: PR + **required** status checks
|
|
29
|
+
2. CI must pass before merge
|
|
30
|
+
3. No laptop-copy deploy as the normal path
|
|
31
|
+
4. Secret scan + dependency audit required
|
|
32
|
+
5. `production-check` required once adopted (FAIL blocks)
|
|
33
|
+
|
|
34
|
+
## P1
|
|
35
|
+
|
|
36
|
+
1. Separate staging and production
|
|
37
|
+
2. Rollback strategy documented and exercised
|
|
38
|
+
3. Migrations gated; expand/contract for destructive changes
|
|
39
|
+
4. SAST / container scan as available
|
|
40
|
+
|
|
41
|
+
## Adopting this standard
|
|
42
|
+
|
|
43
|
+
1. Copy [`templates/github/workflows/app-ci.yml`](../../../templates/github/workflows/app-ci.yml) → `.github/workflows/ci.yml`
|
|
44
|
+
2. Copy `scripts/production-check.mjs` (and optional config)
|
|
45
|
+
3. In GitHub → Settings → Branches → require the job names you care about
|
|
46
|
+
4. Map maturity target in `MATURITY.md` terms (Silver vs Gold)
|
|
47
|
+
|
|
48
|
+
Critical control failures **block deployment**, not just “file a ticket”.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Deployment
|
|
2
|
+
|
|
3
|
+
## P0
|
|
4
|
+
|
|
5
|
+
1. Health/readiness checks for services that take traffic
|
|
6
|
+
2. Documented deploy path
|
|
7
|
+
3. Ability to roll back (or feature-flag disable) quickly
|
|
8
|
+
|
|
9
|
+
## P1
|
|
10
|
+
|
|
11
|
+
1. Prefer progressive delivery (flags/canaries) for risky changes
|
|
12
|
+
2. Announce maintenance when downtime is unavoidable
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Environments
|
|
2
|
+
|
|
3
|
+
## P0
|
|
4
|
+
|
|
5
|
+
1. Distinct local / staging / production configurations
|
|
6
|
+
2. Separate secrets and data per environment
|
|
7
|
+
3. Production data does not casually load into personal laptops
|
|
8
|
+
|
|
9
|
+
## P1
|
|
10
|
+
|
|
11
|
+
1. Document required env vars (`.env.example`)
|
|
12
|
+
2. Infra/config changes reviewed like code (IaC preferred)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Release management
|
|
2
|
+
|
|
3
|
+
- Semantic versioning for published packages/APIs when consumers exist
|
|
4
|
+
- Changelog entries for user-facing and breaking changes
|
|
5
|
+
- Release tags on production deploys
|
|
6
|
+
- Use [`checklists/release.md`](../../../checklists/engineering/release.md) and [`checklists/production.md`](../../../checklists/engineering/production.md)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Accessibility
|
|
2
|
+
|
|
3
|
+
Reference: **WCAG** (aim for AA on primary flows unless product requirements say otherwise).
|
|
4
|
+
|
|
5
|
+
## P0
|
|
6
|
+
|
|
7
|
+
1. Primary flows completable by keyboard alone
|
|
8
|
+
2. Interactive controls have accessible names
|
|
9
|
+
3. Meaningful images have appropriate alt text
|
|
10
|
+
|
|
11
|
+
## P1
|
|
12
|
+
|
|
13
|
+
1. Contrast meets AA for text and essential UI
|
|
14
|
+
2. Focus management for dialogs/drawers
|
|
15
|
+
3. Do not convey state by color alone
|
|
16
|
+
4. Automated a11y checks on critical pages in CI when feasible
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Design system
|
|
2
|
+
|
|
3
|
+
If the product has more than a handful of screens:
|
|
4
|
+
|
|
5
|
+
- Shared typography, color, spacing tokens
|
|
6
|
+
- Reusable components (button, input, table, modal, toast)
|
|
7
|
+
- Document states (default/hover/disabled/error)
|
|
8
|
+
- Prefer consistency over one-off styling
|
|
9
|
+
|
|
10
|
+
Skip heavy design-system theater for tiny prototypes — introduce structure when duplication hurts.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Frontend
|
|
2
|
+
|
|
3
|
+
## P0
|
|
4
|
+
|
|
5
|
+
1. Loading / empty / error / success states for critical flows
|
|
6
|
+
2. Forms validate before submit; server remains source of truth
|
|
7
|
+
3. No secrets in the client; treat XSS as a first-class risk
|
|
8
|
+
4. Destructive actions require confirmation
|
|
9
|
+
|
|
10
|
+
## P1
|
|
11
|
+
|
|
12
|
+
1. Responsive layout across mobile/tablet/desktop targets you claim to support
|
|
13
|
+
2. Error boundaries for resilient UI shells
|
|
14
|
+
3. Performance basics: code splitting, image optimization where relevant
|
|
15
|
+
4. Consistent navigation and feedback (toasts/inline errors)
|
|
16
|
+
|
|
17
|
+
Security note: frontend checks are UX. Authorization is enforced on the API.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# UX baseline
|
|
2
|
+
|
|
3
|
+
Full MUST/SHOULD rules live in the design standard ([`../../design/ux/`](../../design/ux/heuristics.md), [`checklists/design/ux-review.md`](../../../checklists/design/ux-review.md)).
|
|
4
|
+
|
|
5
|
+
Minimum here:
|
|
6
|
+
|
|
7
|
+
- Clear primary action per view
|
|
8
|
+
- Understandable error messages (what happened + what to do)
|
|
9
|
+
- Confirm irreversible actions
|
|
10
|
+
- Don’t trap users in dead ends without recovery
|
|
11
|
+
- Onboarding only as complex as the product requires
|
|
12
|
+
- Empty / loading / error states for data views
|
|
13
|
+
- Tokens + system components over one-off styling
|
|
14
|
+
|
|
15
|
+
Agents: follow [`AGENTS.md`](../../../AGENTS.md) and the design rules for UI work.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Alerting
|
|
2
|
+
|
|
3
|
+
Alert on symptoms humans must act on:
|
|
4
|
+
|
|
5
|
+
- API error rate above threshold
|
|
6
|
+
- Database unavailable
|
|
7
|
+
- Disk > 85%
|
|
8
|
+
- Payment/webhook failure spikes
|
|
9
|
+
- Auth abuse patterns (credential stuffing)
|
|
10
|
+
|
|
11
|
+
Alerts without owners or runbooks become noise — attach a next step.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Incidents
|
|
2
|
+
|
|
3
|
+
## Minimum process
|
|
4
|
+
|
|
5
|
+
1. Detect
|
|
6
|
+
2. Mitigate (rollback/flag/scale/patch)
|
|
7
|
+
3. Communicate (status page or user messaging when impact is real)
|
|
8
|
+
4. Write a short postmortem: timeline, cause, fix, follow-ups
|
|
9
|
+
|
|
10
|
+
See [`checklists/incident.md`](../../../checklists/engineering/incident.md).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Monitoring & observability
|
|
2
|
+
|
|
3
|
+
You must be able to answer:
|
|
4
|
+
|
|
5
|
+
> What broke, why, since when, and how many users are affected?
|
|
6
|
+
|
|
7
|
+
## P0
|
|
8
|
+
|
|
9
|
+
1. Error tracking in production
|
|
10
|
+
2. Customers are not your primary monitoring system
|
|
11
|
+
3. Alerts on business-critical signals (e.g. checkout/payment success), not only CPU
|
|
12
|
+
|
|
13
|
+
## P1
|
|
14
|
+
|
|
15
|
+
1. Structured logs + metrics + (when needed) tracing
|
|
16
|
+
2. Synthetic checks on critical journeys
|
|
17
|
+
3. Dashboards for latency, error rate, saturation
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Payments
|
|
2
|
+
|
|
3
|
+
## P0
|
|
4
|
+
|
|
5
|
+
1. Verify webhook signatures before granting entitlements
|
|
6
|
+
2. Idempotent processing — duplicates must not double-charge or double-grant
|
|
7
|
+
3. Never unlock paid features from client-only success callbacks
|
|
8
|
+
4. Money math uses decimal-safe types — never float
|
|
9
|
+
|
|
10
|
+
## P1
|
|
11
|
+
|
|
12
|
+
1. Clear states: pending / succeeded / failed / refunded / canceled
|
|
13
|
+
2. Failed payment retry + user messaging + grace period strategy
|
|
14
|
+
3. Refund/dispute runbook before first real chargeback
|
|
15
|
+
4. Reconciliation/audit trail
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Performance
|
|
2
|
+
|
|
3
|
+
Define targets — even rough ones — or you cannot manage them.
|
|
4
|
+
|
|
5
|
+
Example targets (adjust per product):
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
API p95 < 500ms
|
|
9
|
+
API p99 < 1s
|
|
10
|
+
Critical DB queries < 100ms
|
|
11
|
+
Error rate < 1%
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## P0/P1 practices
|
|
15
|
+
|
|
16
|
+
- Move heavy work to queues
|
|
17
|
+
- Cache expensive reads deliberately
|
|
18
|
+
- Profile before premature sharding
|
|
19
|
+
- Load-test critical paths before marketing spikes
|