rosett-ai 1.3.3

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 (527) hide show
  1. checksums.yaml +7 -0
  2. data/.ai-provenance.yml +119 -0
  3. data/.debride_whitelist +186 -0
  4. data/.fasterer.yml +29 -0
  5. data/.mdl_style.rb +10 -0
  6. data/.mdlrc +3 -0
  7. data/.mutant.yml +49 -0
  8. data/.namespace-allowlist +42 -0
  9. data/.reek.yml +1040 -0
  10. data/.rosett-ai/config.yml +3 -0
  11. data/.rspec +5 -0
  12. data/.rubocop.yml +380 -0
  13. data/.ruby-version +1 -0
  14. data/.yamllint +51 -0
  15. data/.yardopts +12 -0
  16. data/AI-DISCLOSURE.md +48 -0
  17. data/CHANGELOG.md +519 -0
  18. data/CLAUDE.md +141 -0
  19. data/CONTRIBUTING.md +734 -0
  20. data/INSTALL.md +154 -0
  21. data/LICENSE +674 -0
  22. data/LICENSE.md +675 -0
  23. data/QUICKSTART.md +73 -0
  24. data/README.md +366 -0
  25. data/Rakefile +200 -0
  26. data/SECURITY.md +114 -0
  27. data/bin/rai +1 -0
  28. data/cliff.toml +52 -0
  29. data/conf/adopt_redactions.yml +8 -0
  30. data/conf/behaviour/.gitkeep +0 -0
  31. data/conf/compliance/cra_rules.yml +25 -0
  32. data/conf/compliance/license_rules.yml +20 -0
  33. data/conf/design/aaif_alignment.yml +181 -0
  34. data/conf/design/ab_testing.yml +172 -0
  35. data/conf/design/accessibility.yml +84 -0
  36. data/conf/design/ai_authorship.yml +210 -0
  37. data/conf/design/ai_provenance.yml +224 -0
  38. data/conf/design/ai_tool_configuration.yml +207 -0
  39. data/conf/design/architecture.yml +139 -0
  40. data/conf/design/autocompletion.yml +115 -0
  41. data/conf/design/backward_compatibility.yml +112 -0
  42. data/conf/design/behaviour_composition.yml +246 -0
  43. data/conf/design/build_rake_extraction.yml +57 -0
  44. data/conf/design/ci_pipeline.yml +100 -0
  45. data/conf/design/claude_code_configuration.yml +157 -0
  46. data/conf/design/compiler.yml +128 -0
  47. data/conf/design/comply.yml +153 -0
  48. data/conf/design/content_packs.yml +84 -0
  49. data/conf/design/desktop_integration.yml +289 -0
  50. data/conf/design/distribution.yml +216 -0
  51. data/conf/design/doctor.yml +184 -0
  52. data/conf/design/documentation.yml +152 -0
  53. data/conf/design/engine_architecture.yml +257 -0
  54. data/conf/design/error_handling.yml +103 -0
  55. data/conf/design/feature_flags.yml +142 -0
  56. data/conf/design/git_hooks.yml +165 -0
  57. data/conf/design/gui_plugins.yml +475 -0
  58. data/conf/design/i18n.yml +84 -0
  59. data/conf/design/integration_testing.yml +56 -0
  60. data/conf/design/licensing_system.yml +88 -0
  61. data/conf/design/lifecycle_management.yml +208 -0
  62. data/conf/design/mcp_integration.yml +207 -0
  63. data/conf/design/mcp_settings.yml +126 -0
  64. data/conf/design/migration.yml +56 -0
  65. data/conf/design/monitoring_observability.yml +194 -0
  66. data/conf/design/namespace_cleanup.yml +145 -0
  67. data/conf/design/plugin_test_segregation.yml +145 -0
  68. data/conf/design/policy_management.yml +229 -0
  69. data/conf/design/project_management.yml +183 -0
  70. data/conf/design/rai_mcp_asset_discovery.yml +164 -0
  71. data/conf/design/rai_mcp_server.yml +605 -0
  72. data/conf/design/release_management.yml +117 -0
  73. data/conf/design/retrofit.yml +199 -0
  74. data/conf/design/retrospective_analyzer.yml +79 -0
  75. data/conf/design/scope_hierarchy.yml +352 -0
  76. data/conf/design/security.yml +115 -0
  77. data/conf/design/session_retrospective.yml +85 -0
  78. data/conf/design/smart_ui_feedback.yml +89 -0
  79. data/conf/design/structured_logging.yml +148 -0
  80. data/conf/design/styles.yml +123 -0
  81. data/conf/design/test_peer_review.yml +89 -0
  82. data/conf/design/testing.yml +136 -0
  83. data/conf/design/threat_model.yml +108 -0
  84. data/conf/design/ui_framework.yml +111 -0
  85. data/conf/design/usage_optimization.yml +122 -0
  86. data/conf/design/version_management.yml +60 -0
  87. data/conf/design/workflow.yml +227 -0
  88. data/conf/mcp/server_defaults.yml +42 -0
  89. data/conf/mcp/trust.yml +21 -0
  90. data/conf/packaging/core.yml +12 -0
  91. data/conf/packaging/gtk4.yml +11 -0
  92. data/conf/packaging/qt6.yml +11 -0
  93. data/conf/policy/default_deny_list.yml +197 -0
  94. data/conf/review/cli-command-audit.yml +857 -0
  95. data/conf/review/design-docs.yml +1064 -0
  96. data/conf/review/design-questionnaire.yml +153 -0
  97. data/conf/review/questionnaire.yml +146 -0
  98. data/conf/review/rosett-ai-core.yml +2919 -0
  99. data/conf/schemas/ai_config_schema.json +73 -0
  100. data/conf/schemas/behaviour_schema.json +132 -0
  101. data/conf/schemas/compliance_rule_schema.json +63 -0
  102. data/conf/schemas/content_pack_manifest_schema.json +51 -0
  103. data/conf/schemas/design_schema.json +210 -0
  104. data/conf/schemas/engine_manifest_schema.json +144 -0
  105. data/conf/schemas/lockfile_schema.json +74 -0
  106. data/conf/schemas/mcp_server_schema.json +48 -0
  107. data/conf/schemas/packaging_schema.json +70 -0
  108. data/conf/schemas/policy_schema.json +85 -0
  109. data/conf/schemas/provenance_schema.json +84 -0
  110. data/conf/schemas/rai_config_schema.json +56 -0
  111. data/conf/schemas/rai_project_schema.json +20 -0
  112. data/conf/schemas/scope_hierarchy_schema.json +49 -0
  113. data/conf/schemas/target_schema.json +67 -0
  114. data/conf/schemas/tooling_schema.json +65 -0
  115. data/conf/schemas/workflow_schema.json +112 -0
  116. data/conf/targets/agents_md.yml +17 -0
  117. data/conf/targets/claude.yml +12 -0
  118. data/conf/tooling/tools.yml +58 -0
  119. data/dist/rosett-ai-mcp.service +48 -0
  120. data/dist/rosett-ai-mcp.yml.default +45 -0
  121. data/doc/AAIF_POSITIONING.md +58 -0
  122. data/doc/ADOPT.md +224 -0
  123. data/doc/AI_PROVENANCE.md +139 -0
  124. data/doc/ARCHITECTURE.md +920 -0
  125. data/doc/BEHAVIOUR.md +409 -0
  126. data/doc/BUILD.md +138 -0
  127. data/doc/CI_CD_RECIPES.md +171 -0
  128. data/doc/CLAUDE_SESSIONS_MOVED.md +16 -0
  129. data/doc/COMMAND_ANALYSIS.md +229 -0
  130. data/doc/CONFIGURATION.md +281 -0
  131. data/doc/DESIGN_AUDIT.md +235 -0
  132. data/doc/DESIGN_PEER_REVIEW.md +771 -0
  133. data/doc/DESKTOP.md +447 -0
  134. data/doc/ENGINES.md +567 -0
  135. data/doc/ENGINE_DEVELOPMENT_GUIDE.md +417 -0
  136. data/doc/FEATURE_AUDIT.md +218 -0
  137. data/doc/IMPLEMENTATION_PLAN.md +669 -0
  138. data/doc/INCIDENT_REPORT_2026-02-02.md +251 -0
  139. data/doc/MIGRATION_GUIDE.md +88 -0
  140. data/doc/PACKAGING.md +232 -0
  141. data/doc/PROJECT_DASHBOARD.md +153 -0
  142. data/doc/PULP_DEPLOYMENT.md +164 -0
  143. data/doc/QUALITY_FIX_SUMMARY.md +110 -0
  144. data/doc/QUICK_START.md +162 -0
  145. data/doc/REEK_CONFIGURATION.md +166 -0
  146. data/doc/REFERENCE.md +253 -0
  147. data/doc/REFERENCES.md +324 -0
  148. data/doc/SECURITY_REVIEW_CHECKLIST.md +72 -0
  149. data/doc/SESSION_2026-02-28_GTK4_HARDENING.md +359 -0
  150. data/doc/SETUP.md +202 -0
  151. data/doc/TEST_PEER_REVIEW.md +152 -0
  152. data/doc/THREAT_MODEL.md +230 -0
  153. data/doc/USAGE.md +545 -0
  154. data/doc/USER_MANUAL.md +585 -0
  155. data/doc/ai_test_review_checklist.md +110 -0
  156. data/doc/changes/2026-02-18-packaging-fpm.md +155 -0
  157. data/doc/changes/2026-02-19-testing-infrastructure.md +221 -0
  158. data/doc/changes/2026-02-20-security-implementation.md +281 -0
  159. data/doc/changes/2026-02-20-styles-implementation.md +220 -0
  160. data/doc/changes/2026-02-21-architecture-completion.md +95 -0
  161. data/doc/changes/2026-02-21-architecture-ui-layer.md +253 -0
  162. data/doc/changes/2026-02-21-cc-config-implementation.md +108 -0
  163. data/doc/changes/2026-02-21-ci-pipeline-implementation.md +214 -0
  164. data/doc/changes/2026-02-21-compiler-multi-target-pipeline.md +241 -0
  165. data/doc/changes/2026-02-21-config-design-show-commands.md +61 -0
  166. data/doc/changes/2026-02-21-design-implementation-overview.md +455 -0
  167. data/doc/changes/2026-02-21-lifecycle-management.md +196 -0
  168. data/doc/changes/2026-02-21-path-resolver.md +128 -0
  169. data/doc/changes/2026-02-24-ci-tmpdir-mutant-fetch.md +45 -0
  170. data/doc/changes/2026-03-01-ci-bundler-strategy.md +120 -0
  171. data/doc/changes/2026-03-20-security-hardening-phase2.md +163 -0
  172. data/doc/context/SESSION-HANDOFF.md +69 -0
  173. data/doc/context/ai-engine-usage-trends-2026.md +80 -0
  174. data/doc/context/plan-pluggable-engines.md +590 -0
  175. data/doc/decisions/001-flog-deferred.md +32 -0
  176. data/doc/decisions/002-path-resolution-strategy.md +158 -0
  177. data/doc/decisions/003-ui-adapter-selection.md +193 -0
  178. data/doc/decisions/004-design-document-validation.md +179 -0
  179. data/doc/decisions/005-package-splitting-strategy.md +200 -0
  180. data/doc/decisions/006-multi-engine-architecture.md +147 -0
  181. data/doc/decisions/007-engine-agnostic-pivot.md +219 -0
  182. data/doc/decisions/008-ci-bundler-strategy.md +129 -0
  183. data/doc/decisions/009-core-only-v1-release.md +60 -0
  184. data/doc/decisions/010-engine-debian-packaging.md +66 -0
  185. data/doc/decisions/011-context-aware-cli.md +71 -0
  186. data/doc/dependency_decisions.yml +247 -0
  187. data/doc/issues/001-wrapper-missing-environment-variables.md +197 -0
  188. data/doc/issues/002-embedded-ruby-wrong-prefix.md +217 -0
  189. data/doc/issues/003-smoke-test-false-positive.md +127 -0
  190. data/doc/issues/004-market-research-design-updates.md +109 -0
  191. data/doc/issues/005-compile-scope-coexistence.md +161 -0
  192. data/doc/locales/.gitkeep +0 -0
  193. data/doc/man/rai.1.ronn +505 -0
  194. data/doc/operations/packaging.md +133 -0
  195. data/doc/operations/rosett-ai-release.md +65 -0
  196. data/doc/reference/error-catalog.md +107 -0
  197. data/doc/reference/rosett-ai-technical-reference.pdf +0 -0
  198. data/doc/reference/src/Pictures/cover.jpg +0 -0
  199. data/doc/reference/src/Pictures/head1.jpg +0 -0
  200. data/doc/reference/src/Pictures/head2.jpg +0 -0
  201. data/doc/reference/src/Pictures/head3.jpg +0 -0
  202. data/doc/reference/src/Pictures/head4.jpg +0 -0
  203. data/doc/reference/src/Pictures/head5.jpg +0 -0
  204. data/doc/reference/src/Pictures/head6.jpg +0 -0
  205. data/doc/reference/src/Pictures/head7.jpg +0 -0
  206. data/doc/reference/src/Pictures/head8.jpg +0 -0
  207. data/doc/reference/src/StyleInd.ist +4 -0
  208. data/doc/reference/src/bibliography.bib +79 -0
  209. data/doc/reference/src/main.tex +1288 -0
  210. data/doc/reference/src/structure.tex +303 -0
  211. data/doc/rosett-ai-bookmarks.html +301 -0
  212. data/kitchen.yml +46 -0
  213. data/lib/rosett_ai/adopter/executor_resolver.rb +77 -0
  214. data/lib/rosett_ai/adopter/local_analysis_collector.rb +154 -0
  215. data/lib/rosett_ai/adopter/rule_adopter.rb +254 -0
  216. data/lib/rosett_ai/ai_config/config_compiler.rb +111 -0
  217. data/lib/rosett_ai/ai_config/context_window.rb +55 -0
  218. data/lib/rosett_ai/ai_config/cost_controls.rb +44 -0
  219. data/lib/rosett_ai/ai_config/fallback_chain.rb +64 -0
  220. data/lib/rosett_ai/ai_config/model_router.rb +121 -0
  221. data/lib/rosett_ai/ai_config/validator.rb +45 -0
  222. data/lib/rosett_ai/authorship/attribution_compiler.rb +99 -0
  223. data/lib/rosett_ai/authorship/disclosure_policy.rb +81 -0
  224. data/lib/rosett_ai/authorship/review_validator.rb +39 -0
  225. data/lib/rosett_ai/authorship/trailer_generator.rb +88 -0
  226. data/lib/rosett_ai/backup/compressor.rb +180 -0
  227. data/lib/rosett_ai/backup/destination.rb +91 -0
  228. data/lib/rosett_ai/behaviour/manager.rb +156 -0
  229. data/lib/rosett_ai/compiler/backend.rb +86 -0
  230. data/lib/rosett_ai/compiler/backends/agents_md_backend.rb +80 -0
  231. data/lib/rosett_ai/compiler/backends/claude_backend.rb +88 -0
  232. data/lib/rosett_ai/compiler/backends/generic_backend.rb +15 -0
  233. data/lib/rosett_ai/compiler/behaviour_compiler.rb +40 -0
  234. data/lib/rosett_ai/compiler/capability_checker.rb +104 -0
  235. data/lib/rosett_ai/compiler/compilation_pipeline.rb +361 -0
  236. data/lib/rosett_ai/compiler/compiled_output.rb +39 -0
  237. data/lib/rosett_ai/compiler/locale_compiler.rb +250 -0
  238. data/lib/rosett_ai/compiler/target_profile.rb +112 -0
  239. data/lib/rosett_ai/completion/generator.rb +101 -0
  240. data/lib/rosett_ai/completion/shells/bash_generator.rb +126 -0
  241. data/lib/rosett_ai/completion/shells/fish_generator.rb +78 -0
  242. data/lib/rosett_ai/completion/shells/zsh_generator.rb +126 -0
  243. data/lib/rosett_ai/comply/checkers/cra_checker.rb +102 -0
  244. data/lib/rosett_ai/comply/checkers/license_checker.rb +85 -0
  245. data/lib/rosett_ai/comply/checkers/spdx_header_checker.rb +98 -0
  246. data/lib/rosett_ai/comply/reporter.rb +113 -0
  247. data/lib/rosett_ai/comply/runner.rb +50 -0
  248. data/lib/rosett_ai/composition/circular_dependency_detector.rb +56 -0
  249. data/lib/rosett_ai/composition/composer.rb +158 -0
  250. data/lib/rosett_ai/composition/composition_result.rb +64 -0
  251. data/lib/rosett_ai/composition/conflict_detector.rb +53 -0
  252. data/lib/rosett_ai/composition/lockfile.rb +103 -0
  253. data/lib/rosett_ai/composition/merge_strategy.rb +131 -0
  254. data/lib/rosett_ai/composition/priority_sorter.rb +29 -0
  255. data/lib/rosett_ai/composition/scope_resolver.rb +55 -0
  256. data/lib/rosett_ai/config/compile_result.rb +37 -0
  257. data/lib/rosett_ai/config/compiler.rb +13 -0
  258. data/lib/rosett_ai/config/domain_transformer.rb +13 -0
  259. data/lib/rosett_ai/config/key_map.rb +13 -0
  260. data/lib/rosett_ai/config/masking_secret_resolver.rb +40 -0
  261. data/lib/rosett_ai/config/scope_router.rb +13 -0
  262. data/lib/rosett_ai/config/secret_resolver.rb +125 -0
  263. data/lib/rosett_ai/configuration.rb +119 -0
  264. data/lib/rosett_ai/content/content_client.rb +60 -0
  265. data/lib/rosett_ai/content/pack_installer.rb +117 -0
  266. data/lib/rosett_ai/content/pack_manifest.rb +50 -0
  267. data/lib/rosett_ai/content/pack_registry.rb +68 -0
  268. data/lib/rosett_ai/content_packs/manager.rb +50 -0
  269. data/lib/rosett_ai/dbus/compositor_detector.rb +77 -0
  270. data/lib/rosett_ai/dbus/focus_adapters/base.rb +59 -0
  271. data/lib/rosett_ai/dbus/focus_adapters/gnome_adapter.rb +172 -0
  272. data/lib/rosett_ai/dbus/focus_adapters/hyprland_adapter.rb +77 -0
  273. data/lib/rosett_ai/dbus/focus_adapters/i3_adapter.rb +65 -0
  274. data/lib/rosett_ai/dbus/focus_adapters/kwin_adapter.rb +103 -0
  275. data/lib/rosett_ai/dbus/focus_adapters/x11_adapter.rb +105 -0
  276. data/lib/rosett_ai/dbus/focus_monitor_interface.rb +103 -0
  277. data/lib/rosett_ai/dbus/manager_interface.rb +213 -0
  278. data/lib/rosett_ai/dbus/plugin_manager_interface.rb +169 -0
  279. data/lib/rosett_ai/dbus/rate_limiter.rb +89 -0
  280. data/lib/rosett_ai/dbus/service.rb +121 -0
  281. data/lib/rosett_ai/dbus/status_notifier_interface.rb +79 -0
  282. data/lib/rosett_ai/deprecation.rb +79 -0
  283. data/lib/rosett_ai/desktop/dbus_client.rb +259 -0
  284. data/lib/rosett_ai/desktop/gtk4_app.rb +371 -0
  285. data/lib/rosett_ai/desktop/gtk4_preferences.rb +331 -0
  286. data/lib/rosett_ai/desktop/gui_logger.rb +236 -0
  287. data/lib/rosett_ai/doctor/check.rb +92 -0
  288. data/lib/rosett_ai/doctor/checks/cache_health_check.rb +50 -0
  289. data/lib/rosett_ai/doctor/checks/dbus_availability_check.rb +39 -0
  290. data/lib/rosett_ai/doctor/checks/engine_detection_check.rb +46 -0
  291. data/lib/rosett_ai/doctor/checks/file_permission_check.rb +44 -0
  292. data/lib/rosett_ai/doctor/checks/gem_dependency_check.rb +55 -0
  293. data/lib/rosett_ai/doctor/checks/ruby_version_check.rb +50 -0
  294. data/lib/rosett_ai/doctor/checks/stale_config_nncc_check.rb +57 -0
  295. data/lib/rosett_ai/doctor/checks/stale_home_nncc_check.rb +59 -0
  296. data/lib/rosett_ai/doctor.rb +81 -0
  297. data/lib/rosett_ai/documentation/reference_compiler.rb +122 -0
  298. data/lib/rosett_ai/documentation/translator.rb +62 -0
  299. data/lib/rosett_ai/engines/base_config_compiler.rb +203 -0
  300. data/lib/rosett_ai/engines/detector.rb +63 -0
  301. data/lib/rosett_ai/engines/registry.rb +50 -0
  302. data/lib/rosett_ai/error_handler.rb +139 -0
  303. data/lib/rosett_ai/exit_codes.rb +76 -0
  304. data/lib/rosett_ai/feature_flags.rb +102 -0
  305. data/lib/rosett_ai/formatting.rb +33 -0
  306. data/lib/rosett_ai/gem_consistency_checker.rb +199 -0
  307. data/lib/rosett_ai/git_hooks/chain_detector.rb +86 -0
  308. data/lib/rosett_ai/git_hooks/installer.rb +175 -0
  309. data/lib/rosett_ai/git_hooks/script_generator.rb +125 -0
  310. data/lib/rosett_ai/gitlab/validators/supplementary_gitlab_ci_yaml_validator.rb +79 -0
  311. data/lib/rosett_ai/i18n/locale_resolver.rb +46 -0
  312. data/lib/rosett_ai/i18n/utf8_checker.rb +32 -0
  313. data/lib/rosett_ai/init/config_file_writer.rb +24 -0
  314. data/lib/rosett_ai/init/directory_builder.rb +38 -0
  315. data/lib/rosett_ai/init/file_copier.rb +95 -0
  316. data/lib/rosett_ai/init/global_initializer.rb +28 -0
  317. data/lib/rosett_ai/init/local_initializer.rb +27 -0
  318. data/lib/rosett_ai/init/mcp_registrar.rb +109 -0
  319. data/lib/rosett_ai/init/project_initializer.rb +38 -0
  320. data/lib/rosett_ai/licensing/license_key.rb +139 -0
  321. data/lib/rosett_ai/licensing/license_store.rb +64 -0
  322. data/lib/rosett_ai/licensing/license_validator.rb +60 -0
  323. data/lib/rosett_ai/licensing/tier.rb +42 -0
  324. data/lib/rosett_ai/mcp/admin/auditor.rb +88 -0
  325. data/lib/rosett_ai/mcp/admin/health_checker.rb +81 -0
  326. data/lib/rosett_ai/mcp/admin/registry.rb +100 -0
  327. data/lib/rosett_ai/mcp/admin/schema_validator.rb +63 -0
  328. data/lib/rosett_ai/mcp/enforcement/.gitkeep +0 -0
  329. data/lib/rosett_ai/mcp/enforcement/hook_generator.rb +197 -0
  330. data/lib/rosett_ai/mcp/enforcement/validator.rb +215 -0
  331. data/lib/rosett_ai/mcp/governance.rb +160 -0
  332. data/lib/rosett_ai/mcp/http_security_config.rb +158 -0
  333. data/lib/rosett_ai/mcp/instructions.rb +266 -0
  334. data/lib/rosett_ai/mcp/key_hasher.rb +66 -0
  335. data/lib/rosett_ai/mcp/keyfile.rb +221 -0
  336. data/lib/rosett_ai/mcp/middleware/authentication.rb +146 -0
  337. data/lib/rosett_ai/mcp/middleware/content_type.rb +56 -0
  338. data/lib/rosett_ai/mcp/middleware/cors.rb +83 -0
  339. data/lib/rosett_ai/mcp/middleware/origin_validation.rb +73 -0
  340. data/lib/rosett_ai/mcp/middleware/rate_limit.rb +106 -0
  341. data/lib/rosett_ai/mcp/middleware/request_size.rb +51 -0
  342. data/lib/rosett_ai/mcp/plugins.rb +143 -0
  343. data/lib/rosett_ai/mcp/prompts/compilation_prompt.rb +40 -0
  344. data/lib/rosett_ai/mcp/prompts/compliance_prompt.rb +41 -0
  345. data/lib/rosett_ai/mcp/prompts/diagnostics_prompt.rb +41 -0
  346. data/lib/rosett_ai/mcp/prompts/validation_prompt.rb +41 -0
  347. data/lib/rosett_ai/mcp/resources/behaviour_resource.rb +127 -0
  348. data/lib/rosett_ai/mcp/resources/config_resource.rb +72 -0
  349. data/lib/rosett_ai/mcp/resources/design_resource.rb +58 -0
  350. data/lib/rosett_ai/mcp/resources/hooks_resource.rb +74 -0
  351. data/lib/rosett_ai/mcp/resources/provenance_resource.rb +51 -0
  352. data/lib/rosett_ai/mcp/resources/rules_resource.rb +60 -0
  353. data/lib/rosett_ai/mcp/resources/schema_resource.rb +72 -0
  354. data/lib/rosett_ai/mcp/response_helper.rb +46 -0
  355. data/lib/rosett_ai/mcp/security_logger.rb +60 -0
  356. data/lib/rosett_ai/mcp/server.rb +212 -0
  357. data/lib/rosett_ai/mcp/settings/server_installer.rb +112 -0
  358. data/lib/rosett_ai/mcp/settings/trust_manager.rb +142 -0
  359. data/lib/rosett_ai/mcp/tools/adopt_tool.rb +70 -0
  360. data/lib/rosett_ai/mcp/tools/backup_tool.rb +64 -0
  361. data/lib/rosett_ai/mcp/tools/behaviour_display_tool.rb +72 -0
  362. data/lib/rosett_ai/mcp/tools/behaviour_list_tool.rb +56 -0
  363. data/lib/rosett_ai/mcp/tools/behaviour_manage_tool.rb +114 -0
  364. data/lib/rosett_ai/mcp/tools/behaviour_show_tool.rb +62 -0
  365. data/lib/rosett_ai/mcp/tools/compile_status_tool.rb +122 -0
  366. data/lib/rosett_ai/mcp/tools/compile_tool.rb +191 -0
  367. data/lib/rosett_ai/mcp/tools/comply_tool.rb +79 -0
  368. data/lib/rosett_ai/mcp/tools/config_compile_tool.rb +71 -0
  369. data/lib/rosett_ai/mcp/tools/config_status_tool.rb +79 -0
  370. data/lib/rosett_ai/mcp/tools/content_tool.rb +78 -0
  371. data/lib/rosett_ai/mcp/tools/context_query_tool.rb +156 -0
  372. data/lib/rosett_ai/mcp/tools/design_list_tool.rb +57 -0
  373. data/lib/rosett_ai/mcp/tools/design_show_tool.rb +69 -0
  374. data/lib/rosett_ai/mcp/tools/doctor_tool.rb +62 -0
  375. data/lib/rosett_ai/mcp/tools/documentation_status_tool.rb +45 -0
  376. data/lib/rosett_ai/mcp/tools/engines_tool.rb +84 -0
  377. data/lib/rosett_ai/mcp/tools/hook_install_tool.rb +190 -0
  378. data/lib/rosett_ai/mcp/tools/hook_preview_tool.rb +173 -0
  379. data/lib/rosett_ai/mcp/tools/hooks_status_tool.rb +84 -0
  380. data/lib/rosett_ai/mcp/tools/init_tool.rb +87 -0
  381. data/lib/rosett_ai/mcp/tools/license_status_tool.rb +44 -0
  382. data/lib/rosett_ai/mcp/tools/project_tool.rb +117 -0
  383. data/lib/rosett_ai/mcp/tools/provenance_tool.rb +97 -0
  384. data/lib/rosett_ai/mcp/tools/provenance_write_tool.rb +40 -0
  385. data/lib/rosett_ai/mcp/tools/retrofit_tool.rb +81 -0
  386. data/lib/rosett_ai/mcp/tools/rule_search_tool.rb +163 -0
  387. data/lib/rosett_ai/mcp/tools/schema_get_tool.rb +94 -0
  388. data/lib/rosett_ai/mcp/tools/tooling_tool.rb +86 -0
  389. data/lib/rosett_ai/mcp/tools/validate_tool.rb +105 -0
  390. data/lib/rosett_ai/mcp/tools/workflow_execute_tool.rb +74 -0
  391. data/lib/rosett_ai/mcp/tools/workflow_tool.rb +78 -0
  392. data/lib/rosett_ai/migration/detector.rb +117 -0
  393. data/lib/rosett_ai/migration/nncc_config_migrator.rb +94 -0
  394. data/lib/rosett_ai/migration/nncc_project_migrator.rb +90 -0
  395. data/lib/rosett_ai/migration/xdg_migrator.rb +123 -0
  396. data/lib/rosett_ai/package_manager/apt.rb +108 -0
  397. data/lib/rosett_ai/package_manager/base.rb +68 -0
  398. data/lib/rosett_ai/package_manager/gem_backend.rb +90 -0
  399. data/lib/rosett_ai/packaging/variant_config.rb +92 -0
  400. data/lib/rosett_ai/path_resolver.rb +115 -0
  401. data/lib/rosett_ai/plugins/contract.rb +43 -0
  402. data/lib/rosett_ai/plugins/engine_contract.rb +60 -0
  403. data/lib/rosett_ai/plugins/gui_contract.rb +74 -0
  404. data/lib/rosett_ai/plugins/mcp_contract.rb +48 -0
  405. data/lib/rosett_ai/plugins/registry.rb +150 -0
  406. data/lib/rosett_ai/policy/auditor.rb +41 -0
  407. data/lib/rosett_ai/policy/deny_list.rb +71 -0
  408. data/lib/rosett_ai/policy/opt_out_scanner.rb +37 -0
  409. data/lib/rosett_ai/policy/policy_compiler.rb +84 -0
  410. data/lib/rosett_ai/policy/protected_files.rb +47 -0
  411. data/lib/rosett_ai/policy/tier_hierarchy.rb +48 -0
  412. data/lib/rosett_ai/policy/validator.rb +35 -0
  413. data/lib/rosett_ai/profiler.rb +79 -0
  414. data/lib/rosett_ai/project/drift_detector.rb +126 -0
  415. data/lib/rosett_ai/project/manager.rb +115 -0
  416. data/lib/rosett_ai/project/sync_manager.rb +138 -0
  417. data/lib/rosett_ai/project/template_applier.rb +105 -0
  418. data/lib/rosett_ai/project_context.rb +82 -0
  419. data/lib/rosett_ai/provenance/entry.rb +63 -0
  420. data/lib/rosett_ai/provenance/file_source.rb +32 -0
  421. data/lib/rosett_ai/provenance/source.rb +62 -0
  422. data/lib/rosett_ai/provenance/store.rb +153 -0
  423. data/lib/rosett_ai/provenance/tracker.rb +62 -0
  424. data/lib/rosett_ai/provenance/trailer_generator.rb +43 -0
  425. data/lib/rosett_ai/provenance/validator.rb +45 -0
  426. data/lib/rosett_ai/quorum/collector.rb +59 -0
  427. data/lib/rosett_ai/quorum/comparator.rb +81 -0
  428. data/lib/rosett_ai/quorum/dispatcher.rb +57 -0
  429. data/lib/rosett_ai/quorum/strategies/adopt.rb +56 -0
  430. data/lib/rosett_ai/rai_config.rb +107 -0
  431. data/lib/rosett_ai/retrofit/base_parser.rb +66 -0
  432. data/lib/rosett_ai/retrofit/engine.rb +171 -0
  433. data/lib/rosett_ai/retrofit/parsers/agents_md_parser.rb +50 -0
  434. data/lib/rosett_ai/retrofit/parsers/claude_parser.rb +69 -0
  435. data/lib/rosett_ai/retrofit/parsers/cursor_parser.rb +82 -0
  436. data/lib/rosett_ai/retrofit/round_trip_validator.rb +65 -0
  437. data/lib/rosett_ai/retrofit/scanner.rb +47 -0
  438. data/lib/rosett_ai/retrofit/secret_detector.rb +87 -0
  439. data/lib/rosett_ai/secrets_resolver.rb +71 -0
  440. data/lib/rosett_ai/smart_feedback/suggester.rb +83 -0
  441. data/lib/rosett_ai/smart_feedback/thor_middleware.rb +84 -0
  442. data/lib/rosett_ai/structured_logger.rb +110 -0
  443. data/lib/rosett_ai/telemetry/json_lines_writer.rb +50 -0
  444. data/lib/rosett_ai/telemetry/log_rotator.rb +67 -0
  445. data/lib/rosett_ai/telemetry/provider.rb +26 -0
  446. data/lib/rosett_ai/telemetry/reporter.rb +144 -0
  447. data/lib/rosett_ai/telemetry.rb +47 -0
  448. data/lib/rosett_ai/text_sanitizer.rb +62 -0
  449. data/lib/rosett_ai/thor/cli.rb +269 -0
  450. data/lib/rosett_ai/thor/tasks/adopt.rb +250 -0
  451. data/lib/rosett_ai/thor/tasks/backup.rb +420 -0
  452. data/lib/rosett_ai/thor/tasks/behaviour.rb +474 -0
  453. data/lib/rosett_ai/thor/tasks/build.rb +1162 -0
  454. data/lib/rosett_ai/thor/tasks/compile.rb +415 -0
  455. data/lib/rosett_ai/thor/tasks/completion.rb +123 -0
  456. data/lib/rosett_ai/thor/tasks/comply.rb +82 -0
  457. data/lib/rosett_ai/thor/tasks/config.rb +265 -0
  458. data/lib/rosett_ai/thor/tasks/content.rb +193 -0
  459. data/lib/rosett_ai/thor/tasks/dbus.rb +321 -0
  460. data/lib/rosett_ai/thor/tasks/design.rb +258 -0
  461. data/lib/rosett_ai/thor/tasks/desktop.rb +129 -0
  462. data/lib/rosett_ai/thor/tasks/doctor.rb +127 -0
  463. data/lib/rosett_ai/thor/tasks/documentation.rb +321 -0
  464. data/lib/rosett_ai/thor/tasks/engines.rb +167 -0
  465. data/lib/rosett_ai/thor/tasks/hooks.rb +219 -0
  466. data/lib/rosett_ai/thor/tasks/init.rb +259 -0
  467. data/lib/rosett_ai/thor/tasks/license.rb +120 -0
  468. data/lib/rosett_ai/thor/tasks/mcp.rb +535 -0
  469. data/lib/rosett_ai/thor/tasks/migrate.rb +121 -0
  470. data/lib/rosett_ai/thor/tasks/plugins.rb +157 -0
  471. data/lib/rosett_ai/thor/tasks/project.rb +260 -0
  472. data/lib/rosett_ai/thor/tasks/provenance.rb +195 -0
  473. data/lib/rosett_ai/thor/tasks/release.rb +314 -0
  474. data/lib/rosett_ai/thor/tasks/retrofit.rb +90 -0
  475. data/lib/rosett_ai/thor/tasks/tooling.rb +308 -0
  476. data/lib/rosett_ai/thor/tasks/validate.rb +108 -0
  477. data/lib/rosett_ai/thor/tasks/workflow.rb +196 -0
  478. data/lib/rosett_ai/tooling/ci_yaml_validator.rb +37 -0
  479. data/lib/rosett_ai/tooling/version_checker.rb +35 -0
  480. data/lib/rosett_ai/ui/accessible_tui.rb +61 -0
  481. data/lib/rosett_ai/ui/base.rb +46 -0
  482. data/lib/rosett_ai/ui/gtk4.rb +98 -0
  483. data/lib/rosett_ai/ui/kde.rb +40 -0
  484. data/lib/rosett_ai/ui/qt6.rb +40 -0
  485. data/lib/rosett_ai/ui/registry.rb +60 -0
  486. data/lib/rosett_ai/ui/tty_helper.rb +74 -0
  487. data/lib/rosett_ai/ui/tui.rb +59 -0
  488. data/lib/rosett_ai/validators/behaviour_validator.rb +20 -0
  489. data/lib/rosett_ai/validators/design_validator.rb +17 -0
  490. data/lib/rosett_ai/validators/schema_validator.rb +84 -0
  491. data/lib/rosett_ai/validators/tooling_validator.rb +17 -0
  492. data/lib/rosett_ai/version.rb +8 -0
  493. data/lib/rosett_ai/version_consistency_checker.rb +129 -0
  494. data/lib/rosett_ai/workflow/audit_log.rb +86 -0
  495. data/lib/rosett_ai/workflow/engine.rb +142 -0
  496. data/lib/rosett_ai/workflow/manager.rb +82 -0
  497. data/lib/rosett_ai/workflow/schema_validator.rb +71 -0
  498. data/lib/rosett_ai/workflow/step_runner.rb +61 -0
  499. data/lib/rosett_ai/workflow/steps/prompt_step.rb +62 -0
  500. data/lib/rosett_ai/workflow/steps/rai_step.rb +74 -0
  501. data/lib/rosett_ai/workflow/steps/shell_step.rb +53 -0
  502. data/lib/rosett_ai/yaml_loader.rb +78 -0
  503. data/lib/rosett_ai.rb +221 -0
  504. data/lib/rubocop/cop/rosett_ai/shell_interpolation.rb +54 -0
  505. data/lib/rubocop/cop/rosett_ai/unsafe_const_get.rb +60 -0
  506. data/lib/rubocop/cop/rosett_ai/unsafe_send.rb +50 -0
  507. data/lib/rubocop/cop/rosett_ai/unsafe_yaml_load.rb +40 -0
  508. data/lib/rubocop/rosett_ai.rb +9 -0
  509. data/lib/scripts/generated/docker_hub_tags.rb +126 -0
  510. data/locales/.gitkeep +0 -0
  511. data/locales/ar.yml +579 -0
  512. data/locales/en.yml +571 -0
  513. data/locales/fr.yml +567 -0
  514. data/packaging/build-engine-deb.sh +81 -0
  515. data/packaging/scripts/postinst +17 -0
  516. data/packaging/scripts/postrm +19 -0
  517. data/packaging/scripts/prerm +10 -0
  518. data/packaging/wrapper.sh.template +38 -0
  519. data/rosett-ai.gemspec +63 -0
  520. data/rules/.gitkeep +0 -0
  521. data/scripts/publish/pulp_upload.sh +123 -0
  522. data/settings.json +29 -0
  523. data/share/applications/be.neatnerds.rosettai.desktop +29 -0
  524. data/share/dbus-1/interfaces/be.neatnerds.rosettai.xml +103 -0
  525. data/share/dbus-1/services/be.neatnerds.rosettai.service +3 -0
  526. data/share/templates/behaviour/criticalthinking.yml +69 -0
  527. metadata +810 -0
