@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.
Files changed (435) hide show
  1. package/AGENTS.md +149 -0
  2. package/CHANGELOG.md +78 -0
  3. package/GOVERNANCE.md +51 -0
  4. package/LEVELS.md +78 -0
  5. package/LICENSE +21 -0
  6. package/MATURITY.md +79 -0
  7. package/MEMORY.md +122 -0
  8. package/MIGRATION.md +62 -0
  9. package/PRINCIPLES.md +110 -0
  10. package/README.md +125 -0
  11. package/REFERENCES.md +30 -0
  12. package/VERSION +5 -0
  13. package/bin/devia.mjs +13 -0
  14. package/checklists/README.md +39 -0
  15. package/checklists/design/accessibility-review.md +11 -0
  16. package/checklists/design/design-to-code-review.md +10 -0
  17. package/checklists/design/responsive-review.md +7 -0
  18. package/checklists/design/ui-review.md +8 -0
  19. package/checklists/design/ux-review.md +10 -0
  20. package/checklists/engineering/accessibility.md +8 -0
  21. package/checklists/engineering/api.md +12 -0
  22. package/checklists/engineering/architecture.md +8 -0
  23. package/checklists/engineering/database.md +11 -0
  24. package/checklists/engineering/devops.md +9 -0
  25. package/checklists/engineering/disaster-recovery.md +9 -0
  26. package/checklists/engineering/frontend.md +9 -0
  27. package/checklists/engineering/incident.md +9 -0
  28. package/checklists/engineering/performance.md +7 -0
  29. package/checklists/engineering/production.md +26 -0
  30. package/checklists/engineering/release.md +17 -0
  31. package/checklists/engineering/security.md +33 -0
  32. package/checklists/engineering/testing.md +8 -0
  33. package/compliance/COVERAGE.md +46 -0
  34. package/compliance/REQUIREMENTS.md +8 -0
  35. package/compliance/TRACEABILITY.md +160 -0
  36. package/compliance/WAIVERS.md +13 -0
  37. package/package.json +74 -0
  38. package/rules/LIFECYCLE.md +16 -0
  39. package/rules/README.md +166 -0
  40. package/rules/accessibility/A11Y-001.md +42 -0
  41. package/rules/accessibility/A11Y-002.md +41 -0
  42. package/rules/accessibility/A11Y-003.md +40 -0
  43. package/rules/accessibility/A11Y-004.md +40 -0
  44. package/rules/accessibility/A11Y-005.md +39 -0
  45. package/rules/accessibility/A11Y-006.md +42 -0
  46. package/rules/accessibility/A11Y-007.md +39 -0
  47. package/rules/accessibility/A11Y-008.md +40 -0
  48. package/rules/accessibility/A11Y-009.md +41 -0
  49. package/rules/accessibility/A11Y-010.md +40 -0
  50. package/rules/accessibility/A11Y-011.md +39 -0
  51. package/rules/accessibility/A11Y-012.md +39 -0
  52. package/rules/agent/AGT-001.md +42 -0
  53. package/rules/agent/AGT-002.md +39 -0
  54. package/rules/agent/AGT-003.md +38 -0
  55. package/rules/agent/AGT-004.md +39 -0
  56. package/rules/agent/AGT-005.md +38 -0
  57. package/rules/agent/AGT-006.md +38 -0
  58. package/rules/agent/AGT-007.md +38 -0
  59. package/rules/agent/AGT-008.md +38 -0
  60. package/rules/agent/AGT-009.md +39 -0
  61. package/rules/agent/AGT-010.md +38 -0
  62. package/rules/agent/AGT-011.md +38 -0
  63. package/rules/ai/AI-001.md +44 -0
  64. package/rules/ai/AI-002.md +39 -0
  65. package/rules/ai/AI-003.md +40 -0
  66. package/rules/ai/AI-004.md +39 -0
  67. package/rules/ai/AI-005.md +38 -0
  68. package/rules/api/API-001.md +39 -0
  69. package/rules/api/API-002.md +39 -0
  70. package/rules/api/API-003.md +39 -0
  71. package/rules/api/API-004.md +38 -0
  72. package/rules/api/API-005.md +39 -0
  73. package/rules/api/API-006.md +40 -0
  74. package/rules/architecture/ARC-001.md +41 -0
  75. package/rules/architecture/ARC-002.md +43 -0
  76. package/rules/architecture/ARC-003.md +43 -0
  77. package/rules/architecture/ARC-004.md +40 -0
  78. package/rules/architecture/ARC-005.md +39 -0
  79. package/rules/architecture/ARC-006.md +39 -0
  80. package/rules/components/CMP-001.md +39 -0
  81. package/rules/components/CMP-002.md +38 -0
  82. package/rules/components/CMP-003.md +39 -0
  83. package/rules/components/CMP-004.md +40 -0
  84. package/rules/components/CMP-005.md +39 -0
  85. package/rules/content/CNT-001.md +39 -0
  86. package/rules/data-display/DATA-001.md +39 -0
  87. package/rules/data-display/DATA-002.md +39 -0
  88. package/rules/data-display/DATA-003.md +40 -0
  89. package/rules/data-display/DATA-004.md +40 -0
  90. package/rules/database/DB-001.md +43 -0
  91. package/rules/database/DB-002.md +38 -0
  92. package/rules/database/DB-003.md +40 -0
  93. package/rules/database/DB-004.md +44 -0
  94. package/rules/database/DB-005.md +39 -0
  95. package/rules/database/DB-006.md +38 -0
  96. package/rules/database/DB-007.md +40 -0
  97. package/rules/database/DB-008.md +40 -0
  98. package/rules/design-system/DS-001.md +39 -0
  99. package/rules/design-system/DS-002.md +40 -0
  100. package/rules/design-system/DS-003.md +38 -0
  101. package/rules/devops/OPS-001.md +43 -0
  102. package/rules/devops/OPS-002.md +39 -0
  103. package/rules/devops/OPS-003.md +38 -0
  104. package/rules/devops/OPS-004.md +40 -0
  105. package/rules/devops/OPS-005.md +43 -0
  106. package/rules/devops/OPS-006.md +38 -0
  107. package/rules/devops/OPS-007.md +40 -0
  108. package/rules/interaction/INT-001.md +39 -0
  109. package/rules/interaction/INT-002.md +39 -0
  110. package/rules/localization/I18N-001.md +38 -0
  111. package/rules/localization/I18N-002.md +40 -0
  112. package/rules/localization/I18N-003.md +39 -0
  113. package/rules/memory/MEM-001.md +44 -0
  114. package/rules/memory/MEM-002.md +39 -0
  115. package/rules/memory/MEM-003.md +38 -0
  116. package/rules/memory/MEM-004.md +38 -0
  117. package/rules/memory/MEM-005.md +38 -0
  118. package/rules/memory/MEM-006.md +38 -0
  119. package/rules/memory/MEM-007.md +38 -0
  120. package/rules/memory/MEM-008.md +38 -0
  121. package/rules/memory/MEM-009.md +39 -0
  122. package/rules/memory/MEM-010.md +38 -0
  123. package/rules/memory/MEM-011.md +38 -0
  124. package/rules/motion/MOT-001.md +38 -0
  125. package/rules/observability/OBS-001.md +40 -0
  126. package/rules/observability/OBS-002.md +40 -0
  127. package/rules/observability/OBS-003.md +38 -0
  128. package/rules/observability/OBS-004.md +38 -0
  129. package/rules/privacy/PRIV-001.md +38 -0
  130. package/rules/privacy/PRIV-002.md +44 -0
  131. package/rules/privacy/PRIV-003.md +40 -0
  132. package/rules/privacy/PRIV-004.md +41 -0
  133. package/rules/responsive/RWD-001.md +40 -0
  134. package/rules/responsive/RWD-002.md +39 -0
  135. package/rules/responsive/RWD-003.md +39 -0
  136. package/rules/security/SEC-001.md +44 -0
  137. package/rules/security/SEC-002.md +44 -0
  138. package/rules/security/SEC-003.md +41 -0
  139. package/rules/security/SEC-004.md +40 -0
  140. package/rules/security/SEC-005.md +42 -0
  141. package/rules/security/SEC-006.md +40 -0
  142. package/rules/security/SEC-007.md +44 -0
  143. package/rules/security/SEC-008.md +39 -0
  144. package/rules/security/SEC-009.md +40 -0
  145. package/rules/security/SEC-010.md +40 -0
  146. package/rules/security/SEC-011.md +40 -0
  147. package/rules/security/SEC-012.md +40 -0
  148. package/rules/states/STATE-001.md +38 -0
  149. package/rules/states/STATE-002.md +39 -0
  150. package/rules/states/STATE-003.md +39 -0
  151. package/rules/states/STATE-004.md +38 -0
  152. package/rules/testing/TST-001.md +39 -0
  153. package/rules/testing/TST-002.md +39 -0
  154. package/rules/testing/TST-003.md +39 -0
  155. package/rules/testing/TST-004.md +38 -0
  156. package/rules/testing/TST-005.md +40 -0
  157. package/rules/testing/TST-006.md +39 -0
  158. package/rules/ui/UI-001.md +40 -0
  159. package/rules/ui/UI-002.md +38 -0
  160. package/rules/ui/UI-003.md +41 -0
  161. package/rules/ui/UI-004.md +41 -0
  162. package/rules/ui/UI-005.md +41 -0
  163. package/rules/ui/UI-006.md +40 -0
  164. package/rules/ui/UI-007.md +41 -0
  165. package/rules/ux/UX-001.md +41 -0
  166. package/rules/ux/UX-002.md +41 -0
  167. package/rules/ux/UX-003.md +39 -0
  168. package/rules/ux/UX-004.md +39 -0
  169. package/rules/ux/UX-005.md +40 -0
  170. package/rules/ux/UX-006.md +40 -0
  171. package/rules/ux/UX-007.md +44 -0
  172. package/rules/ux/UX-008.md +41 -0
  173. package/rules/ux/UX-009.md +39 -0
  174. package/rules/ux/UX-010.md +40 -0
  175. package/rules/ux/UX-011.md +40 -0
  176. package/rules/ux/UX-012.md +40 -0
  177. package/rules/ux/UX-013.md +39 -0
  178. package/schema/README.md +19 -0
  179. package/schema/checklist.schema.json +34 -0
  180. package/schema/component.schema.json +37 -0
  181. package/schema/project-config.schema.json +70 -0
  182. package/schema/rule.schema.json +104 -0
  183. package/schema/token.schema.json +15 -0
  184. package/schema/waiver.schema.json +33 -0
  185. package/scripts/build-index.mjs +178 -0
  186. package/scripts/validate-links.mjs +43 -0
  187. package/scripts/validate-rules.mjs +42 -0
  188. package/skills/devia/SKILL.md +114 -0
  189. package/src/cli.mjs +107 -0
  190. package/src/commands/check.mjs +483 -0
  191. package/src/commands/doctor.mjs +139 -0
  192. package/src/commands/init.mjs +186 -0
  193. package/src/commands/registry.mjs +154 -0
  194. package/src/commands/rules.mjs +101 -0
  195. package/src/commands/skills.mjs +97 -0
  196. package/src/commands/sync.mjs +83 -0
  197. package/src/commands/validate.mjs +194 -0
  198. package/src/lib/fs.mjs +89 -0
  199. package/src/lib/git.mjs +31 -0
  200. package/src/lib/rules.mjs +85 -0
  201. package/src/lib/ui.mjs +52 -0
  202. package/src/lib/vendor.mjs +74 -0
  203. package/src/lib/version.mjs +19 -0
  204. package/src/lib/yaml.mjs +152 -0
  205. package/standard/README.md +31 -0
  206. package/standard/design/README.md +51 -0
  207. package/standard/design/REFERENCES.md +39 -0
  208. package/standard/design/accessibility/aria.md +7 -0
  209. package/standard/design/accessibility/contrast.md +6 -0
  210. package/standard/design/accessibility/focus.md +6 -0
  211. package/standard/design/accessibility/forms.md +3 -0
  212. package/standard/design/accessibility/keyboard.md +6 -0
  213. package/standard/design/accessibility/reduced-motion.md +3 -0
  214. package/standard/design/accessibility/reflow.md +3 -0
  215. package/standard/design/accessibility/screen-readers.md +3 -0
  216. package/standard/design/accessibility/target-size.md +3 -0
  217. package/standard/design/accessibility/testing.md +3 -0
  218. package/standard/design/accessibility/wcag-2.2.md +16 -0
  219. package/standard/design/accessibility/zoom.md +3 -0
  220. package/standard/design/ai/ai-design-rules.md +8 -0
  221. package/standard/design/ai/anti-patterns.md +1 -0
  222. package/standard/design/ai/compliance-format.md +22 -0
  223. package/standard/design/ai/design-review.md +10 -0
  224. package/standard/design/ai/evals/README.md +1 -0
  225. package/standard/design/ai/instructions.md +7 -0
  226. package/standard/design/ai/prompts/accessibility-review.md +5 -0
  227. package/standard/design/ai/prompts/design-system-review.md +5 -0
  228. package/standard/design/ai/prompts/ui-review.md +5 -0
  229. package/standard/design/ai/prompts/ux-review.md +5 -0
  230. package/standard/design/ai/review-protocol.md +11 -0
  231. package/standard/design/anti-patterns/accessibility.md +7 -0
  232. package/standard/design/anti-patterns/ai-generated.md +6 -0
  233. package/standard/design/anti-patterns/dashboards.md +5 -0
  234. package/standard/design/anti-patterns/forms.md +5 -0
  235. package/standard/design/anti-patterns/responsive.md +5 -0
  236. package/standard/design/anti-patterns/ui.md +6 -0
  237. package/standard/design/anti-patterns/ux.md +5 -0
  238. package/standard/design/components/buttons.md +6 -0
  239. package/standard/design/components/dialogs.md +5 -0
  240. package/standard/design/components/feedback.md +3 -0
  241. package/standard/design/components/forms.md +3 -0
  242. package/standard/design/components/navigation.md +3 -0
  243. package/standard/design/components/tables.md +6 -0
  244. package/standard/design/content/error-messages.md +4 -0
  245. package/standard/design/content/ux-writing.md +5 -0
  246. package/standard/design/data-display/README.md +5 -0
  247. package/standard/design/data-display/currency.md +3 -0
  248. package/standard/design/data-display/dates.md +3 -0
  249. package/standard/design/data-display/density.md +3 -0
  250. package/standard/design/data-display/filtering.md +3 -0
  251. package/standard/design/data-display/localization.md +3 -0
  252. package/standard/design/data-display/numbers.md +3 -0
  253. package/standard/design/data-display/pagination.md +3 -0
  254. package/standard/design/data-display/percentages.md +3 -0
  255. package/standard/design/data-display/sorting.md +3 -0
  256. package/standard/design/data-display/tables.md +3 -0
  257. package/standard/design/data-display/time.md +3 -0
  258. package/standard/design/decisions/ADR-001-token-naming.md +13 -0
  259. package/standard/design/decisions/ADR-002-radius-scale.md +9 -0
  260. package/standard/design/decisions/ADR-003-color-system.md +9 -0
  261. package/standard/design/decisions/ADR-004-component-versioning.md +9 -0
  262. package/standard/design/decisions/README.md +3 -0
  263. package/standard/design/design-system/components.md +9 -0
  264. package/standard/design/design-system/naming.md +19 -0
  265. package/standard/design/design-system/tokens.md +7 -0
  266. package/standard/design/design-system/variants.md +5 -0
  267. package/standard/design/design-system/versioning.md +5 -0
  268. package/standard/design/health/coverage.md +1 -0
  269. package/standard/design/health/dashboard.md +14 -0
  270. package/standard/design/health/maturity-model.md +9 -0
  271. package/standard/design/health/score.md +14 -0
  272. package/standard/design/interaction/README.md +10 -0
  273. package/standard/design/interaction/keyboard.md +3 -0
  274. package/standard/design/interaction/mouse.md +2 -0
  275. package/standard/design/interaction/pen.md +1 -0
  276. package/standard/design/interaction/touch.md +3 -0
  277. package/standard/design/interaction/touchscreen.md +6 -0
  278. package/standard/design/interaction/voice.md +2 -0
  279. package/standard/design/localization/README.md +5 -0
  280. package/standard/design/localization/currency.md +3 -0
  281. package/standard/design/localization/date-time.md +3 -0
  282. package/standard/design/localization/i18n.md +3 -0
  283. package/standard/design/localization/locale-testing.md +3 -0
  284. package/standard/design/localization/number-formatting.md +3 -0
  285. package/standard/design/localization/pluralization.md +3 -0
  286. package/standard/design/localization/rtl.md +3 -0
  287. package/standard/design/localization/text-expansion.md +3 -0
  288. package/standard/design/motion/animation.md +6 -0
  289. package/standard/design/penpot/WORKFLOW.md +27 -0
  290. package/standard/design/platforms/README.md +12 -0
  291. package/standard/design/platforms/desktop/README.md +5 -0
  292. package/standard/design/platforms/mobile/android.md +5 -0
  293. package/standard/design/platforms/mobile/ios.md +5 -0
  294. package/standard/design/platforms/tablet/README.md +5 -0
  295. package/standard/design/platforms/web/README.md +1 -0
  296. package/standard/design/principles/design-principles.md +9 -0
  297. package/standard/design/principles/ui-principles.md +7 -0
  298. package/standard/design/principles/ux-principles.md +14 -0
  299. package/standard/design/references/atlassian.md +3 -0
  300. package/standard/design/references/carbon.md +3 -0
  301. package/standard/design/references/figma-sds.md +5 -0
  302. package/standard/design/references/govuk.md +3 -0
  303. package/standard/design/references/material.md +3 -0
  304. package/standard/design/references/nng.md +3 -0
  305. package/standard/design/references/openui.md +3 -0
  306. package/standard/design/references/primer.md +5 -0
  307. package/standard/design/references/storybook.md +3 -0
  308. package/standard/design/references/uswds.md +3 -0
  309. package/standard/design/references/w3c.md +3 -0
  310. package/standard/design/responsive/desktop.md +4 -0
  311. package/standard/design/responsive/mobile.md +6 -0
  312. package/standard/design/responsive/tablet.md +3 -0
  313. package/standard/design/states/async.md +3 -0
  314. package/standard/design/states/conflict.md +3 -0
  315. package/standard/design/states/empty.md +3 -0
  316. package/standard/design/states/error.md +3 -0
  317. package/standard/design/states/interaction.md +5 -0
  318. package/standard/design/states/loading.md +3 -0
  319. package/standard/design/states/offline.md +3 -0
  320. package/standard/design/states/optimistic.md +3 -0
  321. package/standard/design/states/partial.md +3 -0
  322. package/standard/design/states/permission-denied.md +3 -0
  323. package/standard/design/states/rate-limited.md +3 -0
  324. package/standard/design/states/read-only.md +3 -0
  325. package/standard/design/states/retry.md +3 -0
  326. package/standard/design/states/skeleton.md +3 -0
  327. package/standard/design/states/stale.md +3 -0
  328. package/standard/design/states/success.md +3 -0
  329. package/standard/design/states/timeout.md +3 -0
  330. package/standard/design/states/unsaved-changes.md +3 -0
  331. package/standard/design/ui/color.md +6 -0
  332. package/standard/design/ui/grids.md +5 -0
  333. package/standard/design/ui/icons.md +5 -0
  334. package/standard/design/ui/imagery.md +5 -0
  335. package/standard/design/ui/layout.md +5 -0
  336. package/standard/design/ui/spacing.md +5 -0
  337. package/standard/design/ui/typography.md +6 -0
  338. package/standard/design/ui/visual-design.md +7 -0
  339. package/standard/design/ux/cognitive-load.md +5 -0
  340. package/standard/design/ux/errors.md +6 -0
  341. package/standard/design/ux/feedback.md +5 -0
  342. package/standard/design/ux/forms.md +7 -0
  343. package/standard/design/ux/heuristics.md +14 -0
  344. package/standard/design/ux/information-architecture.md +6 -0
  345. package/standard/design/ux/navigation.md +6 -0
  346. package/standard/design/ux/usability.md +6 -0
  347. package/standard/engineering/README.md +29 -0
  348. package/standard/engineering/REFERENCES.md +42 -0
  349. package/standard/engineering/ai/AI_SECURITY.md +15 -0
  350. package/standard/engineering/ai/PROMPT_SECURITY.md +6 -0
  351. package/standard/engineering/architecture/ADR.md +11 -0
  352. package/standard/engineering/architecture/ARCHITECTURE.md +25 -0
  353. package/standard/engineering/architecture/PRINCIPLES.md +17 -0
  354. package/standard/engineering/architecture/THREAT_MODEL.md +14 -0
  355. package/standard/engineering/backend/API.md +29 -0
  356. package/standard/engineering/backend/BACKGROUND_JOBS.md +12 -0
  357. package/standard/engineering/backend/ERROR_HANDLING.md +26 -0
  358. package/standard/engineering/backend/LOGGING.md +12 -0
  359. package/standard/engineering/compliance/DATA_RETENTION.md +10 -0
  360. package/standard/engineering/compliance/PRIVACY.md +11 -0
  361. package/standard/engineering/database/BACKUPS.md +19 -0
  362. package/standard/engineering/database/DATABASE.md +30 -0
  363. package/standard/engineering/database/MIGRATIONS.md +12 -0
  364. package/standard/engineering/devops/BRANCH_PROTECTION.md +17 -0
  365. package/standard/engineering/devops/CI_CD.md +48 -0
  366. package/standard/engineering/devops/DEPLOYMENT.md +12 -0
  367. package/standard/engineering/devops/DOCKER.md +9 -0
  368. package/standard/engineering/devops/ENVIRONMENTS.md +12 -0
  369. package/standard/engineering/devops/RELEASE.md +6 -0
  370. package/standard/engineering/devops/ROLLBACK.md +9 -0
  371. package/standard/engineering/frontend/ACCESSIBILITY.md +16 -0
  372. package/standard/engineering/frontend/DESIGN_SYSTEM.md +10 -0
  373. package/standard/engineering/frontend/FRONTEND.md +17 -0
  374. package/standard/engineering/frontend/UX.md +15 -0
  375. package/standard/engineering/observability/ALERTING.md +11 -0
  376. package/standard/engineering/observability/INCIDENTS.md +10 -0
  377. package/standard/engineering/observability/MONITORING.md +17 -0
  378. package/standard/engineering/payments/PAYMENTS.md +15 -0
  379. package/standard/engineering/performance/PERFORMANCE.md +19 -0
  380. package/standard/engineering/security/API_SECURITY.md +22 -0
  381. package/standard/engineering/security/ASVS_5.0/V10_MALICIOUS_CODE.md +31 -0
  382. package/standard/engineering/security/ASVS_5.0/V11_BUSINESS_LOGIC.md +31 -0
  383. package/standard/engineering/security/ASVS_5.0/V12_FILES.md +31 -0
  384. package/standard/engineering/security/ASVS_5.0/V13_API.md +31 -0
  385. package/standard/engineering/security/ASVS_5.0/V14_CONFIGURATION.md +31 -0
  386. package/standard/engineering/security/ASVS_5.0/V1_ARCHITECTURE.md +31 -0
  387. package/standard/engineering/security/ASVS_5.0/V2_AUTHENTICATION.md +31 -0
  388. package/standard/engineering/security/ASVS_5.0/V3_SESSION.md +31 -0
  389. package/standard/engineering/security/ASVS_5.0/V4_ACCESS_CONTROL.md +31 -0
  390. package/standard/engineering/security/ASVS_5.0/V5_VALIDATION.md +31 -0
  391. package/standard/engineering/security/ASVS_5.0/V6_CRYPTOGRAPHY.md +31 -0
  392. package/standard/engineering/security/ASVS_5.0/V7_ERROR_HANDLING.md +31 -0
  393. package/standard/engineering/security/ASVS_5.0/V8_DATA_PROTECTION.md +31 -0
  394. package/standard/engineering/security/ASVS_5.0/V9_COMMUNICATION.md +31 -0
  395. package/standard/engineering/security/ASVS_REGISTRY.md +31 -0
  396. package/standard/engineering/security/AUTHENTICATION.md +28 -0
  397. package/standard/engineering/security/AUTHORIZATION.md +27 -0
  398. package/standard/engineering/security/DATA_SECURITY.md +14 -0
  399. package/standard/engineering/security/OWASP_ASVS.md +31 -0
  400. package/standard/engineering/security/SECRETS.md +28 -0
  401. package/standard/engineering/security/SECURITY.md +28 -0
  402. package/standard/engineering/testing/TESTING.md +27 -0
  403. package/templates/agents/AGENTS.md +34 -0
  404. package/templates/agents/CLAUDE.md +33 -0
  405. package/templates/agents/copilot-instructions.md +15 -0
  406. package/templates/agents/cursor.mdc +27 -0
  407. package/templates/agents/windsurfrules.md +17 -0
  408. package/templates/docs/ADR.md +16 -0
  409. package/templates/docs/FEATURE.md +19 -0
  410. package/templates/docs/SECURITY_REPORT.md +15 -0
  411. package/templates/docs/accessibility-review.md +9 -0
  412. package/templates/docs/component.md +9 -0
  413. package/templates/docs/decision-record.md +9 -0
  414. package/templates/docs/design-review.md +9 -0
  415. package/templates/docs/exception.md +9 -0
  416. package/templates/docs/page.md +9 -0
  417. package/templates/docs/pattern.md +9 -0
  418. package/templates/docs/user-flow.md +9 -0
  419. package/templates/github/workflows/app-ci.yml +91 -0
  420. package/templates/project/00_OVERVIEW.md +51 -0
  421. package/templates/project/01_ARCHITECTURE.md +37 -0
  422. package/templates/project/02_SURFACES.md +30 -0
  423. package/templates/project/03_DATA_MODEL.md +31 -0
  424. package/templates/project/04_PERMISSIONS.md +32 -0
  425. package/templates/project/05_FLOWS.md +20 -0
  426. package/templates/project/06_INTEGRATIONS.md +21 -0
  427. package/templates/project/07_DESIGN.md +33 -0
  428. package/templates/project/10_NEVER_ALWAYS.md +26 -0
  429. package/templates/project/11_GAPS.md +18 -0
  430. package/templates/project/12_DEBT.md +19 -0
  431. package/templates/project/13_RECIPES.md +35 -0
  432. package/templates/project/14_INDEX.md +50 -0
  433. package/templates/project/AGENTS.md +51 -0
  434. package/templates/project/README.md +49 -0
  435. package/templates/project/impact-map.yaml +41 -0
