@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
package/AGENTS.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# AGENTS.md — Work contract for AI coding agents
|
|
2
|
+
|
|
3
|
+
You are working on software under **devia**. This file is your employment contract.
|
|
4
|
+
Violating it is a failed task, not a stylistic difference.
|
|
5
|
+
|
|
6
|
+
You are not here to produce plausible code. You are here to make a verified change to a system
|
|
7
|
+
you understand, and to leave the project's memory true afterwards.
|
|
8
|
+
|
|
9
|
+
## Rule zero — memory before code
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
Work requested
|
|
13
|
+
↓
|
|
14
|
+
.devia/ exists in the repo? ──NO──► run `devia init` and fill 00_OVERVIEW before coding
|
|
15
|
+
↓ YES
|
|
16
|
+
Read .devia/AGENTS.md → .devia/10_NEVER_ALWAYS.md → .devia/00_OVERVIEW.md
|
|
17
|
+
↓
|
|
18
|
+
Read the .devia file for the surface you are touching (see 14_INDEX.md)
|
|
19
|
+
↓
|
|
20
|
+
Read the standard section for the domain (standard/ + rules/)
|
|
21
|
+
↓
|
|
22
|
+
Work
|
|
23
|
+
↓
|
|
24
|
+
Update .devia/ in the SAME change
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Never start coding "to explore" and read the memory later. The memory is what stops you from
|
|
28
|
+
inventing.
|
|
29
|
+
|
|
30
|
+
## Required workflow
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
Read the contract (this file + .devia/AGENTS.md)
|
|
34
|
+
↓
|
|
35
|
+
Read the relevant memory + domain policy + matching checklist
|
|
36
|
+
↓
|
|
37
|
+
Understand the existing patterns in the target repo before adding new ones
|
|
38
|
+
↓
|
|
39
|
+
Implement the smallest change that satisfies the request
|
|
40
|
+
↓
|
|
41
|
+
Run the checks that exist (lint · typecheck · tests · devia check)
|
|
42
|
+
↓
|
|
43
|
+
Update .devia/ (memory, registries, impact map) in the same change
|
|
44
|
+
↓
|
|
45
|
+
Report what changed, and report what was NOT verified
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Non-negotiable
|
|
49
|
+
|
|
50
|
+
1. **Read before you write.** Read the file you are about to edit, and the memory entry that
|
|
51
|
+
describes it.
|
|
52
|
+
2. **Never invent.** No APIs, business rules, DB fields, config keys, or endpoints that are not
|
|
53
|
+
in the spec, the ADR, or the memory. If it is not decided, it goes in `.devia/11_GAPS.md` —
|
|
54
|
+
it does not go in the code as a silent truth.
|
|
55
|
+
3. **Smallest change that satisfies the request.** No opportunistic refactors riding along.
|
|
56
|
+
4. **Complexity must be earned.** No Redis, Kubernetes, microservices, queues, GraphQL or extra
|
|
57
|
+
databases "because serious apps have them" (`PRINCIPLES.md`).
|
|
58
|
+
5. **Every new dependency is a liability.** Justify it before adding it.
|
|
59
|
+
6. **Code and memory ship together.** If the change makes a `.devia` file false, the same change
|
|
60
|
+
fixes it (`impact-map.yaml` says which).
|
|
61
|
+
7. **Registries are not optional.** Decided-but-not-built goes in `.devia/12_DEBT.md`; the line is
|
|
62
|
+
removed only by the change that discharges it, and reduced — never deleted — when partly done.
|
|
63
|
+
8. **Cite rule IDs** in compliance summaries (`UX-007`, `SEC-002`, `MEM-003`).
|
|
64
|
+
9. **Report what you did not verify.** Silence about unverified work is a false claim of
|
|
65
|
+
completeness.
|
|
66
|
+
10. **Never claim "done" or "production ready"** while a P0 gate is failing or unrun.
|
|
67
|
+
|
|
68
|
+
## Hard stops (refuse or escalate — do not "work around")
|
|
69
|
+
|
|
70
|
+
- Secrets or credentials in source, config, logs, or client bundles
|
|
71
|
+
- Client-only security: hiding UI without a server-side authorization check
|
|
72
|
+
- Any path where one user or tenant can read or write another's data
|
|
73
|
+
- Raw stack traces, SQL errors, or internal identifiers returned to production clients
|
|
74
|
+
- Payment or webhook handling without signature verification and replay protection
|
|
75
|
+
- Schema change without a versioned migration, or editing an already-applied migration
|
|
76
|
+
- Disabling, skipping, or weakening a failing test or check to make CI green
|
|
77
|
+
- `--no-verify` or any hook bypass to get a commit through
|
|
78
|
+
- Committing directly to `main` when the project uses branch + PR
|
|
79
|
+
- Deleting a gap or debt line you did not discharge
|
|
80
|
+
- Third-party documentation, schemas, or assets pasted in as original work
|
|
81
|
+
- Claiming WCAG conformance without contrast, keyboard, and accessible-name evidence
|
|
82
|
+
|
|
83
|
+
## You may NOT declare "production ready" unless
|
|
84
|
+
|
|
85
|
+
Evidence exists across **all** of:
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
Code quality · Security · Architecture · Database · Tests
|
|
89
|
+
Infrastructure · Observability · Backup · Documentation · Compliance · UI/a11y
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Minimum bar: `devia check` reports **no P0 FAIL**, and every residual WARN is listed explicitly
|
|
93
|
+
for the human. Passing unit tests is not Gold maturity — see [`MATURITY.md`](MATURITY.md).
|
|
94
|
+
|
|
95
|
+
## Routing
|
|
96
|
+
|
|
97
|
+
| Task involves… | Read |
|
|
98
|
+
|---|---|
|
|
99
|
+
| What this project is, its stack, its history | `.devia/00_OVERVIEW.md`, `.devia/01_ARCHITECTURE.md` |
|
|
100
|
+
| Things this project has already banned | `.devia/10_NEVER_ALWAYS.md` |
|
|
101
|
+
| Something undecided / not built | `.devia/11_GAPS.md`, `.devia/12_DEBT.md` |
|
|
102
|
+
| How to do a routine task here | `.devia/13_RECIPES.md` |
|
|
103
|
+
| How the standard is enforced | `LEVELS.md`, `MATURITY.md`, `PRINCIPLES.md` |
|
|
104
|
+
| Agent behaviour and memory discipline | `rules/agent/`, `rules/memory/`, `MEMORY.md` |
|
|
105
|
+
| Login, sessions, roles, tenancy | `standard/engineering/security/AUTHENTICATION.md`, `AUTHORIZATION.md`, `rules/security/` |
|
|
106
|
+
| ASVS control mapping | `standard/engineering/security/ASVS_REGISTRY.md` |
|
|
107
|
+
| Schema, migrations, indexes, backups | `standard/engineering/database/`, `rules/database/` |
|
|
108
|
+
| Endpoints, validation, versioning, webhooks | `standard/engineering/backend/API.md`, `rules/api/` |
|
|
109
|
+
| Tests, CI gates | `standard/engineering/testing/`, `standard/engineering/devops/CI_CD.md`, `rules/testing/` |
|
|
110
|
+
| Deploy, environments, rollback | `standard/engineering/devops/`, `rules/devops/` |
|
|
111
|
+
| Logs, metrics, alerts, incidents | `standard/engineering/observability/`, `rules/observability/` |
|
|
112
|
+
| Privacy, retention, deletion/export | `standard/engineering/compliance/`, `rules/privacy/` |
|
|
113
|
+
| LLM features, prompts, agent tools | `standard/engineering/ai/`, `rules/ai/` |
|
|
114
|
+
| Any user-facing UI | `standard/design/`, `rules/ux/`, `rules/ui/`, `rules/accessibility/`, `rules/states/` |
|
|
115
|
+
| Money, dates, numbers on screen | `standard/design/data-display/`, `rules/data-display/` |
|
|
116
|
+
| "Is it production ready?" | `checklists/engineering/production.md` + `devia check` |
|
|
117
|
+
|
|
118
|
+
## UI work is not exempt
|
|
119
|
+
|
|
120
|
+
Every user-facing surface must satisfy the design rules as well as the engineering ones:
|
|
121
|
+
accessible name, keyboard path, visible focus, persistent labels, complete states
|
|
122
|
+
(default · hover · focus · active · disabled · loading · empty · error · success), tokens instead
|
|
123
|
+
of one-off values, and never colour as the only carrier of meaning.
|
|
124
|
+
|
|
125
|
+
A pretty screen does not waive an engineering P0. A green test suite does not waive `A11Y-006`.
|
|
126
|
+
|
|
127
|
+
## Output contract
|
|
128
|
+
|
|
129
|
+
End substantial work with:
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
## Devia compliance
|
|
133
|
+
- Memory read: <files>
|
|
134
|
+
- Domains touched: ...
|
|
135
|
+
- Rules applied (IDs): ...
|
|
136
|
+
- Rules violated / waived (IDs + why): ...
|
|
137
|
+
- P0 status: ...
|
|
138
|
+
- P1 remaining: ...
|
|
139
|
+
- Checks run: ...
|
|
140
|
+
- Checks NOT run (and why): ...
|
|
141
|
+
- Tests added/updated: ...
|
|
142
|
+
- .devia updated: <files> (or: none required, because ...)
|
|
143
|
+
- Registries: gaps added/closed, debt added/reduced/discharged
|
|
144
|
+
- New dependencies (justification, or none): ...
|
|
145
|
+
- Not verified: ...
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
"Not verified" is never empty for a non-trivial change. If you believe it is, you have not
|
|
149
|
+
looked hard enough.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 — 2026-09-03
|
|
4
|
+
|
|
5
|
+
First release. Devia consolidates three bodies of work into one maintained standard plus a
|
|
6
|
+
living project memory.
|
|
7
|
+
|
|
8
|
+
### Standard
|
|
9
|
+
|
|
10
|
+
- Work contract for agents: [`AGENTS.md`](AGENTS.md) — rule zero, hard stops, output contract
|
|
11
|
+
- [`PRINCIPLES.md`](PRINCIPLES.md), [`LEVELS.md`](LEVELS.md) (memory → policy → check →
|
|
12
|
+
enforcement), [`MATURITY.md`](MATURITY.md) (P0–P3, Bronze → Platinum),
|
|
13
|
+
[`GOVERNANCE.md`](GOVERNANCE.md)
|
|
14
|
+
- [`MEMORY.md`](MEMORY.md) — the living-memory doctrine: the two registries, sweep discipline,
|
|
15
|
+
the impact map, no perishable facts, freshness
|
|
16
|
+
|
|
17
|
+
### Rules
|
|
18
|
+
|
|
19
|
+
- Unified registry of **138 rules** with stable IDs, severity, priority, source and validation
|
|
20
|
+
method: [`rules/README.md`](rules/README.md)
|
|
21
|
+
- 58 design rules carried over unchanged from `design-system-standard`: `A11Y-*`, `CMP-*`,
|
|
22
|
+
`CNT-*`, `DATA-*`, `DS-*`, `I18N-*`, `INT-*`, `MOT-*`, `RWD-*`, `STATE-*`, `UI-*`, `UX-*`
|
|
23
|
+
- 80 new engineering, agent and memory rules: `ARC-*`, `SEC-*`, `DB-*`, `API-*`, `TST-*`,
|
|
24
|
+
`OPS-*`, `OBS-*`, `PRIV-*`, `AI-*`, `AGT-*`, `MEM-*`
|
|
25
|
+
- `priority` (P0–P3) added to every rule, including the carried-over design rules
|
|
26
|
+
- Generated index, coverage and traceability: `npm run build:index`
|
|
27
|
+
|
|
28
|
+
### Corpus
|
|
29
|
+
|
|
30
|
+
- `production-app-standard` absorbed into [`standard/engineering/`](standard/engineering/README.md)
|
|
31
|
+
and `checklists/engineering/`
|
|
32
|
+
- `design-system-standard` absorbed into [`standard/design/`](standard/design/README.md) and
|
|
33
|
+
`checklists/design/`
|
|
34
|
+
- See [`MIGRATION.md`](MIGRATION.md) for the path mapping
|
|
35
|
+
|
|
36
|
+
### CLI
|
|
37
|
+
|
|
38
|
+
- `devia init` — writes `.devia/`, vendors the standard, installs the agent adapters
|
|
39
|
+
- `devia validate` — memory integrity: structure, config, impact map, registry ids,
|
|
40
|
+
placeholders, perishable facts
|
|
41
|
+
- `devia check` — readiness gates with P0 blocking, replacing `scripts/production-check.mjs`
|
|
42
|
+
- `devia doctor` — adoption, version drift, and whether the memory lags the code
|
|
43
|
+
- `devia rules` — query the registry by id, domain, priority, severity or text
|
|
44
|
+
- `devia sync` — refresh the vendored standard and report what changed
|
|
45
|
+
- `devia gap` / `devia debt` — registry lines with monotone ids that are never reused
|
|
46
|
+
- `devia skills install` — adapters for Cursor, Claude Code, Copilot, Windsurf and the universal
|
|
47
|
+
`AGENTS.md`
|
|
48
|
+
- `devia --version` prints both versions: the CLI, and the standard it carries
|
|
49
|
+
- `devia init` refuses a root it inferred that is not the current directory — `--root` says
|
|
50
|
+
where, `--yes` accepts the detected one; nothing is written before that is settled
|
|
51
|
+
- `devia check` scans what git carries: tracked files plus untracked ones that are not ignored.
|
|
52
|
+
An ignored build artefact can no longer fail a P0 gate. Without git, the tree is walked instead
|
|
53
|
+
- `.devia/standard/` is vendored together with everything its files link to (`templates/docs/`,
|
|
54
|
+
`templates/github/`, `MIGRATION.md`, `CHANGELOG.md`), so every relative link resolves in the
|
|
55
|
+
adopter's copy; the test walks the materialised tree to prove it
|
|
56
|
+
- `devia.json` records the CLI version in `deviaVersion` and the corpus version in
|
|
57
|
+
`standardVersion` — the two move independently
|
|
58
|
+
- Closing a registry line splices the row out instead of blanking it, which used to leave a
|
|
59
|
+
blank line that ended the markdown table and orphaned every row below it
|
|
60
|
+
- No runtime dependencies
|
|
61
|
+
|
|
62
|
+
### Enforcement
|
|
63
|
+
|
|
64
|
+
- CI runs the whole suite on ubuntu and windows, Node 20 and 22: the CLI writes files on both
|
|
65
|
+
- `npm publish` re-runs `npm run validate`, the tests and both self-checks (`prepublishOnly`)
|
|
66
|
+
|
|
67
|
+
### Adopting
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm install -D @schneiderjoseph/devia && npx devia init
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Replace `node scripts/production-check.mjs` in CI with `npx devia check`, and add
|
|
74
|
+
`npx devia validate`.
|
|
75
|
+
|
|
76
|
+
The package is scoped, the command is not: npm refused the bare name `devia` as too similar to
|
|
77
|
+
existing packages, so installs read `@schneiderjoseph/devia` while everything you type afterwards
|
|
78
|
+
stays `devia`.
|
package/GOVERNANCE.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Governance
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This repository defines the standard. Application repositories **consume** it through
|
|
6
|
+
`devia init` and their own `.devia/`; they do not casually fork conflicting rules.
|
|
7
|
+
|
|
8
|
+
Devia is the only standard maintained here. `production-app-standard` and
|
|
9
|
+
`design-system-standard` are absorbed and frozen — see [`MIGRATION.md`](MIGRATION.md).
|
|
10
|
+
|
|
11
|
+
## Levels
|
|
12
|
+
|
|
13
|
+
Policy → Check → Enforcement, on top of Memory. See [`LEVELS.md`](LEVELS.md).
|
|
14
|
+
A rule without a check is aspirational; a check without CI is a suggestion. Both are allowed,
|
|
15
|
+
provided the rule says which it is.
|
|
16
|
+
|
|
17
|
+
## Changing a rule
|
|
18
|
+
|
|
19
|
+
- A change to a `MUST` requires a PR with rationale and a traceability update
|
|
20
|
+
- Rule IDs are **stable**: supersede, never reuse
|
|
21
|
+
- A rule is never silently deleted: `deprecated` → `superseded` → `removed`, with a changelog
|
|
22
|
+
entry and a migration note (see [`rules/LIFECYCLE.md`](rules/LIFECYCLE.md))
|
|
23
|
+
- New rules start `draft` or `proposed` and carry at least one source
|
|
24
|
+
- Schema changes bump `rule_schema_version` in [`VERSION`](VERSION)
|
|
25
|
+
|
|
26
|
+
## Changing the project template
|
|
27
|
+
|
|
28
|
+
`templates/project/` is what every adopter receives. A change there affects every future
|
|
29
|
+
`devia init`, so it takes the same review bar as a `MUST` rule, plus a note in
|
|
30
|
+
[`CHANGELOG.md`](CHANGELOG.md) telling existing adopters whether `devia sync` is enough.
|
|
31
|
+
|
|
32
|
+
## Versioning
|
|
33
|
+
|
|
34
|
+
[`VERSION`](VERSION) carries the standard version and the schema versions. Breaking changes to
|
|
35
|
+
rule IDs, to the `.devia/` layout, or to the CLI contract bump the version and ship with a
|
|
36
|
+
migration path.
|
|
37
|
+
|
|
38
|
+
Vendored copies in `.devia/standard/` are pinned to the version that wrote them. `devia sync`
|
|
39
|
+
updates them and reports what changed.
|
|
40
|
+
|
|
41
|
+
## Waivers
|
|
42
|
+
|
|
43
|
+
A project may waive a rule. It may not do so silently: the waiver lives in `.devia/`, and names
|
|
44
|
+
the rule ID, the scope, the reason, the accepting human, and an expiry date. An expired waiver
|
|
45
|
+
is a finding, not a habit. Schema: [`schema/waiver.schema.json`](schema/waiver.schema.json).
|
|
46
|
+
|
|
47
|
+
## Scope
|
|
48
|
+
|
|
49
|
+
Devia interprets upstream standards (WCAG 2.2, ARIA APG, OWASP ASVS 5.0, NN/g, and adopted
|
|
50
|
+
design systems). It does not replace an accessibility audit, a penetration test, or legal
|
|
51
|
+
advice.
|
package/LEVELS.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Four levels of the standard
|
|
2
|
+
|
|
3
|
+
Documentation alone is not a standard. Devia operates on four levels, and each one is worthless
|
|
4
|
+
without the next.
|
|
5
|
+
|
|
6
|
+
```text
|
|
7
|
+
LEVEL 0 — MEMORY what is true about this project
|
|
8
|
+
LEVEL 1 — POLICY what must be true of the work
|
|
9
|
+
LEVEL 2 — CHECK how we verify it
|
|
10
|
+
LEVEL 3 — ENFORCEMENT how CI says no
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Level 0 — Memory
|
|
14
|
+
|
|
15
|
+
`.devia/` in the target repo: overview, architecture, surfaces, data model, permissions,
|
|
16
|
+
never/always, gaps, debt, recipes, index, impact map.
|
|
17
|
+
|
|
18
|
+
Without it every agent starts cold, and policy has nothing to attach to: "follow the existing
|
|
19
|
+
pattern" is meaningless if nobody wrote down what the pattern is.
|
|
20
|
+
|
|
21
|
+
Verified by `devia validate` (structure, registries, staleness markers) and `devia doctor`
|
|
22
|
+
(is the memory older than the code it describes?).
|
|
23
|
+
|
|
24
|
+
## Level 1 — Policy
|
|
25
|
+
|
|
26
|
+
Rules with stable IDs under [`rules/`](rules/README.md), domain policy under
|
|
27
|
+
[`standard/`](standard/README.md), and priorities in [`MATURITY.md`](MATURITY.md).
|
|
28
|
+
|
|
29
|
+
Examples: server-side authorization on every sensitive route (`SEC-001`), versioned migrations
|
|
30
|
+
(`DB-001`), visible focus (`A11Y-006`), no undecided rule coded as a silent truth (`MEM-001`).
|
|
31
|
+
|
|
32
|
+
## Level 2 — Check
|
|
33
|
+
|
|
34
|
+
Commands that produce evidence:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm run lint
|
|
38
|
+
npm run typecheck
|
|
39
|
+
npm test
|
|
40
|
+
npm audit --omit=dev
|
|
41
|
+
npx devia validate # memory integrity
|
|
42
|
+
npx devia check # readiness gates (P0/P1) → PASS / WARN / FAIL
|
|
43
|
+
npx devia doctor # adoption, drift, staleness
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`devia check` aggregates evidence into PASS / WARN / FAIL and exits non-zero on any P0 FAIL.
|
|
47
|
+
|
|
48
|
+
## Level 3 — Enforcement
|
|
49
|
+
|
|
50
|
+
CI must be able to say **NO** to a pull request.
|
|
51
|
+
|
|
52
|
+
Copy [`templates/github/workflows/app-ci.yml`](templates/github/workflows/app-ci.yml) into the
|
|
53
|
+
application repo and mark the checks required in branch protection.
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
PR
|
|
57
|
+
├── Lint / Typecheck / Unit required
|
|
58
|
+
├── Integration required (when present)
|
|
59
|
+
├── Dependency audit required
|
|
60
|
+
├── Secret scan required
|
|
61
|
+
├── devia validate (memory) required
|
|
62
|
+
├── devia check (P0) required
|
|
63
|
+
├── Accessibility gates required for UI paths
|
|
64
|
+
├── E2E / smoke required for release paths
|
|
65
|
+
└── MERGE BLOCKED on any FAIL
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Mapping rule
|
|
69
|
+
|
|
70
|
+
Every P0 policy item should map all the way down:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
Memory fact → Policy rule → Checklist item → Automated check → CI gate
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If a P0 cannot be automated yet, document the manual check and treat it as a release-blocking
|
|
77
|
+
sign-off — never as "optional". A rule with no check is aspirational; say so in the rule's
|
|
78
|
+
`validation` block instead of pretending.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Joseph Schneider
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/MATURITY.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Maturity model
|
|
2
|
+
|
|
3
|
+
## Priority tags
|
|
4
|
+
|
|
5
|
+
| Tag | Meaning | Enforcement |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| **P0** | BLOCKER | Must pass for real users / money / data; CI blocks merge or release |
|
|
8
|
+
| **P1** | REQUIRED | Same milestone unless the human records an explicit risk acceptance |
|
|
9
|
+
| **P2** | RECOMMENDED | Scheduled deliberately, not "later" |
|
|
10
|
+
| **P3** | OPTIONAL | Nice to have; never pretend it is done |
|
|
11
|
+
|
|
12
|
+
Rule severities (`MUST`, `MUST NOT`, `SHOULD`, `MAY`) describe the obligation. Priority tags
|
|
13
|
+
describe when the obligation blocks. A `MUST` for a surface the product does not have yet is
|
|
14
|
+
still a `MUST` — it is simply not applicable.
|
|
15
|
+
|
|
16
|
+
## Tiers
|
|
17
|
+
|
|
18
|
+
### Bronze — functional
|
|
19
|
+
|
|
20
|
+
Works for a trusted demo or an internal pilot.
|
|
21
|
+
|
|
22
|
+
- Core happy paths work
|
|
23
|
+
- Basic auth if multi-user
|
|
24
|
+
- Deployable somehow
|
|
25
|
+
- No secrets in the client bundle
|
|
26
|
+
- `.devia/` exists and `00_OVERVIEW.md` is true
|
|
27
|
+
|
|
28
|
+
Not production for paying customers.
|
|
29
|
+
|
|
30
|
+
### Silver — seriously tested and secured
|
|
31
|
+
|
|
32
|
+
- Automated unit tests plus critical integration tests
|
|
33
|
+
- Server-side authorization on every sensitive route
|
|
34
|
+
- Input validation at every external boundary
|
|
35
|
+
- CI on every PR: lint, typecheck, test
|
|
36
|
+
- Dependency audit and secret scan in CI
|
|
37
|
+
- Errors handled without leaking internals
|
|
38
|
+
- Memory current: registries used, `devia validate` clean
|
|
39
|
+
|
|
40
|
+
### Gold — production-ready
|
|
41
|
+
|
|
42
|
+
Everything in [`checklists/engineering/production.md`](checklists/engineering/production.md),
|
|
43
|
+
including:
|
|
44
|
+
|
|
45
|
+
- Cross-user / cross-tenant isolation covered by tests
|
|
46
|
+
- Migrations versioned; backup **and restore** drilled
|
|
47
|
+
- Monitoring, alerting and error tracking in place
|
|
48
|
+
- Staging → production path with a rollback that has actually been used
|
|
49
|
+
- Rate limits on abuse surfaces
|
|
50
|
+
- Privacy baseline matched to the data the product really holds
|
|
51
|
+
- UI surfaces pass the design MUST rules: accessible name, keyboard path, visible focus,
|
|
52
|
+
contrast, persistent labels, complete states
|
|
53
|
+
|
|
54
|
+
`devia check` reports **no P0 FAIL**.
|
|
55
|
+
|
|
56
|
+
### Platinum — production-grade
|
|
57
|
+
|
|
58
|
+
Gold, plus:
|
|
59
|
+
|
|
60
|
+
- High availability where justified; documented DR with RPO/RTO and rehearsed drills
|
|
61
|
+
- Full observability: SLOs and alerts a human can act on
|
|
62
|
+
- Security automation: SAST, dependency and image scanning, ASVS tracking
|
|
63
|
+
- Performance budgets enforced in CI
|
|
64
|
+
- Supply-chain controls: lockfile discipline, SBOM where appropriate
|
|
65
|
+
- Compliance controls matched to real obligations, not imagined ones
|
|
66
|
+
- Accessibility validated with assistive technology, not only automated checks
|
|
67
|
+
|
|
68
|
+
## Declaring a tier
|
|
69
|
+
|
|
70
|
+
Record it in `.devia/devia.json` and keep it honest:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{ "maturity": { "target": "gold", "current": "silver" } }
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
List the blockers in `.devia/12_DEBT.md`.
|
|
77
|
+
|
|
78
|
+
Agents must never claim Gold or "production ready" while a P0 fails, is unrun, or is unknown.
|
|
79
|
+
"I did not check" is reported, not rounded up.
|
package/MEMORY.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Living memory
|
|
2
|
+
|
|
3
|
+
The part of devia that is not a rulebook. `.devia/` is what an agent reads to stop being a
|
|
4
|
+
stranger to the project.
|
|
5
|
+
|
|
6
|
+
```text
|
|
7
|
+
docs/ long specifications — the source of truth for details
|
|
8
|
+
.devia/ short indexed memory — what exists, where it is, what is decided, what is not
|
|
9
|
+
code the only thing that is true by construction
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`.devia/` points into the other two. It never copies them.
|
|
13
|
+
|
|
14
|
+
## What memory must answer in under a minute
|
|
15
|
+
|
|
16
|
+
1. What is this project, and what is it built with?
|
|
17
|
+
2. How is it organised, and what boundaries must not be crossed?
|
|
18
|
+
3. What surfaces exist (pages, endpoints, jobs), and where do they live?
|
|
19
|
+
4. What has this project already banned, and why?
|
|
20
|
+
5. What is decided but not built?
|
|
21
|
+
6. What is not decided at all?
|
|
22
|
+
7. How do I do the routine task I am about to do?
|
|
23
|
+
|
|
24
|
+
A memory file that cannot answer its question in a scan is too long or too vague.
|
|
25
|
+
|
|
26
|
+
## The two registries
|
|
27
|
+
|
|
28
|
+
They are different things and must never be merged.
|
|
29
|
+
|
|
30
|
+
| Registry | Means | Failure it prevents |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| `11_GAPS.md` | **Undecided.** Nobody has ruled on it. | The agent quietly picks an answer and encodes it as truth |
|
|
33
|
+
| `12_DEBT.md` | **Decided, not built.** The rule exists; the code does not honour it yet. | "We know about it" — knowledge that leaves no trace and never gets scheduled |
|
|
34
|
+
|
|
35
|
+
Discipline for both:
|
|
36
|
+
|
|
37
|
+
- A decided `MUST` that the code violates is a **debt line**, not a shared understanding.
|
|
38
|
+
- You **add** the line even when you are not going to fix it.
|
|
39
|
+
- You **remove** the line in the same change that discharges it — never before, never later.
|
|
40
|
+
- Partly done means you **reduce** the line, not delete it.
|
|
41
|
+
- IDs are monotone and never reused. `G12` always means the same thing forever.
|
|
42
|
+
- A false line is worse than a missing one. Verify before you record.
|
|
43
|
+
- Closing a line requires naming the change that closed it.
|
|
44
|
+
|
|
45
|
+
## Sweep discipline
|
|
46
|
+
|
|
47
|
+
A registry fed only by accident gives false confidence: it looks like a map of the problems and
|
|
48
|
+
is actually a map of what somebody happened to notice.
|
|
49
|
+
|
|
50
|
+
So: a change that touches a **shared surface** sweeps that surface.
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
Touched schema → sweep the tables you touched for rules they violate
|
|
54
|
+
Touched a route → sweep the routes on that resource
|
|
55
|
+
Touched a port → sweep every implementation of it
|
|
56
|
+
Touched a token → sweep the components consuming it
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Record what the sweep found. "Found nothing" is a valid, useful result — say it.
|
|
60
|
+
|
|
61
|
+
## The impact map
|
|
62
|
+
|
|
63
|
+
`.devia/impact-map.yaml` is the mechanical part: change type → files that must be updated in the
|
|
64
|
+
same change. It is what makes "update the memory" a check instead of a virtue.
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
new_table: ["03_DATA_MODEL.md", "docs/DATABASE.md"]
|
|
68
|
+
new_endpoint: ["02_SURFACES.md"]
|
|
69
|
+
permission_change:["04_PERMISSIONS.md", "docs/PERMISSIONS.md"]
|
|
70
|
+
new_integration: ["06_INTEGRATIONS.md"]
|
|
71
|
+
design_token: ["07_DESIGN.md"]
|
|
72
|
+
architecture: ["01_ARCHITECTURE.md"]
|
|
73
|
+
stack_change: ["00_OVERVIEW.md", "01_ARCHITECTURE.md"]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Extend it as the project grows a surface. An impact map that never changes is not being used.
|
|
77
|
+
|
|
78
|
+
## No perishable facts
|
|
79
|
+
|
|
80
|
+
Overview and index files describe what the project **is**, not where the work happens to be
|
|
81
|
+
this week.
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
Ban: "42 tests passing", "next we build the invoice screen", "currently on branch feat/x"
|
|
85
|
+
Keep: "payments are escrowed until a release trigger fires (see docs/ESCROW.md §3)"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Perishable facts belong to the registries and the tracker, which have owners and lifecycles.
|
|
89
|
+
Anything with a countdown in it rots into a lie and takes the credibility of the file with it.
|
|
90
|
+
|
|
91
|
+
## Never / always grows from incidents
|
|
92
|
+
|
|
93
|
+
`10_NEVER_ALWAYS.md` is not brainstormed up front. Each line earns its place by being a mistake
|
|
94
|
+
that actually happened, or a decision that was actually contested.
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
Bug or bad agent change happens
|
|
98
|
+
↓
|
|
99
|
+
Fix it
|
|
100
|
+
↓
|
|
101
|
+
Add ONE never/always line naming the trap and the correct move
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Lines that were never violated by anyone are noise, and noise trains agents to skim.
|
|
105
|
+
|
|
106
|
+
## Freshness
|
|
107
|
+
|
|
108
|
+
Memory that lags the code is a trap: it is trusted precisely because it looks maintained.
|
|
109
|
+
|
|
110
|
+
- `devia validate` checks the structure, the registries, and the placeholders
|
|
111
|
+
- `devia doctor` compares the last commit that touched the code with the last commit that
|
|
112
|
+
touched `.devia/`, and reports the drift
|
|
113
|
+
- CI runs both; a change that moves a surface without touching the memory fails review
|
|
114
|
+
|
|
115
|
+
## Ownership
|
|
116
|
+
|
|
117
|
+
Humans own the decisions. Agents own keeping the record of them true.
|
|
118
|
+
|
|
119
|
+
An agent may never remove a gap or a debt line to make a report look better, downgrade a `MUST`
|
|
120
|
+
without a waiver, or quietly rewrite a decision it disagrees with. It may — and should — flag
|
|
121
|
+
that the memory contradicts the code, because that is the single highest-value thing it can
|
|
122
|
+
notice.
|
package/MIGRATION.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Migration — from two standards to one
|
|
2
|
+
|
|
3
|
+
Devia consolidates three bodies of work into a single maintained standard:
|
|
4
|
+
|
|
5
|
+
| Source | Became |
|
|
6
|
+
|---|---|
|
|
7
|
+
| `production-app-standard` | [`standard/engineering/`](standard/engineering/README.md), [`checklists/engineering/`](checklists/README.md), engineering rule IDs |
|
|
8
|
+
| `design-system-standard` | [`standard/design/`](standard/design/README.md), [`checklists/design/`](checklists/README.md), design rule IDs |
|
|
9
|
+
| Ad-hoc project memory (`DEVIA/` folders, agent guides, gap and debt registers) | [`MEMORY.md`](MEMORY.md), `rules/memory/`, `rules/agent/`, the `.devia/` template |
|
|
10
|
+
|
|
11
|
+
Only devia is maintained. The two source repositories are frozen; do not open PRs against them.
|
|
12
|
+
|
|
13
|
+
## Path mapping
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
production-app-standard/docs/<domain>/X.md → devia/standard/engineering/<domain>/X.md
|
|
17
|
+
production-app-standard/checklists/X.md → devia/checklists/engineering/X.md
|
|
18
|
+
production-app-standard/templates/ADR.md → devia/templates/docs/ADR.md
|
|
19
|
+
production-app-standard/scripts/production-check.mjs
|
|
20
|
+
→ devia check (CLI command)
|
|
21
|
+
|
|
22
|
+
design-system-standard/rules/<domain>/ID.md → devia/rules/<domain>/ID.md
|
|
23
|
+
design-system-standard/<domain>/X.md → devia/standard/design/<domain>/X.md
|
|
24
|
+
design-system-standard/checklists/X.md → devia/checklists/design/X.md
|
|
25
|
+
design-system-standard/schema/*.json → devia/schema/*.json
|
|
26
|
+
design-system-standard/scripts/validate-*.mjs
|
|
27
|
+
→ devia/scripts/validate-*.mjs
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Rule IDs
|
|
31
|
+
|
|
32
|
+
Design rule IDs are **unchanged**: `A11Y-*`, `CMP-*`, `CNT-*`, `DATA-*`, `DS-*`, `I18N-*`,
|
|
33
|
+
`INT-*`, `MOT-*`, `RWD-*`, `STATE-*`, `UI-*`, `UX-*`. Anything citing them keeps working.
|
|
34
|
+
|
|
35
|
+
Engineering and agent rules are **new** IDs, not renames: `ARC-*`, `SEC-*`, `DB-*`, `API-*`,
|
|
36
|
+
`TST-*`, `OPS-*`, `OBS-*`, `PRIV-*`, `AI-*`, `AGT-*`, `MEM-*`. They formalise obligations that
|
|
37
|
+
`production-app-standard` expressed only as prose and checklists.
|
|
38
|
+
|
|
39
|
+
Note the two `DATA` families do not collide: `DATA-*` is data **display** (design), database
|
|
40
|
+
rules are `DB-*`.
|
|
41
|
+
|
|
42
|
+
## If a repo already adopted one of the old standards
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm install -D @schneiderjoseph/devia
|
|
46
|
+
npx devia init # writes .devia/ and the agent adapters
|
|
47
|
+
npx devia validate
|
|
48
|
+
npx devia check
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Then:
|
|
52
|
+
|
|
53
|
+
1. Delete `.cursor/rules/production-app-standard.mdc` and
|
|
54
|
+
`.cursor/rules/design-system-standard.mdc`; `devia init` writes `.cursor/rules/devia.mdc`.
|
|
55
|
+
2. Replace references to `production-app-standard` / `design-system-standard` in the repo's own
|
|
56
|
+
`AGENTS.md`, `CLAUDE.md` or `CONTRIBUTING.md` with `.devia/AGENTS.md`.
|
|
57
|
+
3. Move anything the project had recorded as "known issues" into `.devia/11_GAPS.md`
|
|
58
|
+
(undecided) and `.devia/12_DEBT.md` (decided, not built) — the split matters.
|
|
59
|
+
4. Replace `node scripts/production-check.mjs` in CI with `npx devia check`.
|
|
60
|
+
|
|
61
|
+
Nothing in the old repos is lost: the full text of both is vendored here, and `devia init`
|
|
62
|
+
vendors it again into the project under `.devia/standard/`.
|