data/SECURITY.md ADDED
@@ -0,0 +1,114 @@
1
+ # Security Policy
2
+
3
+ ## Scope
4
+
5
+ This policy covers the following NeatNerds open-source projects:
6
+
7
+ - **Rosett-AI** (raictl) --- the core CLI and compiler
8
+ - **rosett-ai-engine-\*** --- all official engine adapter gems
9
+ - **auditor-mcp** --- InSpec MCP server
10
+ - **openvox-mcp** --- OpenVox MCP server
11
+ - **neatspec** --- Compliance-as-a-Service wrapper
12
+
13
+ Third-party forks and community plugins are outside this scope unless
14
+ they ship under the `neatnerds` GitLab namespace.
15
+
16
+ ## Supported Versions
17
+
18
+ | Version | Supported |
19
+ |---------|-----------|
20
+ | Latest release | Yes |
21
+ | Previous minor | Security fixes only |
22
+ | Older | No |
23
+
24
+ Only the latest tagged release and the immediately preceding minor
25
+ release receive security patches. If you are running an older version,
26
+ please upgrade before reporting.
27
+
28
+ ## Reporting a Vulnerability
29
+
30
+ **Do not open a public issue for security vulnerabilities.**
31
+
32
+ ### Email (primary channel --- no account required)
33
+
34
+ Send an email to **security@neatnerds.be** with:
35
+
36
+ 1. Affected project and version
37
+ 2. Description of the vulnerability
38
+ 3. Steps to reproduce (proof-of-concept if possible)
39
+ 4. Impact assessment (what an attacker could achieve)
40
+
41
+ Email is the primary reporting channel. It requires no account, no
42
+ registration, and no prior relationship with the project. Anyone who
43
+ discovers a vulnerability can report it immediately.
44
+
45
+ You may optionally encrypt your report using the PGP key for
46
+ `security@neatnerds.be`, available on
47
+ [keys.openpgp.org](https://keys.openpgp.org). Search for the email
48
+ address to retrieve the public key.
49
+
50
+ ### GitLab Confidential Issue (alternative --- requires account)
51
+
52
+ If you already have an account on our self-hosted GitLab instance
53
+ (`gitlab.neatnerds.be`), you may open a **confidential** issue on
54
+ the affected project's repository instead. Mark it confidential
55
+ before submitting and use the `Security` issue template.
56
+
57
+ This channel is mainly useful for existing contributors and
58
+ community members who already have access. If you do not have an
59
+ account, use the email channel above --- do not create an account
60
+ solely to report a vulnerability.
61
+
62
+ ## Response Timeline
63
+
64
+ | Stage | Target |
65
+ |-------|--------|
66
+ | Acknowledgement | 48 hours |
67
+ | Initial assessment | 7 calendar days |
68
+ | Fix or mitigation | 90 calendar days |
69
+
70
+ If we cannot meet a target, we will communicate the revised timeline
71
+ in the acknowledgement or assessment response.
72
+
73
+ ## Disclosure Policy
74
+
75
+ We follow **coordinated disclosure**:
76
+
77
+ 1. The reporter and maintainers agree on a disclosure date (default:
78
+ 90 days after the initial report).
79
+ 2. A fix is developed and tested in a private branch.
80
+ 3. The fix is released, and a security advisory is published on
81
+ the same day.
82
+ 4. The reporter is credited in the advisory (unless they request
83
+ anonymity).
84
+
85
+ We will never disclose a vulnerability before a fix is available
86
+ unless active exploitation is detected in the wild.
87
+
88
+ ## Credit
89
+
90
+ We gratefully acknowledge security researchers who report
91
+ vulnerabilities responsibly. Unless you request otherwise, your name
92
+ (or handle) and a link to your profile will appear in the security
93
+ advisory and the CHANGELOG entry for the fix.
94
+
95
+ ## Security Advisories
96
+
97
+ | ID | Date | Severity | Summary |
98
+ |----|------|----------|---------|
99
+ | [NNSA-2026-001](https://gitlab.neatnerds.be/foss/rosett-ai/rosett-ai/-/issues/2) | 2026-04-18 | Medium | Session data included in v1.2.0 gem package. Yanked. Fixed in v1.3.0+. |
100
+
101
+ ## Security Best Practices for Contributors
102
+
103
+ All contributions must follow these rules (enforced by CI and
104
+ overcommit hooks):
105
+
106
+ - Use `YAML.safe_load` exclusively --- never `YAML.load`
107
+ - Use array-form `system()` calls --- never string interpolation
108
+ in shell commands
109
+ - Write files only to whitelisted directories
110
+ - Set 0600 permissions on any file containing secrets
111
+ - Never log secrets or credentials
112
+ - Validate all external input before use
113
+ - Include `# SPDX-License-Identifier: GPL-3.0-only` in every
114
+ Ruby source file
data/bin/rai ADDED
@@ -0,0 +1 @@
1
+ raictl
data/cliff.toml ADDED
@@ -0,0 +1,52 @@
1
+ # git-cliff configuration for NeatNerds Code Companion
2
+ # Generates Keep a Changelog 1.1.0 formatted CHANGELOG from conventional commits.
3
+ #
4
+ # Reference: https://git-cliff.org/docs/configuration
5
+
6
+ [changelog]
7
+ header = """
8
+ # Changelog
9
+
10
+ All notable changes to the NeatNerds Code Companion (nncc) are documented in this file.
11
+
12
+ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).\n
13
+ """
14
+
15
+ body = """
16
+ {% if version %}\
17
+ ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
18
+ {% else %}\
19
+ ## [Unreleased]
20
+ {% endif %}\
21
+ {% for group, commits in commits | group_by(attribute="group") %}
22
+ ### {{ group | striptags | trim | upper_first }}
23
+ {% for commit in commits %}
24
+ - {% if commit.scope %}**{{ commit.scope }}:** {% endif %}\
25
+ {{ commit.message | split(pat=":") | last | trim | upper_first }}\
26
+ {% endfor %}
27
+ {% endfor -%}
28
+ """
29
+
30
+ footer = ""
31
+ trim = true
32
+
33
+ [git]
34
+ conventional_commits = true
35
+ filter_unconventional = false
36
+ split_commits = false
37
+ protect_breaking_commits = false
38
+ filter_commits = false
39
+ tag_pattern = "v[0-9].*"
40
+ sort_commits = "oldest"
41
+ commit_parsers = [
42
+ { message = "^feat", group = "<!-- 0 -->Added" },
43
+ { message = "^fix", group = "<!-- 1 -->Fixed" },
44
+ { message = "^refactor", group = "<!-- 2 -->Changed" },
45
+ { message = "^perf", group = "<!-- 2 -->Changed" },
46
+ { message = "^docs", group = "<!-- 3 -->Documentation" },
47
+ { message = "^chore\\(release\\)", skip = true },
48
+ { message = "^chore", group = "<!-- 4 -->Other" },
49
+ { message = "^ci", group = "<!-- 4 -->Other" },
50
+ { message = "^test", group = "<!-- 5 -->Other" },
51
+ { body = ".*", group = "<!-- 6 -->Other" },
52
+ ]
@@ -0,0 +1,8 @@
1
+ ---
2
+ patterns:
3
+ - pattern: '(?i)\b[A-Z0-9._%+-]+@neatnerds\.be\b'
4
+ replacement: '[EMAIL-REDACTED]'
5
+ - pattern: 'NeatNerds'
6
+ replacement: '[COMPANY]'
7
+ - pattern: 'gitlab\.neatnerds\.be'
8
+ replacement: '[INTERNAL-URL]'
File without changes
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: cra_compliance
3
+ version: 1.0.0
4
+ description: EU Cyber Resilience Act (CRA) compliance checks
5
+ rules:
6
+ - id: CRA-001
7
+ description: SBOM must be present and current
8
+ severity: error
9
+ check: sbom_present
10
+ remediation: "Generate SBOM with: rai comply --sbom"
11
+ - id: CRA-002
12
+ description: Vulnerability disclosure policy must be documented
13
+ severity: error
14
+ check: vulnerability_policy
15
+ remediation: "Create SECURITY.md with vulnerability disclosure policy"
16
+ - id: CRA-003
17
+ description: All dependencies must have known licenses
18
+ severity: warning
19
+ check: dependency_licenses_known
20
+ remediation: "Audit dependencies with: rai comply --license"
21
+ - id: CRA-004
22
+ description: Contact information for security reports must be provided
23
+ severity: error
24
+ check: security_contact
25
+ remediation: "Add security contact to SECURITY.md or package metadata"
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: license_compliance
3
+ version: 1.0.0
4
+ description: GPL-3.0-only license compatibility checks
5
+ rules:
6
+ - id: LIC-001
7
+ description: All dependencies must have GPL-3.0-compatible licenses
8
+ severity: error
9
+ check: gpl_compatible
10
+ remediation: "Replace GPL-incompatible dependency or add to allowlist"
11
+ - id: LIC-002
12
+ description: Project LICENSE file must be present
13
+ severity: error
14
+ check: license_file_present
15
+ remediation: "Create LICENSE file with GPL-3.0-only text"
16
+ - id: LIC-003
17
+ description: All source files must have SPDX license headers
18
+ severity: warning
19
+ check: spdx_headers
20
+ remediation: "Add SPDX-License-Identifier header to source files"
@@ -0,0 +1,181 @@
1
+ ---
2
+ name: aaif_alignment
3
+ domain: core
4
+ version: 0.1.0
5
+ status: implemented
6
+ priority: 2
7
+ author: hugo
8
+ created_at: "2026-02-24"
9
+ modified_at: "2026-03-16"
10
+ modified_by: claude
11
+ depends_on:
12
+ - security
13
+ - architecture
14
+ - compiler
15
+ - mcp_integration
16
+ - error_handling
17
+ #
18
+ intent: |
19
+ Position rosett-ai as a standards-compliant tool within the Agentic AI Foundation (AAIF)
20
+ ecosystem by implementing AAIF-governed protocols and compilation targets.
21
+
22
+ The AAIF (Linux Foundation, Dec 2025) governs three founding projects:
23
+ - MCP (Anthropic) — protocol for AI-tool integration
24
+ - AGENTS.md (OpenAI) — vendor-neutral project instruction files
25
+ - goose (Block) — open-source AI agent framework
26
+
27
+ raictl fills a gap none of these projects address: structured, validated, versioned,
28
+ auditable configuration management for AI agent workflows. This document defines
29
+ how rosett-ai integrates with the AAIF ecosystem without losing its core value proposition.
30
+
31
+ Key alignments:
32
+ 1. AGENTS.md as a compilation target (alongside CLAUDE.md and generic)
33
+ 2. MCP as the integration protocol (see mcp_integration.yml)
34
+ 3. Vendor-neutral multi-agent support (Claude, Goose, Cursor, Copilot, etc.)
35
+ 4. Potential AAIF project contribution pathway
36
+
37
+ AAIF contribution pathway:
38
+ - Recommended: modular extraction (rosett-ai-mcp as Apache-2.0, core stays GPL-3.0)
39
+ - Timeline: build MCP integration first, extract after validation, pitch at MCP Dev Summit NYC (April 2-3, 2026)
40
+ - License tension: AAIF projects use Apache-2.0/MIT; GPL-3.0 is copyleft outlier
41
+ - Open-core model survives relicensing (content packs are data, not derivative works)
42
+
43
+ This design document is part of the AAIF Alignment epic (P2).
44
+ #
45
+ constraints:
46
+ - AGENTS.md compilation must produce valid, idiomatic Markdown (no YAML frontmatter unless spec adds it)
47
+ - AGENTS.md output must be readable by all 21+ compatible tools listed on agents.md
48
+ - Multi-target compilation must not degrade existing CLAUDE.md output quality
49
+ - Vendor-neutral features must not break Claude Code specific features
50
+ - AAIF spec tracking must be explicit — pin to known spec versions, not "latest"
51
+ - No AAIF-specific code paths that circumvent security constraints from security.yml
52
+ - No code may be contributed to AAIF without a documented license compatibility assessment
53
+ - AGENTS.md files must be compilable from the same YAML sources as CLAUDE.md
54
+ - Goose .goosehints format support is optional — only add if demand exists
55
+ - Any AAIF governance participation must be documented in project decisions log
56
+ #
57
+ acceptance_criteria:
58
+ - 'bin/raictl compile --engine agents_md produces valid AGENTS.md file'
59
+ - AGENTS.md output includes all enabled behaviours, properly sectioned by domain
60
+ - AGENTS.md output is tested against at least 3 tools (manual verification with Claude Code, Goose, Cursor)
61
+ - Compiler target registry includes agents_md alongside claude, generic, and model-specific targets
62
+ - Design documents reference AAIF spec versions explicitly (MCP 2025-03-26, AGENTS.md v0.1.0)
63
+ - Multi-agent configuration support documented with examples for Claude Code, Goose, and generic agents
64
+ - AAIF ecosystem positioning documented in project README or CONTRIBUTING.md
65
+ - Compilation lockfile tracks AGENTS.md output alongside existing targets
66
+ - conf/targets/agents_md.yml target profile exists with format-specific compilation rules
67
+ - Modular extraction plan documented for Rosett-AI-mcp (Apache-2.0) contribution pathway
68
+ - License compatibility matrix maintained for AAIF contribution scenarios
69
+ - AAIF governance participation options documented (Silver member vs project donation)
70
+ - Compliance differentiator (CRA/NIS2/DORA) integrated into MCP admin capabilities
71
+ #
72
+ examples:
73
+ - scenario: "User compiles behaviours to AGENTS.md format"
74
+ expected: |
75
+ $ bin/raictl compile --engine agents_md --verbose
76
+ Compiling 12 behaviours to AGENTS.md format...
77
+ Output: AGENTS.md (project root)
78
+ Sections: Project Overview, Build & Test, Code Style, Security, Testing
79
+ Format: Standard Markdown with ## headings per domain
80
+ not: "Output contains YAML, JSON Schema references, or rosett-ai-internal metadata"
81
+ - scenario: "User compiles for multiple targets simultaneously"
82
+ expected: |
83
+ $ bin/raictl compile --engine claude --engine agents_md
84
+ Compiling to ~/.claude/rules/ (claude target)
85
+ Compiling to ./AGENTS.md (agents_md target)
86
+ Both outputs reflect the same source behaviours with format-appropriate rendering.
87
+ not: "One target's compilation affects the other's output"
88
+ - scenario: "User wants to use rosett-ai with Goose instead of Claude Code"
89
+ expected: |
90
+ $ bin/raictl compile --engine agents_md
91
+ Creates AGENTS.md file. Goose reads it as hints (alongside .goosehints).
92
+ User can also configure rosett-ai as an MCP server in Goose's config.yaml.
93
+ not: "User must maintain separate configuration for each AI agent"
94
+ - scenario: "AAIF updates the MCP spec from 2025-03-26 to a newer revision"
95
+ expected: |
96
+ raictl tracks spec version in conf/targets/ and mcp_integration design doc.
97
+ Maintainer reviews changelog, updates pinned version, runs compatibility tests.
98
+ Release notes document spec version bump.
99
+ not: "rosett-ai silently breaks on spec change or auto-adopts unreviewed spec versions"
100
+ - scenario: "Preparing rosett-ai-mcp for AAIF contribution"
101
+ expected: |
102
+ 1. MCP integration built and tested within rosett-ai (GPL-3.0)
103
+ 2. MCP admin module extracted as rosett-ai-mcp (relicensed Apache-2.0)
104
+ 3. rosett-ai-mcp has own repo, CI, tests, README, GOVERNANCE.md
105
+ 4. Pitched at MCP Dev Summit NYC (April 2-3, 2026)
106
+ 5. If accepted: project hosted under AAIF, copyright to LF Projects, LLC
107
+ Core rosett-ai remains GPL-3.0 with open-core content model intact.
108
+ not: "Full rosett-ai donated, GPL-3.0 abandoned, open-core model compromised"
109
+ - scenario: "AAIF contribution not accepted, continuing independently"
110
+ expected: |
111
+ raictl continues as independent project using AAIF standards (MCP, AGENTS.md).
112
+ Optional: join as Silver member for ecosystem participation without project donation.
113
+ MCP integration and AGENTS.md compilation still provide value regardless.
114
+ not: "Project abandoned because AAIF didn't accept it"
115
+ - scenario: "Evaluating license options for AAIF contribution"
116
+ expected: |
117
+ Options evaluated:
118
+ 1. Relicense to Apache-2.0 (content model survives, copyleft lost)
119
+ 2. Dual-license GPL-3.0 + Apache-2.0 (complex but preserves both)
120
+ 3. Extract MCP only as Apache-2.0 (recommended — clean separation)
121
+ 4. Participate as member without donation (keep full control)
122
+ Decision documented in project decisions log with rationale.
123
+ not: "License changed without evaluating impact on open-core model"
124
+ - scenario: "User asks about AAIF compliance status"
125
+ expected: |
126
+ $ bin/raictl status --aaif
127
+ AAIF Alignment Status:
128
+ MCP Server: enabled (spec 2025-03-26, mcp gem 0.7.1)
129
+ AGENTS.md: supported (compiled target)
130
+ CLAUDE.md: supported (compiled target, primary)
131
+ Goose hints: not supported (planned)
132
+ not: "No visibility into AAIF ecosystem alignment"
133
+ #
134
+ anti_patterns:
135
+ - Treating AGENTS.md as a structured format (it is deliberately unstructured Markdown)
136
+ - Adding AAIF-specific fields to the core behaviour YAML schema (keep source format neutral)
137
+ - Coupling compilation logic to a single AAIF project (MCP, AGENTS.md, goose are independent)
138
+ - Auto-updating to new AAIF spec versions without maintainer review
139
+ - Claiming AAIF compliance or endorsement without actual contribution/acceptance
140
+ - Ignoring AGENTS.md security concerns (hidden Unicode injection, prompt injection via Markdown)
141
+ - Duplicating behaviour content across targets instead of compiling from single source
142
+ - Assuming AGENTS.md will gain a formal schema (design for current unstructured format)
143
+ - Donating full rosett-ai to AAIF without extracting MCP component first (loses GPL-3.0 protection)
144
+ - Relicensing core rosett-ai to Apache-2.0 without evaluating open-core model impact
145
+ - Claiming AAIF membership or endorsement before formal acceptance
146
+ - Pitching "AI agent config compiler" without the MCP admin angle (too narrow for AAIF)
147
+ - Ignoring the compliance differentiator (CRA/NIS2/DORA) — this is the strongest enterprise pitch
148
+ #
149
+ gui_notes: |
150
+ Document interactions (cross-references):
151
+
152
+ 1. mcp_integration.yml: MCP is the integration protocol. AAIF alignment
153
+ governs the strategic positioning; MCP integration handles the technical
154
+ implementation.
155
+
156
+ 2. compiler.yml: AGENTS.md is a compilation target alongside CLAUDE.md
157
+ and generic. Target profile: conf/targets/agents_md.yml.
158
+
159
+ 3. security.yml: AGENTS.md output must not contain hidden Unicode injection
160
+ or prompt injection patterns.
161
+
162
+ 4. licensing_system.yml: license compatibility assessment for AAIF
163
+ contribution (Apache-2.0 vs GPL-3.0 tension).
164
+
165
+ 5. comply.yml: CRA/NIS2/DORA compliance is the enterprise differentiator
166
+ for AAIF pitch.
167
+
168
+ 6. error_handling.yml: exit codes and structured errors for compilation
169
+ targets.
170
+ #
171
+ preferences:
172
+ language: ruby
173
+ patterns:
174
+ - "Compiler target pattern (AGENTS.md as target)"
175
+ - "Adapter pattern for format-specific rendering"
176
+ - "Strategy pattern for multi-target compilation"
177
+ testing: rspec with AGENTS.md output validation, multi-target compilation
178
+ tests, and spec version pinning verification
179
+ gems:
180
+ - json_schemer
181
+ - thor
@@ -0,0 +1,172 @@
1
+ ---
2
+ name: ab_testing
3
+ domain: ui
4
+ version: 0.1.0
5
+ status: draft
6
+ priority: 4
7
+ author: hugo
8
+ created_at: "2026-03-23"
9
+ modified_at: "2026-03-23"
10
+ modified_by: claude
11
+ depends_on:
12
+ - architecture
13
+ - ui_framework
14
+ - structured_logging
15
+ - testing
16
+ #
17
+ intent: |
18
+ Define a framework for running survey-based A/B preference studies on CLI
19
+ UX variants. Users manually opt into a variant via `rai config set`, use
20
+ raictl normally, then submit feedback through a public survey (GitLab issue
21
+ template or external form). No automated telemetry or data collection of
22
+ any kind — the framework only controls which UX variant is active.
23
+
24
+ The first test case is tree subcommand placement: Variant A (control)
25
+ keeps `tree` on every command group (current behaviour); Variant B
26
+ restricts `tree` to top-level only (`raictl tree`). This question cannot
27
+ be answered by author intuition — it requires empirical measurement
28
+ from real users.
29
+
30
+ Each UX study is defined as a YAML file in `conf/ux_studies/` specifying
31
+ variants, survey questions, target sample size, and duration. The active
32
+ variant is stored in `~/.config/rosett-ai/config.yml` under a `ux_variants`
33
+ key. Default is always the current behaviour (no user-visible change
34
+ unless explicitly opted in).
35
+
36
+ This design intentionally avoids runtime analytics, automatic data
37
+ reporting, or any mechanism that collects usage data without the user
38
+ actively choosing to fill out a survey. Privacy is non-negotiable.
39
+ #
40
+ constraints:
41
+ - "No automated telemetry, usage tracking, or data collection of any kind"
42
+ - "Variant switching is manual only: `rai config set ux_variant.<study> <variant>`"
43
+ - "Active variant is stored in `~/.config/rosett-ai/config.yml` under the
44
+ `ux_variants` key (XDG-compliant path)"
45
+ - "Survey feedback is submitted manually by users via external survey
46
+ (GitLab issue template or hosted form) — rosett-ai never transmits data"
47
+ - "Default variant is always the current behaviour (control) — no
48
+ user-visible change unless the user explicitly opts in"
49
+ - "Variant switching takes effect on next command invocation — no
50
+ process restart required"
51
+ - "Each UX study definition must specify: variants (2+), survey
52
+ questions, target sample size, duration, and survey link"
53
+ - "UX study definitions live in `conf/ux_studies/` as YAML files
54
+ validated against a schema"
55
+ - "Study YAML files are shipped with rosett-ai but are informational —
56
+ the framework reads them to display survey links and variant
57
+ descriptions, not to enforce participation"
58
+ - "This design governs UX preference testing. Feature visibility
59
+ gating is governed by feature_flags.yml. User configuration
60
+ management is governed by claude_code_configuration.yml"
61
+ #
62
+ acceptance_criteria:
63
+ - "`rai config set ux_variant.tree_placement per_command` activates
64
+ Variant A (control: tree on every command group)"
65
+ - "`rai config set ux_variant.tree_placement top_level` activates
66
+ Variant B (tree at top level only)"
67
+ - "`rai config show` displays active UX variants alongside other
68
+ configuration"
69
+ - "Default behaviour (no ux_variants key set) is Variant A — no
70
+ regression from current behaviour"
71
+ - "UX study YAML files in `conf/ux_studies/` are validated against
72
+ a JSON schema during `rai validate`"
73
+ - "Framework is reusable for future UX studies beyond tree placement
74
+ — no tree-specific logic in the core variant-switching mechanism"
75
+ #
76
+ examples:
77
+ - scenario: "User opts into the top-level-only tree variant"
78
+ expected: |
79
+ $ rai config set ux_variant.tree_placement top_level
80
+ UX variant set: tree_placement = top_level
81
+
82
+ `raictl tree` shows the full command hierarchy.
83
+ `rai compile tree` is not available (removed from subcommand groups).
84
+ `raictl tree` output includes a survey link for feedback.
85
+ not: |
86
+ Variant change requires a restart. Subcommand `tree` silently
87
+ disappears without the user opting in.
88
+ - scenario: "User has never configured any UX variant"
89
+ expected: |
90
+ All commands behave exactly as today. `raictl tree` works.
91
+ `rai compile tree` works. `rai behaviour tree` works.
92
+ No survey prompts, no variant notices, no behavioural change.
93
+ not: |
94
+ User sees A/B testing notices without opting in. Default
95
+ behaviour changes. Any data is collected silently.
96
+ - scenario: "User switches back to the default variant"
97
+ expected: |
98
+ $ rai config set ux_variant.tree_placement per_command
99
+ UX variant set: tree_placement = per_command
100
+
101
+ All subcommand groups have `tree` again (identical to default).
102
+ not: |
103
+ Cannot revert to the original variant. Switching requires
104
+ editing config files manually.
105
+ - scenario: "UX study YAML file has invalid structure"
106
+ expected: |
107
+ $ rai validate
108
+ conf/ux_studies/tree_placement.yml: FAIL — missing required key 'target_sample_size'
109
+ Exit code 1.
110
+ not: |
111
+ Invalid study files are silently ignored. Validation does not
112
+ cover UX study definitions.
113
+ #
114
+ anti_patterns:
115
+ - "Automated telemetry or usage analytics of any kind"
116
+ - "Changing default behaviour without explicit user opt-in"
117
+ - "Collecting any data without the user actively filling out a survey"
118
+ - "Hardcoding study-specific logic in the variant switching framework"
119
+ - "Making survey participation a prerequisite for using rosett-ai"
120
+ - "Shipping a variant as default before the study concludes"
121
+ - "Using feature flags (RAI_EXPERIMENTAL) for UX variants — different
122
+ concern, different mechanism"
123
+ - "Remote configuration or server-side variant assignment"
124
+ #
125
+ gui_notes: |
126
+ Document interactions (cross-references):
127
+
128
+ 1. feature_flags.yml: feature flags gate experimental features; UX
129
+ variants switch between alternative implementations of stable
130
+ features. Both use opt-in mechanisms but serve different purposes.
131
+
132
+ 2. ui_framework.yml: variant switching affects CLI command registration
133
+ (Thor subcommand groups), which is a UI framework concern.
134
+
135
+ 3. structured_logging.yml: variant switching events can be logged
136
+ locally for debugging, but logs are never transmitted.
137
+
138
+ 4. architecture.yml: UX study definitions follow the data-driven
139
+ pattern (YAML config, not hardcoded logic).
140
+
141
+ First study definition (conf/ux_studies/tree_placement.yml):
142
+
143
+ name: tree_placement
144
+ description: "Tree subcommand placement preference study"
145
+ status: active
146
+ variants:
147
+ per_command:
148
+ description: "tree available on every command group (current)"
149
+ default: true
150
+ top_level:
151
+ description: "tree available only as top-level `raictl tree`"
152
+ survey:
153
+ questions:
154
+ - "Which variant do you prefer? (A: per-command / B: top-level)"
155
+ - "Rate discoverability of the tree command (1-5)"
156
+ - "Free-text: any other feedback on tree command placement?"
157
+ link: "https://gitlab.neatnerds.be/neatnerds/NeatNerds-AI/rosett-ai/-/issues/new?issuable_template=ux_study_tree_placement"
158
+ target_sample_size: 30
159
+ duration_days: 90
160
+ created_at: "2026-03-23"
161
+ #
162
+ preferences:
163
+ language: ruby
164
+ patterns:
165
+ - "Data-driven variant definitions (YAML, not hardcoded)"
166
+ - "Config-based opt-in (XDG config.yml, not environment variables)"
167
+ - "Strategy pattern for variant-specific command registration"
168
+ - "Schema validation for UX study definitions"
169
+ testing: rspec with variant switching scenarios, default behaviour
170
+ regression tests, config persistence, and study YAML validation
171
+ gems:
172
+ - thor
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: accessibility
3
+ domain: accessibility
4
+ version: 1.1.0
5
+ status: implemented
6
+ priority: 3
7
+ author: hugo
8
+ created_at: "2026-02-18"
9
+ modified_at: "2026-03-17"
10
+ modified_by: claude
11
+ depends_on:
12
+ - architecture
13
+
14
+ intent: |
15
+ Ensure rosett-ai is usable by humans with any kind of disability — visual
16
+ impairment, motor impairment, cognitive difficulties, or those using
17
+ assistive technologies. Accessibility is a core design constraint, not a
18
+ feature to add later. As a Belgium/EU project, rosett-ai targets EN 301 549
19
+ compliance and WCAG 2.2 Level AA principles. Building to this standard
20
+ from the start avoids costly retrofitting required by the European
21
+ Accessibility Act (EAA).
22
+
23
+ constraints:
24
+ - All interactive elements must be keyboard-accessible in all UI variants
25
+ - All interactive elements must have accessible labels (no unlabelled buttons or controls)
26
+ - No information may be conveyed by colour alone (use icons or text alongside)
27
+ - No audio-only feedback (always provide visual or text equivalent)
28
+ - Focus indicator must be visible at all times (never hidden)
29
+ - Error messages must identify the specific field and describe the error clearly
30
+ - Destructive actions require confirmation (undo capability or explicit prompt)
31
+ - TUI accessible mode must produce linear, sequential text (no box drawing)
32
+ - GTK4 must use GtkAccessible roles and labels on all widgets
33
+ - Qt6 must use QAccessible roles, accessibleName, and accessibleDescription
34
+ - Minimum touch/click target size is 44x44dp (WCAG 2.2 Level AA)
35
+ - No auto-dismissing notifications or time-limited interactions
36
+ - Animations must respect prefers-reduced-motion system setting
37
+
38
+ acceptance_criteria:
39
+ - Accessible mode (--accessible) auto-activates when ORCA_RUNNING or BRLTTY_TTY is set
40
+ - Keyboard-only navigation reaches all interactive elements in TUI mode
41
+ - Screen reader (Orca) can read all content and announce state changes
42
+ - High-contrast system theme produces no invisible or unreadable elements
43
+ - UI works at 200% font scaling without clipping or overlap (GTK4/Qt6 — deferred to GUI phase)
44
+ - accerciser audit reports no missing roles or labels in GTK4 implementation (GTK4 — deferred to GUI phase)
45
+ - All design documents with domain=ui include an accessibility section
46
+ - shared_examples "a UI implementation" includes accessibility method checks
47
+
48
+ examples:
49
+ - scenario: "Visually impaired user navigates settings with Orca"
50
+ expected: |
51
+ Screen reader announces: 'Settings categories, navigation'.
52
+ Arrow keys move between items. Orca announces each item name.
53
+ Enter selects. Detail pane announces: 'Settings for General, form'.
54
+ Tab moves between form fields. Each field label is announced.
55
+ not: "Orca reads box drawing characters. Navigation is silent. Fields have no labels."
56
+ - scenario: "Motor-impaired user uses switch access (2 buttons)"
57
+ expected: |
58
+ Sequential focus order moves through all controls in logical order.
59
+ Each focusable element has visible focus indicator. Activation targets
60
+ are at least 44x44dp.
61
+ not: "Focus jumps erratically. Small targets require precision. No visible focus indicator."
62
+ - scenario: "User enables high-contrast theme in GNOME"
63
+ expected: "All text remains readable. No elements become invisible. No colour-only indicators."
64
+ not: "Status indicators that were green/red become indistinguishable."
65
+ - scenario: "Arabic-speaking user runs rosett-ai with locale ar"
66
+ expected: "TUI text direction is RTL. GUI layout mirrors. Screen reader reads in correct direction."
67
+ not: "RTL text renders backwards. Layout remains LTR. Mixed content is garbled."
68
+
69
+ anti_patterns:
70
+ - Treating accessibility as a separate feature to add later
71
+ - Using colour as the sole indicator of state (red/green for error/success)
72
+ - Creating custom widgets without accessibility roles
73
+ - Hardcoding colours instead of respecting system theme
74
+ - Auto-dismissing notifications without user action
75
+ - Mouse-only interactions with no keyboard equivalent
76
+ - Skipping accessibility testing in CI or review process
77
+
78
+ preferences:
79
+ language: ruby
80
+ patterns:
81
+ - accessible_by_default
82
+ - semantic_roles_on_all_widgets
83
+ - keyboard_first_interaction_design
84
+ testing: rspec with accerciser integration for GTK4 (future)