@@ -0,0 +1,160 @@
1
+ # Traceability
2
+
3
+ Every rule maps down to something a human or a machine can check.
4
+
5
+ ```text
6
+ Rule ID
7
+
8
+ Authoritative source (REFERENCES.md)
9
+
10
+ Success criterion (when the source has one)
11
+
12
+ Guidance in standard/
13
+
14
+ Checklist item
15
+
16
+ Automated check or recorded manual review
17
+ ```
18
+
19
+ > Generated by `npm run build:index`.
20
+
21
+ | Rule | Domain | Severity | Priority | Source | Criteria | Validation |
22
+ |---|---|---|---|---|---|---|
23
+ | [A11Y-001](../rules/accessibility/A11Y-001.md) | accessibility | MUST | P0 | WCAG-2.2, WAI-ARIA-APG | 4.1.2 | automated + manual |
24
+ | [A11Y-002](../rules/accessibility/A11Y-002.md) | accessibility | MUST | P1 | WAI-ARIA-APG | — | manual |
25
+ | [A11Y-003](../rules/accessibility/A11Y-003.md) | accessibility | SHOULD | P2 | WAI-ARIA-APG | — | manual |
26
+ | [A11Y-004](../rules/accessibility/A11Y-004.md) | accessibility | MUST | P0 | WCAG-2.2 | 2.1.1 | automated + manual |
27
+ | [A11Y-005](../rules/accessibility/A11Y-005.md) | accessibility | MUST | P0 | WCAG-2.2 | 2.1.2 | manual |
28
+ | [A11Y-006](../rules/accessibility/A11Y-006.md) | accessibility | MUST | P0 | WCAG-2.2 | 2.4.7, 2.4.13 | automated + manual |
29
+ | [A11Y-007](../rules/accessibility/A11Y-007.md) | accessibility | MUST | P1 | WAI-ARIA-APG | — | manual |
30
+ | [A11Y-008](../rules/accessibility/A11Y-008.md) | accessibility | MUST | P0 | WCAG-2.2 | 1.4.3 | automated + manual |
31
+ | [A11Y-009](../rules/accessibility/A11Y-009.md) | accessibility | MUST | P1 | WCAG-2.2 | 1.4.11 | automated + manual |
32
+ | [A11Y-010](../rules/accessibility/A11Y-010.md) | accessibility | MUST | P1 | WCAG-2.2 | 2.5.8 | manual |
33
+ | [A11Y-011](../rules/accessibility/A11Y-011.md) | accessibility | MUST | P1 | WCAG-2.2 | 1.4.10 | manual |
34
+ | [A11Y-012](../rules/accessibility/A11Y-012.md) | accessibility | MUST | P1 | WCAG-2.2 | 2.3.3 | automated + manual |
35
+ | [AGT-001](../rules/agent/AGT-001.md) | agent | MUST | P0 | devia | — | manual |
36
+ | [AGT-002](../rules/agent/AGT-002.md) | agent | MUST | P0 | devia | — | automated + manual |
37
+ | [AGT-003](../rules/agent/AGT-003.md) | agent | MUST | P1 | devia | — | automated + manual |
38
+ | [AGT-004](../rules/agent/AGT-004.md) | agent | MUST NOT | P0 | devia | — | manual |
39
+ | [AGT-005](../rules/agent/AGT-005.md) | agent | MUST NOT | P0 | devia | — | manual |
40
+ | [AGT-006](../rules/agent/AGT-006.md) | agent | MUST | P0 | devia | — | manual |
41
+ | [AGT-007](../rules/agent/AGT-007.md) | agent | MUST | P1 | devia | — | manual |
42
+ | [AGT-008](../rules/agent/AGT-008.md) | agent | MUST | P1 | devia | — | manual |
43
+ | [AGT-009](../rules/agent/AGT-009.md) | agent | MUST NOT | P1 | devia | — | manual |
44
+ | [AGT-010](../rules/agent/AGT-010.md) | agent | MUST | P1 | devia | — | manual |
45
+ | [AGT-011](../rules/agent/AGT-011.md) | agent | MUST NOT | P0 | devia | — | automated + manual |
46
+ | [AI-001](../rules/ai/AI-001.md) | ai | MUST | P0 | OWASP LLM Top 10 | — | manual |
47
+ | [AI-002](../rules/ai/AI-002.md) | ai | MUST | P0 | OWASP LLM Top 10 | — | automated + manual |
48
+ | [AI-003](../rules/ai/AI-003.md) | ai | MUST | P1 | OWASP LLM Top 10 | — | automated + manual |
49
+ | [AI-004](../rules/ai/AI-004.md) | ai | MUST | P1 | devia | — | manual |
50
+ | [AI-005](../rules/ai/AI-005.md) | ai | SHOULD | P2 | devia | — | automated + manual |
51
+ | [API-001](../rules/api/API-001.md) | api | MUST | P0 | OWASP ASVS 5.0 V13 | — | automated + manual |
52
+ | [API-002](../rules/api/API-002.md) | api | MUST | P1 | devia | — | automated + manual |
53
+ | [API-003](../rules/api/API-003.md) | api | MUST | P1 | devia | — | manual |
54
+ | [API-004](../rules/api/API-004.md) | api | MUST | P1 | devia | — | manual |
55
+ | [API-005](../rules/api/API-005.md) | api | MUST | P1 | devia | — | automated + manual |
56
+ | [API-006](../rules/api/API-006.md) | api | SHOULD | P2 | devia | — | manual |
57
+ | [ARC-001](../rules/architecture/ARC-001.md) | architecture | MUST | P1 | devia | — | manual |
58
+ | [ARC-002](../rules/architecture/ARC-002.md) | architecture | MUST | P1 | devia | — | manual |
59
+ | [ARC-003](../rules/architecture/ARC-003.md) | architecture | MUST | P1 | devia | — | manual |
60
+ | [ARC-004](../rules/architecture/ARC-004.md) | architecture | MUST | P1 | devia | — | automated + manual |
61
+ | [ARC-005](../rules/architecture/ARC-005.md) | architecture | SHOULD | P2 | devia | — | manual |
62
+ | [ARC-006](../rules/architecture/ARC-006.md) | architecture | MUST | P1 | devia | — | automated + manual |
63
+ | [CMP-001](../rules/components/CMP-001.md) | components | MUST | P1 | GOV.UK, Carbon | — | manual |
64
+ | [CMP-002](../rules/components/CMP-002.md) | components | SHOULD | P2 | NN/g | — | manual |
65
+ | [CMP-003](../rules/components/CMP-003.md) | components | MUST | P1 | WCAG-2.2 | 1.3.1 | automated + manual |
66
+ | [CMP-004](../rules/components/CMP-004.md) | components | SHOULD | P2 | Carbon, Atlassian | — | manual |
67
+ | [CMP-005](../rules/components/CMP-005.md) | components | MUST | P0 | WAI-ARIA-APG | — | automated + manual |
68
+ | [CNT-001](../rules/content/CNT-001.md) | content | SHOULD | P2 | GOV.UK | — | manual |
69
+ | [DATA-001](../rules/data-display/DATA-001.md) | data-display | MUST | P1 | i18n-best-practice | — | manual |
70
+ | [DATA-002](../rules/data-display/DATA-002.md) | data-display | MUST | P1 | i18n-best-practice | — | manual |
71
+ | [DATA-003](../rules/data-display/DATA-003.md) | data-display | SHOULD | P2 | Carbon, Atlassian | — | manual |
72
+ | [DATA-004](../rules/data-display/DATA-004.md) | data-display | MUST | P1 | NN/g, Atlassian | — | manual |
73
+ | [DB-001](../rules/database/DB-001.md) | database | MUST | P0 | devia | — | automated + manual |
74
+ | [DB-002](../rules/database/DB-002.md) | database | MUST NOT | P0 | devia | — | manual |
75
+ | [DB-003](../rules/database/DB-003.md) | database | MUST | P0 | devia | — | automated + manual |
76
+ | [DB-004](../rules/database/DB-004.md) | database | MUST | P0 | devia | — | manual |
77
+ | [DB-005](../rules/database/DB-005.md) | database | SHOULD | P2 | devia | — | manual |
78
+ | [DB-006](../rules/database/DB-006.md) | database | SHOULD | P2 | devia | — | manual |
79
+ | [DB-007](../rules/database/DB-007.md) | database | MUST | P1 | OWASP ASVS 5.0 V7 | — | manual |
80
+ | [DB-008](../rules/database/DB-008.md) | database | MUST NOT | P0 | OWASP ASVS 5.0 V5 | — | automated + manual |
81
+ | [DS-001](../rules/design-system/DS-001.md) | design-system | MUST | P1 | DTCG | — | automated + manual |
82
+ | [DS-002](../rules/design-system/DS-002.md) | design-system | SHOULD | P2 | Carbon, DTCG | — | manual |
83
+ | [DS-003](../rules/design-system/DS-003.md) | design-system | MUST | P1 | SemVer | — | manual |
84
+ | [I18N-001](../rules/localization/I18N-001.md) | localization | MUST | P1 | i18n-best-practice | — | manual |
85
+ | [I18N-002](../rules/localization/I18N-002.md) | localization | SHOULD | P2 | Material, i18n-best-practice | — | manual |
86
+ | [I18N-003](../rules/localization/I18N-003.md) | localization | SHOULD | P2 | WCAG-2.2, Material | — | manual |
87
+ | [INT-001](../rules/interaction/INT-001.md) | interaction | MUST | P1 | WCAG-2.2 | — | manual |
88
+ | [INT-002](../rules/interaction/INT-002.md) | interaction | MUST | P1 | WCAG-2.2 | 2.1.1 | manual |
89
+ | [MEM-001](../rules/memory/MEM-001.md) | memory | MUST | P0 | devia | — | manual |
90
+ | [MEM-002](../rules/memory/MEM-002.md) | memory | MUST | P1 | devia | — | manual |
91
+ | [MEM-003](../rules/memory/MEM-003.md) | memory | MUST | P1 | devia | — | manual |
92
+ | [MEM-004](../rules/memory/MEM-004.md) | memory | MUST | P1 | devia | — | automated + manual |
93
+ | [MEM-005](../rules/memory/MEM-005.md) | memory | MUST | P1 | devia | — | manual |
94
+ | [MEM-006](../rules/memory/MEM-006.md) | memory | MUST | P1 | devia | — | manual |
95
+ | [MEM-007](../rules/memory/MEM-007.md) | memory | MUST NOT | P1 | devia | — | automated + manual |
96
+ | [MEM-008](../rules/memory/MEM-008.md) | memory | MUST | P1 | devia | — | manual |
97
+ | [MEM-009](../rules/memory/MEM-009.md) | memory | MUST | P0 | devia | — | automated + manual |
98
+ | [MEM-010](../rules/memory/MEM-010.md) | memory | SHOULD | P2 | devia | — | manual |
99
+ | [MEM-011](../rules/memory/MEM-011.md) | memory | MUST NOT | P0 | devia | — | automated + manual |
100
+ | [MOT-001](../rules/motion/MOT-001.md) | motion | SHOULD | P2 | Material | — | manual |
101
+ | [OBS-001](../rules/observability/OBS-001.md) | observability | MUST | P1 | Google SRE | — | automated + manual |
102
+ | [OBS-002](../rules/observability/OBS-002.md) | observability | MUST | P1 | Google SRE | — | automated + manual |
103
+ | [OBS-003](../rules/observability/OBS-003.md) | observability | MUST | P1 | Google SRE | — | manual |
104
+ | [OBS-004](../rules/observability/OBS-004.md) | observability | SHOULD | P2 | devia | — | automated + manual |
105
+ | [OPS-001](../rules/devops/OPS-001.md) | devops | MUST | P0 | devia | — | automated |
106
+ | [OPS-002](../rules/devops/OPS-002.md) | devops | MUST | P0 | devia | — | automated |
107
+ | [OPS-003](../rules/devops/OPS-003.md) | devops | MUST NOT | P0 | devia | — | automated + manual |
108
+ | [OPS-004](../rules/devops/OPS-004.md) | devops | MUST | P1 | SLSA | — | automated + manual |
109
+ | [OPS-005](../rules/devops/OPS-005.md) | devops | MUST | P1 | devia | — | manual |
110
+ | [OPS-006](../rules/devops/OPS-006.md) | devops | SHOULD | P2 | devia | — | manual |
111
+ | [OPS-007](../rules/devops/OPS-007.md) | devops | MUST | P0 | devia | — | manual |
112
+ | [PRIV-001](../rules/privacy/PRIV-001.md) | privacy | MUST | P1 | GDPR principles | — | manual |
113
+ | [PRIV-002](../rules/privacy/PRIV-002.md) | privacy | MUST | P1 | GDPR principles | — | manual |
114
+ | [PRIV-003](../rules/privacy/PRIV-003.md) | privacy | MUST | P1 | GDPR principles | — | manual |
115
+ | [PRIV-004](../rules/privacy/PRIV-004.md) | privacy | MUST | P1 | GDPR principles | — | automated + manual |
116
+ | [RWD-001](../rules/responsive/RWD-001.md) | responsive | MUST | P1 | WCAG-2.2 | — | manual |
117
+ | [RWD-002](../rules/responsive/RWD-002.md) | responsive | MUST | P0 | WCAG-2.2 | 1.4.10 | manual |
118
+ | [RWD-003](../rules/responsive/RWD-003.md) | responsive | MUST | P0 | WCAG-2.2 | 2.5.1 | manual |
119
+ | [SEC-001](../rules/security/SEC-001.md) | security | MUST | P0 | OWASP ASVS 5.0 V4 | — | manual |
120
+ | [SEC-002](../rules/security/SEC-002.md) | security | MUST NOT | P0 | OWASP ASVS 5.0 V14 | — | automated + manual |
121
+ | [SEC-003](../rules/security/SEC-003.md) | security | MUST | P0 | OWASP ASVS 5.0 V5 | — | automated + manual |
122
+ | [SEC-004](../rules/security/SEC-004.md) | security | MUST | P0 | OWASP ASVS 5.0 V7 | — | automated + manual |
123
+ | [SEC-005](../rules/security/SEC-005.md) | security | MUST | P0 | OWASP ASVS 5.0 V4 | — | manual |
124
+ | [SEC-006](../rules/security/SEC-006.md) | security | MUST | P1 | OWASP ASVS 5.0 V3 | — | manual |
125
+ | [SEC-007](../rules/security/SEC-007.md) | security | MUST | P0 | OWASP ASVS 5.0 V13 | — | manual |
126
+ | [SEC-008](../rules/security/SEC-008.md) | security | MUST | P1 | OWASP ASVS 5.0 V11 | — | manual |
127
+ | [SEC-009](../rules/security/SEC-009.md) | security | MUST | P1 | OWASP ASVS 5.0 V9 | — | automated + manual |
128
+ | [SEC-010](../rules/security/SEC-010.md) | security | MUST | P1 | OWASP ASVS 5.0 V1 | — | manual |
129
+ | [SEC-011](../rules/security/SEC-011.md) | security | MUST | P1 | OpenSSF Scorecard, OWASP ASVS 5.0 V14 | — | automated |
130
+ | [SEC-012](../rules/security/SEC-012.md) | security | MUST | P0 | OWASP ASVS 5.0 V6 | — | manual |
131
+ | [STATE-001](../rules/states/STATE-001.md) | states | MUST | P1 | devia | — | manual |
132
+ | [STATE-002](../rules/states/STATE-002.md) | states | MUST | P1 | NN/g | — | manual |
133
+ | [STATE-003](../rules/states/STATE-003.md) | states | MUST | P1 | NN/g | — | manual |
134
+ | [STATE-004](../rules/states/STATE-004.md) | states | SHOULD | P2 | NN/g | — | manual |
135
+ | [TST-001](../rules/testing/TST-001.md) | testing | MUST | P0 | devia | — | automated + manual |
136
+ | [TST-002](../rules/testing/TST-002.md) | testing | MUST | P0 | OWASP ASVS 5.0 V4 | — | manual |
137
+ | [TST-003](../rules/testing/TST-003.md) | testing | MUST NOT | P0 | devia | — | automated + manual |
138
+ | [TST-004](../rules/testing/TST-004.md) | testing | MUST | P1 | devia | — | manual |
139
+ | [TST-005](../rules/testing/TST-005.md) | testing | SHOULD | P2 | devia | — | manual |
140
+ | [TST-006](../rules/testing/TST-006.md) | testing | MUST | P1 | devia | — | automated + manual |
141
+ | [UI-001](../rules/ui/UI-001.md) | ui | MUST | P1 | Carbon, Material | — | automated + manual |
142
+ | [UI-002](../rules/ui/UI-002.md) | ui | SHOULD | P2 | NN/g | — | manual |
143
+ | [UI-003](../rules/ui/UI-003.md) | ui | MUST | P1 | DTCG, Carbon | — | automated + manual |
144
+ | [UI-004](../rules/ui/UI-004.md) | ui | MUST | P0 | WCAG-2.2 | 1.4.1 | automated + manual |
145
+ | [UI-005](../rules/ui/UI-005.md) | ui | MUST | P1 | Carbon, Material | — | automated + manual |
146
+ | [UI-006](../rules/ui/UI-006.md) | ui | SHOULD | P2 | Carbon, Atlassian | — | manual |
147
+ | [UI-007](../rules/ui/UI-007.md) | ui | MUST | P0 | WCAG-2.2, WAI-ARIA-APG | 4.1.2 | automated + manual |
148
+ | [UX-001](../rules/ux/UX-001.md) | ux | MUST | P1 | NN/g | — | manual |
149
+ | [UX-002](../rules/ux/UX-002.md) | ux | MUST | P1 | NN/g | — | automated + manual |
150
+ | [UX-003](../rules/ux/UX-003.md) | ux | SHOULD | P2 | NN/g, GOV.UK | — | manual |
151
+ | [UX-004](../rules/ux/UX-004.md) | ux | SHOULD | P2 | GOV.UK | — | manual |
152
+ | [UX-005](../rules/ux/UX-005.md) | ux | MUST | P1 | WCAG-2.2, NN/g | 2.4.8 | automated + manual |
153
+ | [UX-006](../rules/ux/UX-006.md) | ux | MUST | P1 | WCAG-2.2 | 2.4.1 | automated + manual |
154
+ | [UX-007](../rules/ux/UX-007.md) | ux | MUST | P0 | WCAG-2.2, GOV.UK | 1.3.1, 3.3.2 | automated + manual |
155
+ | [UX-008](../rules/ux/UX-008.md) | ux | MUST | P0 | WCAG-2.2, GOV.UK | 3.3.1, 3.3.3 | automated + manual |
156
+ | [UX-009](../rules/ux/UX-009.md) | ux | MUST | P1 | WCAG-2.2, GOV.UK | 1.4.1 | manual |
157
+ | [UX-010](../rules/ux/UX-010.md) | ux | MUST | P1 | NN/g | — | manual |
158
+ | [UX-011](../rules/ux/UX-011.md) | ux | MUST | P0 | NN/g, GOV.UK | — | manual |
159
+ | [UX-012](../rules/ux/UX-012.md) | ux | MUST | P1 | WCAG-2.2, GOV.UK | 3.3.3 | manual |
160
+ | [UX-013](../rules/ux/UX-013.md) | ux | SHOULD | P2 | NN/g | — | manual |
@@ -0,0 +1,13 @@
1
+ # Waivers
2
+
3
+ Document exceptions with `schema/waiver.schema.json` fields:
4
+
5
+ ```yaml
6
+ rule_id: A11Y-010
7
+ reason: Legacy PDF viewer chrome; remediating Q3
8
+ owner: @team
9
+ expires: 2026-12-31
10
+ risk: medium
11
+ ```
12
+
13
+ Store product-specific waivers in the **application** repo, not here, unless the exception changes the standard itself.
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@schneiderjoseph/devia",
3
+ "version": "0.1.0",
4
+ "description": "One standard, one memory: engineering and design rules plus living project memory for AI coding agents",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Joseph Schneider",
8
+ "homepage": "https://github.com/schneiderjoseph/devia#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/schneiderjoseph/devia.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/schneiderjoseph/devia/issues"
15
+ },
16
+ "keywords": [
17
+ "standard",
18
+ "ai-agents",
19
+ "agents",
20
+ "project-memory",
21
+ "code-quality",
22
+ "accessibility",
23
+ "security",
24
+ "asvs",
25
+ "wcag",
26
+ "conventions"
27
+ ],
28
+ "bin": {
29
+ "devia": "bin/devia.mjs"
30
+ },
31
+ "exports": {
32
+ ".": "./src/cli.mjs",
33
+ "./rules": "./src/lib/rules.mjs"
34
+ },
35
+ "files": [
36
+ "bin",
37
+ "src",
38
+ "rules",
39
+ "checklists",
40
+ "standard",
41
+ "compliance",
42
+ "schema",
43
+ "templates",
44
+ "skills",
45
+ "scripts",
46
+ "AGENTS.md",
47
+ "PRINCIPLES.md",
48
+ "MEMORY.md",
49
+ "LEVELS.md",
50
+ "MATURITY.md",
51
+ "GOVERNANCE.md",
52
+ "MIGRATION.md",
53
+ "REFERENCES.md",
54
+ "VERSION",
55
+ "CHANGELOG.md",
56
+ "README.md",
57
+ "LICENSE"
58
+ ],
59
+ "scripts": {
60
+ "build:index": "node scripts/build-index.mjs",
61
+ "validate": "node scripts/validate-rules.mjs && node scripts/validate-links.mjs && node scripts/build-index.mjs --check",
62
+ "validate:rules": "node scripts/validate-rules.mjs",
63
+ "validate:links": "node scripts/validate-links.mjs",
64
+ "test": "node --test",
65
+ "prepublishOnly": "npm run validate && npm test && node bin/devia.mjs check --root . && node bin/devia.mjs validate",
66
+ "check": "node bin/devia.mjs check --root ."
67
+ },
68
+ "publishConfig": {
69
+ "access": "public"
70
+ },
71
+ "engines": {
72
+ "node": ">=20"
73
+ }
74
+ }
@@ -0,0 +1,16 @@
1
+ # Rule lifecycle
2
+
3
+ ```text
4
+ draft → proposed → active → deprecated → superseded → removed
5
+ ```
6
+
7
+ | Status | Meaning |
8
+ |---|---|
9
+ | `draft` | Authoring; not enforced |
10
+ | `proposed` | In review |
11
+ | `active` | Enforceable |
12
+ | `deprecated` | Still valid briefly; plan migration |
13
+ | `superseded` | Replaced by another rule id |
14
+ | `removed` | Gone; requires changelog + migration note |
15
+
16
+ Never delete an active MUST without changelog entry and superseding id when replaced.
@@ -0,0 +1,166 @@
1
+ # Rules registry
2
+
3
+ Machine-readable rules with stable IDs. Narrative guidance lives under
4
+ [`standard/`](../standard/README.md); these files are what agents and reviews cite.
5
+
6
+ Severity is the obligation (`MUST` · `MUST NOT` · `SHOULD` · `MAY`).
7
+ Priority is when it blocks (`P0` · `P1` · `P2` · `P3` — see [`MATURITY.md`](../MATURITY.md)).
8
+
9
+ > Generated by `npm run build:index`. Edit the rule files, not this page.
10
+
11
+ ## Agent discipline
12
+
13
+ | ID | Title | Severity | Priority | Domain | Auto | Status |
14
+ |---|---|---|---|---|---|---|
15
+ | [AGT-001](agent/AGT-001.md) | Read the memory before writing code | MUST | P0 | agent | no | active |
16
+ | [AGT-002](agent/AGT-002.md) | No memory, no code — initialise first | MUST | P0 | agent | yes | active |
17
+ | [AGT-003](agent/AGT-003.md) | Make the smallest change that satisfies the request | MUST | P1 | agent | yes | active |
18
+ | [AGT-004](agent/AGT-004.md) | Never invent an interface or a rule | MUST NOT | P0 | agent | no | active |
19
+ | [AGT-005](agent/AGT-005.md) | Never claim done or production ready without evidence | MUST NOT | P0 | agent | no | active |
20
+ | [AGT-006](agent/AGT-006.md) | Report what was not verified | MUST | P0 | agent | no | active |
21
+ | [AGT-007](agent/AGT-007.md) | Cite rule identifiers | MUST | P1 | agent | no | active |
22
+ | [AGT-008](agent/AGT-008.md) | Read a file before editing it | MUST | P1 | agent | no | active |
23
+ | [AGT-009](agent/AGT-009.md) | Only original work | MUST NOT | P1 | agent | no | active |
24
+ | [AGT-010](agent/AGT-010.md) | Ask or record instead of guessing | MUST | P1 | agent | no | active |
25
+ | [AGT-011](agent/AGT-011.md) | Never weaken the standard to fit the code | MUST NOT | P0 | agent | yes | active |
26
+ | [MEM-001](memory/MEM-001.md) | Undecided is never coded as a silent truth | MUST | P0 | memory | no | active |
27
+ | [MEM-002](memory/MEM-002.md) | Decided but not built is recorded as debt | MUST | P1 | memory | no | active |
28
+ | [MEM-003](memory/MEM-003.md) | Debt lines are closed only by the change that discharges them | MUST | P1 | memory | no | active |
29
+ | [MEM-004](memory/MEM-004.md) | Registry identifiers are monotone and never reused | MUST | P1 | memory | yes | active |
30
+ | [MEM-005](memory/MEM-005.md) | Verify before recording | MUST | P1 | memory | no | active |
31
+ | [MEM-006](memory/MEM-006.md) | Sweep the surface you touch | MUST | P1 | memory | no | active |
32
+ | [MEM-007](memory/MEM-007.md) | No perishable facts in overview or index files | MUST NOT | P1 | memory | yes | active |
33
+ | [MEM-008](memory/MEM-008.md) | Memory points at documentation, it does not duplicate it | MUST | P1 | memory | no | active |
34
+ | [MEM-009](memory/MEM-009.md) | Code and memory ship in the same change | MUST | P0 | memory | yes | active |
35
+ | [MEM-010](memory/MEM-010.md) | Never/always lines come from real incidents | SHOULD | P2 | memory | no | active |
36
+ | [MEM-011](memory/MEM-011.md) | Never delete a registry line you did not discharge | MUST NOT | P0 | memory | yes | active |
37
+
38
+ ## Engineering
39
+
40
+ | ID | Title | Severity | Priority | Domain | Auto | Status |
41
+ |---|---|---|---|---|---|---|
42
+ | [AI-001](ai/AI-001.md) | Untrusted content is data, never instructions | MUST | P0 | ai | no | active |
43
+ | [AI-002](ai/AI-002.md) | No secrets or unnecessary personal data in prompts | MUST | P0 | ai | yes | active |
44
+ | [AI-003](ai/AI-003.md) | Model output is validated before it reaches a system of record | MUST | P1 | ai | yes | active |
45
+ | [AI-004](ai/AI-004.md) | Irreversible agent actions require a human | MUST | P1 | ai | no | active |
46
+ | [AI-005](ai/AI-005.md) | Prompts, tools and model versions are versioned artifacts | SHOULD | P2 | ai | yes | active |
47
+ | [API-001](api/API-001.md) | Requests are validated against an explicit schema | MUST | P0 | api | yes | active |
48
+ | [API-002](api/API-002.md) | Errors use one envelope and a stable code | MUST | P1 | api | yes | active |
49
+ | [API-003](api/API-003.md) | Breaking changes are versioned | MUST | P1 | api | no | active |
50
+ | [API-004](api/API-004.md) | Retryable state changes are idempotent | MUST | P1 | api | no | active |
51
+ | [API-005](api/API-005.md) | Collections are bounded | MUST | P1 | api | yes | active |
52
+ | [API-006](api/API-006.md) | One capability, one surface | SHOULD | P2 | api | no | active |
53
+ | [ARC-001](architecture/ARC-001.md) | Layer boundaries are respected | MUST | P1 | architecture | no | active |
54
+ | [ARC-002](architecture/ARC-002.md) | Non-trivial decisions are recorded | MUST | P1 | architecture | no | active |
55
+ | [ARC-003](architecture/ARC-003.md) | Complexity must be earned | MUST | P1 | architecture | no | active |
56
+ | [ARC-004](architecture/ARC-004.md) | Every new dependency is justified | MUST | P1 | architecture | yes | active |
57
+ | [ARC-005](architecture/ARC-005.md) | Business rules live outside transport and framework code | SHOULD | P2 | architecture | no | active |
58
+ | [ARC-006](architecture/ARC-006.md) | Environment-specific values come from configuration | MUST | P1 | architecture | yes | active |
59
+ | [DB-001](database/DB-001.md) | Every schema change is a versioned migration | MUST | P0 | database | yes | active |
60
+ | [DB-002](database/DB-002.md) | Applied migrations are immutable | MUST NOT | P0 | database | no | active |
61
+ | [DB-003](database/DB-003.md) | Money is exact and carries its currency | MUST | P0 | database | yes | active |
62
+ | [DB-004](database/DB-004.md) | Backups exist and restore has been rehearsed | MUST | P0 | database | no | active |
63
+ | [DB-005](database/DB-005.md) | Destructive operations are recoverable where the domain requires it | SHOULD | P2 | database | no | active |
64
+ | [DB-006](database/DB-006.md) | Queries the application actually runs are indexed | SHOULD | P2 | database | no | active |
65
+ | [DB-007](database/DB-007.md) | Sensitive actions are written to an append-only audit trail | MUST | P1 | database | no | active |
66
+ | [DB-008](database/DB-008.md) | Queries are parameterised | MUST NOT | P0 | database | yes | active |
67
+ | [OBS-001](observability/OBS-001.md) | Logs are structured, correlated, and free of secrets | MUST | P1 | observability | yes | active |
68
+ | [OBS-002](observability/OBS-002.md) | Errors reach a system a human watches | MUST | P1 | observability | yes | active |
69
+ | [OBS-003](observability/OBS-003.md) | Alerts are actionable and owned | MUST | P1 | observability | no | active |
70
+ | [OBS-004](observability/OBS-004.md) | Deployables expose health and readiness | SHOULD | P2 | observability | yes | active |
71
+ | [OPS-001](devops/OPS-001.md) | CI runs on every pull request with required gates | MUST | P0 | devops | yes | active |
72
+ | [OPS-002](devops/OPS-002.md) | No direct pushes to the default branch | MUST | P0 | devops | yes | active |
73
+ | [OPS-003](devops/OPS-003.md) | Never bypass a hook or a check | MUST NOT | P0 | devops | yes | active |
74
+ | [OPS-004](devops/OPS-004.md) | Builds are reproducible | MUST | P1 | devops | yes | active |
75
+ | [OPS-005](devops/OPS-005.md) | There is a rollback path and it has been used | MUST | P1 | devops | no | active |
76
+ | [OPS-006](devops/OPS-006.md) | Staging behaves like production | SHOULD | P2 | devops | no | active |
77
+ | [OPS-007](devops/OPS-007.md) | Production state is never mutated by hand | MUST | P0 | devops | no | active |
78
+ | [PRIV-001](privacy/PRIV-001.md) | Collect the minimum personal data | MUST | P1 | privacy | no | active |
79
+ | [PRIV-002](privacy/PRIV-002.md) | Retention and deletion are defined and implemented | MUST | P1 | privacy | no | active |
80
+ | [PRIV-003](privacy/PRIV-003.md) | Users can obtain and erase their data | MUST | P1 | privacy | no | active |
81
+ | [PRIV-004](privacy/PRIV-004.md) | Personal data stays out of logs, analytics and prompts | MUST | P1 | privacy | yes | active |
82
+ | [SEC-001](security/SEC-001.md) | Server-side authorization on every sensitive operation | MUST | P0 | security | no | active |
83
+ | [SEC-002](security/SEC-002.md) | No secrets in source, config, logs or client bundles | MUST NOT | P0 | security | yes | active |
84
+ | [SEC-003](security/SEC-003.md) | External input is validated before use | MUST | P0 | security | yes | active |
85
+ | [SEC-004](security/SEC-004.md) | Internal error detail never reaches a production client | MUST | P0 | security | yes | active |
86
+ | [SEC-005](security/SEC-005.md) | Tenant and user isolation is enforced and tested | MUST | P0 | security | no | active |
87
+ | [SEC-006](security/SEC-006.md) | Sessions expire, rotate and can be revoked | MUST | P1 | security | no | active |
88
+ | [SEC-007](security/SEC-007.md) | Webhooks are verified and replay-protected | MUST | P0 | security | no | active |
89
+ | [SEC-008](security/SEC-008.md) | Abuse surfaces are rate limited | MUST | P1 | security | no | active |
90
+ | [SEC-009](security/SEC-009.md) | Transport and browser security headers are set | MUST | P1 | security | yes | active |
91
+ | [SEC-010](security/SEC-010.md) | Least privilege for every credential and role | MUST | P1 | security | no | active |
92
+ | [SEC-011](security/SEC-011.md) | Dependency and secret scanning run in CI | MUST | P1 | security | yes | active |
93
+ | [SEC-012](security/SEC-012.md) | Credentials are stored irreversibly and compared safely | MUST | P0 | security | no | active |
94
+ | [TST-001](testing/TST-001.md) | Business rules are covered by automated tests | MUST | P0 | testing | yes | active |
95
+ | [TST-002](testing/TST-002.md) | Authorization and isolation paths are tested | MUST | P0 | testing | no | active |
96
+ | [TST-003](testing/TST-003.md) | Never disable or weaken a test to make CI pass | MUST NOT | P0 | testing | yes | active |
97
+ | [TST-004](testing/TST-004.md) | Every bug fix ships with a regression test | MUST | P1 | testing | no | active |
98
+ | [TST-005](testing/TST-005.md) | Critical journeys are covered end to end | SHOULD | P2 | testing | no | active |
99
+ | [TST-006](testing/TST-006.md) | Tests are deterministic and independent | MUST | P1 | testing | yes | active |
100
+
101
+ ## Design
102
+
103
+ | ID | Title | Severity | Priority | Domain | Auto | Status |
104
+ |---|---|---|---|---|---|---|
105
+ | [A11Y-001](accessibility/A11Y-001.md) | Accessible name | MUST | P0 | accessibility | yes | active |
106
+ | [A11Y-002](accessibility/A11Y-002.md) | Follow APG keyboard pattern | MUST | P1 | accessibility | no | active |
107
+ | [A11Y-003](accessibility/A11Y-003.md) | Prefer native over ARIA | SHOULD | P2 | accessibility | no | active |
108
+ | [A11Y-004](accessibility/A11Y-004.md) | Keyboard operable | MUST | P0 | accessibility | yes | active |
109
+ | [A11Y-005](accessibility/A11Y-005.md) | No unexpected keyboard traps | MUST | P0 | accessibility | no | active |
110
+ | [A11Y-006](accessibility/A11Y-006.md) | Visible focus | MUST | P0 | accessibility | yes | active |
111
+ | [A11Y-007](accessibility/A11Y-007.md) | Focus restoration | MUST | P1 | accessibility | no | active |
112
+ | [A11Y-008](accessibility/A11Y-008.md) | Text contrast AA | MUST | P0 | accessibility | yes | active |
113
+ | [A11Y-009](accessibility/A11Y-009.md) | UI component contrast | MUST | P1 | accessibility | yes | active |
114
+ | [A11Y-010](accessibility/A11Y-010.md) | Target size | MUST | P1 | accessibility | no | active |
115
+ | [A11Y-011](accessibility/A11Y-011.md) | Reflow without loss of use | MUST | P1 | accessibility | no | active |
116
+ | [A11Y-012](accessibility/A11Y-012.md) | Respect reduced motion | MUST | P1 | accessibility | yes | active |
117
+ | [CMP-001](components/CMP-001.md) | Button hierarchy | MUST | P1 | components | no | active |
118
+ | [CMP-002](components/CMP-002.md) | Disabled action explains enablement | SHOULD | P2 | components | no | active |
119
+ | [CMP-003](components/CMP-003.md) | Data table headers | MUST | P1 | components | yes | active |
120
+ | [CMP-004](components/CMP-004.md) | Row actions usable on small widths | SHOULD | P2 | components | no | active |
121
+ | [CMP-005](components/CMP-005.md) | Dialog accessibility pattern | MUST | P0 | components | yes | active |
122
+ | [CNT-001](content/CNT-001.md) | Action-oriented labels | SHOULD | P2 | content | no | active |
123
+ | [DATA-001](data-display/DATA-001.md) | Currency context explicit | MUST | P1 | data-display | no | active |
124
+ | [DATA-002](data-display/DATA-002.md) | Dates unambiguous | MUST | P1 | data-display | no | active |
125
+ | [DATA-003](data-display/DATA-003.md) | Numeric alignment | SHOULD | P2 | data-display | no | active |
126
+ | [DATA-004](data-display/DATA-004.md) | Sort and filter feedback | MUST | P1 | data-display | no | active |
127
+ | [DS-001](design-system/DS-001.md) | Git is source of truth for tokens | MUST | P1 | design-system | yes | active |
128
+ | [DS-002](design-system/DS-002.md) | Semantic tokens in components | SHOULD | P2 | design-system | no | active |
129
+ | [DS-003](design-system/DS-003.md) | Breaking token changes versioned | MUST | P1 | design-system | no | active |
130
+ | [I18N-001](localization/I18N-001.md) | No concatenated sentences | MUST | P1 | localization | no | active |
131
+ | [I18N-002](localization/I18N-002.md) | Text expansion safe layouts | SHOULD | P2 | localization | no | active |
132
+ | [I18N-003](localization/I18N-003.md) | RTL readiness for mirrored UI | SHOULD | P2 | localization | no | active |
133
+ | [INT-001](interaction/INT-001.md) | Touch primary targets | MUST | P1 | interaction | no | active |
134
+ | [INT-002](interaction/INT-002.md) | Keyboard parity for pointer features | MUST | P1 | interaction | no | active |
135
+ | [MOT-001](motion/MOT-001.md) | Motion has a job | SHOULD | P2 | motion | no | active |
136
+ | [RWD-001](responsive/RWD-001.md) | Touch targets adequate | MUST | P1 | responsive | no | active |
137
+ | [RWD-002](responsive/RWD-002.md) | Core flows at 320px | MUST | P0 | responsive | no | active |
138
+ | [RWD-003](responsive/RWD-003.md) | Hover not the only path | MUST | P0 | responsive | no | active |
139
+ | [STATE-001](states/STATE-001.md) | Interaction state set | MUST | P1 | states | no | active |
140
+ | [STATE-002](states/STATE-002.md) | Async outcome states | MUST | P1 | states | no | active |
141
+ | [STATE-003](states/STATE-003.md) | Permission-denied and read-only | MUST | P1 | states | no | active |
142
+ | [STATE-004](states/STATE-004.md) | Unsaved changes | SHOULD | P2 | states | no | active |
143
+ | [UI-001](ui/UI-001.md) | Type from tokens | MUST | P1 | ui | yes | active |
144
+ | [UI-002](ui/UI-002.md) | Readable body measure | SHOULD | P2 | ui | no | active |
145
+ | [UI-003](ui/UI-003.md) | Semantic tokens over raw hex | MUST | P1 | ui | yes | active |
146
+ | [UI-004](ui/UI-004.md) | Not color alone | MUST | P0 | ui | yes | active |
147
+ | [UI-005](ui/UI-005.md) | Spacing scale | MUST | P1 | ui | yes | active |
148
+ | [UI-006](ui/UI-006.md) | Consistent page chrome | SHOULD | P2 | ui | no | active |
149
+ | [UI-007](ui/UI-007.md) | Icon-only controls named | MUST | P0 | ui | yes | active |
150
+ | [UX-001](ux/UX-001.md) | One primary action per view | MUST | P1 | ux | no | active |
151
+ | [UX-002](ux/UX-002.md) | System status visible | MUST | P1 | ux | yes | active |
152
+ | [UX-003](ux/UX-003.md) | Navigation mirrors user mental model | SHOULD | P2 | ux | no | active |
153
+ | [UX-004](ux/UX-004.md) | Depth with orientation | SHOULD | P2 | ux | no | active |
154
+ | [UX-005](ux/UX-005.md) | Current location indicated | MUST | P1 | ux | yes | active |
155
+ | [UX-006](ux/UX-006.md) | Skip to content | MUST | P1 | ux | yes | active |
156
+ | [UX-007](ux/UX-007.md) | Persistent accessible labels | MUST | P0 | ux | yes | active |
157
+ | [UX-008](ux/UX-008.md) | Field errors identifiable and actionable | MUST | P0 | ux | yes | active |
158
+ | [UX-009](ux/UX-009.md) | Required fields indicated in text | MUST | P1 | ux | no | active |
159
+ | [UX-010](ux/UX-010.md) | Complete UI states for data views | MUST | P1 | ux | no | active |
160
+ | [UX-011](ux/UX-011.md) | Confirm irreversible actions | MUST | P0 | ux | no | active |
161
+ | [UX-012](ux/UX-012.md) | Human-readable errors | MUST | P1 | ux | no | active |
162
+ | [UX-013](ux/UX-013.md) | Progressive disclosure | SHOULD | P2 | ux | no | active |
163
+
164
+ **Total:** 138 rules · 138 active · 53 automatable · schema v1
165
+
166
+ Lifecycle and supersession: [`LIFECYCLE.md`](LIFECYCLE.md).
@@ -0,0 +1,42 @@
1
+ ---
2
+ id: A11Y-001
3
+ title: Accessible name
4
+ severity: MUST
5
+ status: active
6
+ priority: P0
7
+ domain: accessibility
8
+ source:
9
+ - WCAG-2.2
10
+ - WAI-ARIA-APG
11
+ applies_to:
12
+ - button
13
+ - link
14
+ - input
15
+ success_criteria:
16
+ - "4.1.2"
17
+ requirement: >
18
+ Every interactive control MUST expose an accessible name.
19
+ validation:
20
+ automated: true
21
+ manual: true
22
+ exceptions: documented-only
23
+ ---
24
+
25
+ # A11Y-001 — Accessible name
26
+
27
+ **Requirement:** Every interactive control MUST expose an accessible name.
28
+
29
+ **Bad:** Unlabeled custom div button.
30
+
31
+ **Good:** Native button text or aria-label when icon-only.
32
+
33
+ ## Validation
34
+
35
+ - Automated checks / lint / a11y tooling where applicable
36
+ - Design or engineering review
37
+
38
+ ## Lifecycle
39
+
40
+ - Status: `active`
41
+ - Priority: `P0`
42
+ - Exceptions: `documented-only`
@@ -0,0 +1,41 @@
1
+ ---
2
+ id: A11Y-002
3
+ title: Follow APG keyboard pattern
4
+ severity: MUST
5
+ status: active
6
+ priority: P1
7
+ domain: accessibility
8
+ source:
9
+ - WAI-ARIA-APG
10
+ applies_to:
11
+ - tabs
12
+ - menu
13
+ - combobox
14
+ - dialog
15
+ success_criteria:
16
+ []
17
+ requirement: >
18
+ Composite widgets MUST follow the applicable APG keyboard interaction unless a documented exception exists.
19
+ validation:
20
+ automated: false
21
+ manual: true
22
+ exceptions: documented-only
23
+ ---
24
+
25
+ # A11Y-002 — Follow APG keyboard pattern
26
+
27
+ **Requirement:** Composite widgets MUST follow the applicable APG keyboard interaction unless a documented exception exists.
28
+
29
+ **Bad:** Tabs only clickable; no arrow keys when role=tablist.
30
+
31
+ **Good:** Implement APG pattern for that widget.
32
+
33
+ ## Validation
34
+
35
+ - Design or engineering review
36
+
37
+ ## Lifecycle
38
+
39
+ - Status: `active`
40
+ - Priority: `P1`
41
+ - Exceptions: `documented-only`
@@ -0,0 +1,40 @@
1
+ ---
2
+ id: A11Y-003
3
+ title: Prefer native over ARIA
4
+ severity: SHOULD
5
+ status: active
6
+ priority: P2
7
+ domain: accessibility
8
+ source:
9
+ - WAI-ARIA-APG
10
+ applies_to:
11
+ - button
12
+ - link
13
+ - input
14
+ success_criteria:
15
+ []
16
+ requirement: >
17
+ Prefer native elements (button, a, input) over ARIA roles on divs.
18
+ validation:
19
+ automated: false
20
+ manual: true
21
+ exceptions: documented-only
22
+ ---
23
+
24
+ # A11Y-003 — Prefer native over ARIA
25
+
26
+ **Requirement:** Prefer native elements (button, a, input) over ARIA roles on divs.
27
+
28
+ **Bad:** div role=button for primary actions.
29
+
30
+ **Good:** button type="button".
31
+
32
+ ## Validation
33
+
34
+ - Design or engineering review
35
+
36
+ ## Lifecycle
37
+
38
+ - Status: `active`
39
+ - Priority: `P2`
40
+ - Exceptions: `documented-only`
@@ -0,0 +1,40 @@
1
+ ---
2
+ id: A11Y-004
3
+ title: Keyboard operable
4
+ severity: MUST
5
+ status: active
6
+ priority: P0
7
+ domain: accessibility
8
+ source:
9
+ - WCAG-2.2
10
+ applies_to:
11
+ - web
12
+ - desktop
13
+ success_criteria:
14
+ - "2.1.1"
15
+ requirement: >
16
+ All functionality MUST be operable through a keyboard interface (exceptions per WCAG only).
17
+ validation:
18
+ automated: true
19
+ manual: true
20
+ exceptions: documented-only
21
+ ---
22
+
23
+ # A11Y-004 — Keyboard operable
24
+
25
+ **Requirement:** All functionality MUST be operable through a keyboard interface (exceptions per WCAG only).
26
+
27
+ **Bad:** Drag-only reorder with no keyboard alternative.
28
+
29
+ **Good:** Keyboard affordance or alternative flow.
30
+
31
+ ## Validation
32
+
33
+ - Automated checks / lint / a11y tooling where applicable
34
+ - Design or engineering review
35
+
36
+ ## Lifecycle
37
+
38
+ - Status: `active`
39
+ - Priority: `P0`
40
+ - Exceptions: `documented-only`
@@ -0,0 +1,39 @@
1
+ ---
2
+ id: A11Y-005
3
+ title: No unexpected keyboard traps
4
+ severity: MUST
5
+ status: active
6
+ priority: P0
7
+ domain: accessibility
8
+ source:
9
+ - WCAG-2.2
10
+ applies_to:
11
+ - web
12
+ - dialog
13
+ success_criteria:
14
+ - "2.1.2"
15
+ requirement: >
16
+ Focus MUST be able to move away unless a modal pattern intentionally traps and provides Escape/close.
17
+ validation:
18
+ automated: false
19
+ manual: true
20
+ exceptions: documented-only
21
+ ---
22
+
23
+ # A11Y-005 — No unexpected keyboard traps
24
+
25
+ **Requirement:** Focus MUST be able to move away unless a modal pattern intentionally traps and provides Escape/close.
26
+
27
+ **Bad:** Widget eats Tab forever.
28
+
29
+ **Good:** Trap only in dialogs with clear exit.
30
+
31
+ ## Validation
32
+
33
+ - Design or engineering review
34
+
35
+ ## Lifecycle
36
+
37
+ - Status: `active`
38
+ - Priority: `P0`
39
+ - Exceptions: `documented-only`