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/CHANGELOG.md ADDED
@@ -0,0 +1,519 @@
1
+ # Changelog
2
+
3
+ All notable changes to the Rosett-AI are documented in this file.
4
+
5
+ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [1.3.3] - 2026-04-19
10
+
11
+ ### Fixed
12
+
13
+ - **MCP tool response type** — `Governance.register_tool` returned
14
+ `JSON.generate(result)` (String) but MCP gem v0.9.2 calls `.to_h` on the
15
+ return value (`server.rb:520`). Now returns `MCP::Tool::Response` with
16
+ content type `text`. v1.3.2 yanked from RubyGems (WP#1627)
17
+
18
+ ## [1.3.2] - 2026-04-19 [YANKED]
19
+
20
+ ### Fixed
21
+
22
+ - **MCP dispatch bug** — all 33 MCP tools were broken due to argument-passing
23
+ mismatch in `governance.rb`. Block parameter `do |args|` (positional) changed
24
+ to `do |**args|` (keyword splat) to match MCP gem v0.9.2 dispatch convention.
25
+ Second bug: bare `build_kwargs` call changed to `Governance.build_kwargs`
26
+ because `define_singleton_method` rebinds `self` (WP#1627)
27
+ - **Empty tool schemas** — all 27 parameterised tools now declare `INPUT_SCHEMA`
28
+ with proper JSON Schema definitions (types, descriptions, enum constraints,
29
+ required flags). AI clients receive parameter guidance instead of empty
30
+ `{"type": "object"}` (WP#1627)
31
+
32
+ ### Added
33
+
34
+ - **Design schema forge domain** — added `forge` to `design_schema.json` domain
35
+ enum (v1.2.0), unblocking Ilmarinen design documents
36
+ - **MCP integration tests** — 114 integration tests covering dispatch, schema
37
+ presence, and schema-method parity for all 33 registered tools
38
+
39
+ ## [1.3.1] - 2026-04-18
40
+
41
+ ### Fixed
42
+
43
+ - **Backup XDG path** — `raictl backup create --global` no longer writes to
44
+ read-only `/opt/rosett-ai/app/`. Default destination is now
45
+ `~/.config/rosett-ai/backups/` (XDG-compliant) (WP#1580)
46
+ - **MCP registrar path** — `resolve_command` now checks `/usr/local/bin/raictl`
47
+ first (where .deb installs the wrapper), then `/usr/bin/raictl`, then
48
+ falls back to `which raictl` for absolute path discovery
49
+
50
+ ### Added
51
+
52
+ - **Backup --output option** — shorthand for `--destination` to specify a
53
+ simple file path for backup output
54
+ - **Backup restore command** — `raictl backup restore PATH` restores
55
+ configuration from a previously created archive (supports .tar.gz,
56
+ .tar.xz, .zip)
57
+
58
+ ### Security
59
+
60
+ - **Session transcript removal** — stripped 125MB of Claude session transcripts
61
+ (`doc/claude-sessions/`) and context memory files (`doc/context/memory/`)
62
+ from git history using `git filter-repo`. Updated `.gitignore` and hardened
63
+ gemspec reject block to prevent future leaks (WP#1581)
64
+ - **Gem yank** — yanked `rosett-ai v1.2.0` from RubyGems (contained 122
65
+ session transcript files)
66
+
67
+ ## [1.3.0] - 2026-04-18
68
+
69
+ ### Added
70
+
71
+ - **MCP server (rai-mcp)** — Model Context Protocol server with 33 tools,
72
+ 8 resources, 4 prompts, and instructions field. Start with
73
+ `raictl mcp serve` (WP#1557)
74
+ - **MCP tool categories** — Behaviour management (list, show, display,
75
+ manage), design documents (list, show), compilation (compile,
76
+ compile_status), validation, configuration (config_status,
77
+ config_compile), compliance, diagnostics (doctor), engines, hooks
78
+ (status, preview, install), licensing, project info, provenance
79
+ (read, write), tooling, workflows (list, execute), documentation
80
+ status, init, backup, content, retrofit, rule search, context query,
81
+ and schema retrieval
82
+ - **MCP resources** — Behaviour files, design documents, provenance
83
+ records, configuration, JSON schemas, compiled rules, and git hooks
84
+ — all with 3-tier behaviour lookup (project → XDG → gem)
85
+ - **MCP instructions field** — Server returns a 6.5KB instruction
86
+ document listing all available tools with descriptions, surfaced
87
+ via MCP protocol 2025-03-26+
88
+ - **MCP init registration** — `raictl init --global` auto-registers
89
+ the rai-mcp server in Claude Code's `settings.json` mcpServers
90
+ configuration
91
+ - **Enforcement pipeline** — `EnforcementValidator` validates
92
+ enforcement blocks in behaviour rules with pattern safety checks
93
+ (no path traversal, no shell metacharacters, bounded globs).
94
+ `HookGenerator` generates overcommit hook scripts from enforcement
95
+ definitions (WP#1559)
96
+ - **Schema v1.3.0** — Behaviour schema updated with optional
97
+ `enforcement` block supporting file_patterns, commands, and
98
+ hook_phase definitions
99
+
100
+ ### Fixed
101
+
102
+ - **MCP annotation key format** — Tool annotations used camelCase
103
+ string keys (`'readOnlyHint'`) but mcp gem 0.9.2 expects snake_case
104
+ keyword args (`read_only_hint:`). Added `snake_case_annotations`
105
+ converter in Governance to transform at registration boundary
106
+
107
+ ## [1.2.0] - 2026-04-14
108
+
109
+ ### Added
110
+
111
+ - **Integration test: scope isolation** — Verifies project-scope compile
112
+ writes to `<project>/.claude/rules/` and does not modify global rules
113
+ (WP#1490)
114
+ - **Integration test: BehaviourCompiler production mode** — Verifies
115
+ BehaviourCompiler works without engine gems or stub registrations
116
+ (WP#1491)
117
+ - **Integration test: end-to-end compile** — Full pipeline test from YAML
118
+ source to compiled output for each builtin engine (claude, agents_md),
119
+ including scope isolation (WP#1492)
120
+ - **Integration test: engine registration** — Verifies builtin backends
121
+ resolve via `Backend.for()` without plugin registry, and that unknown
122
+ engines raise `CompileError` (WP#1492)
123
+
124
+ ### Fixed
125
+
126
+ - **Project-scope compile wrote to global rules** — `resolve_target_dir`
127
+ always returned `~/.claude/rules/` regardless of compile scope. Split
128
+ into `resolve_target_dir` (explicit output_dir) and `default_target_dir`
129
+ (scope-based routing). Project scope now writes to
130
+ `<project_root>/.claude/rules/` (WP#1490)
131
+ - **BehaviourCompiler failed without engine gem** — `BehaviourCompiler`
132
+ queried the plugin registry directly for the claude engine, which fails
133
+ when no engine gem is installed. Now uses `Backend.for('claude')` which
134
+ checks `BUILTIN_BACKENDS` first, matching the Thor compile task
135
+ resolution path (WP#1491)
136
+
137
+ ## [1.1.0] - 2026-04-01
138
+
139
+ ### Added
140
+
141
+ - **Doctor check: stale ~/.rosett-ai/ directory** — New `stale_home_nncc` diagnostic warns when `.rosett-ai/` exists at `$HOME` level, which causes scope resolution confusion by shadowing XDG-path behaviour files (WP#1123)
142
+ - **Commit hook behaviour** — OpenProject work package integration via branch naming conventions (`<type>/<id>-<subject>`) and overcommit CommitMsg hook for automatic `OP#<id>` injection
143
+ - **XDG auto-migration** — Automatic migration of behaviour files from legacy `~/.claude/conf/` to XDG-compliant `~/.config/rosett-ai/conf/` path
144
+ - **Duplicate rule ID detection** — Compiler now warns when rule IDs collide across behaviour files
145
+ - **Hook command validation** — Shell injection prevention in hook command configuration
146
+ - **Context-aware CLI** — rosett-ai now detects project context via `.rosett-ai/` directory marker, routing content commands (design, behaviour, compile, validate) to project-local configuration (ADR-011)
147
+ - **Command visibility filtering** — Internal commands (build, release, documentation, dbus, desktop) are hidden outside the rosett-ai repository
148
+ - **`rai init --project`** — New flag creates `.rosett-ai/` project structure with `config.yml`, `conf/behaviour/`, and `conf/design/`
149
+ - **`RosettAi::ProjectContext`** — New class for project root detection with `.rosett-ai/` directory walking
150
+ - **Project config schema** — JSON Schema for `.rosett-ai/config.yml` validation
151
+ - **Test Kitchen integration tests** — InSpec profiles for context-aware CLI verification in Docker
152
+ - **Engine .deb packaging** — Reusable `packaging/build-engine-deb.sh` for building per-engine Debian packages (ADR-010)
153
+ - **Wrapper template** — `packaging/wrapper.sh.template` with build-time `@@RUBY_ABI@@`/`@@RUBY_ARCH@@` substitution
154
+ - **Gemfile.dev** — Developer-only Gemfile for cross-repo engine testing (gitignored)
155
+ - **Pluggable plugin architecture** — Contract modules for engine, GUI, and MCP plugins (`lib/rosett_ai/plugins/`)
156
+ - **Dynamic plugin registry** — `RosettAi::Plugins::Registry` with `Gem.find_files` discovery for external gems
157
+ - **Base config compiler** — `RosettAi::Engines::BaseConfigCompiler` template method pattern for engine config compilation
158
+ - **Engine contract** — `RosettAi::Plugins::EngineContract` defining backend, detector, executor, config compiler interfaces
159
+ - **GUI contract** — `RosettAi::Plugins::GuiContract` defining toolkit, application, D-Bus interface methods
160
+ - **MCP contract** — `RosettAi::Plugins::McpContract` defining server, tool, and resource interfaces
161
+ - **Engine-aware CLI** — `--engine` option on `config compile` with cascade lookup (config → autodetect → prompt)
162
+ - **Plugins subcommand** — `bin/raictl engines plugins` shows registered external engine gems
163
+ - **External Claude engine gem** — `rosett-ai-engine-claude` referenced via path in Gemfile (`:engines` group)
164
+ - **Engine stub infrastructure** — `spec/support/stub_engines.rb` provides test doubles for all 11 engine gems, enabling core-only `rspec` runs without engine gems installed
165
+ - **All 10 engine gems** — `rosett-ai-engine-{claude,generic,agents-md,ollama,gpt-neox,goose,aider,cursor,copilot,windsurf}` extracted as separate gems
166
+ - **RosettAiEngine namespace** — Engine gems use `RosettAiEngine::<Name>` to avoid Zeitwerk autoload root conflicts
167
+ - **Self-registration pattern** — Each engine gem registers via `Gem.find_files('rosett_ai_engine/*/register.rb')`
168
+ - **ACME example engine** — `rosett-ai-engine-acme` reference implementation demonstrating how to build a third-party engine plugin
169
+ - **`RAI_ENGINE_PATH`** — Custom engine discovery via colon-separated directory list for development/testing
170
+ - **Embedded gem fallback** — Version-agnostic plugin discovery under `/opt/rosett-ai/embedded/` for `.deb` runtime
171
+ - **`target_profile_path` contract method** — Engines expose their target profile path via `EngineContract`, enabling plugin-aware `TargetProfile.load`
172
+ - **`doc/REFERENCE.md`** — Comprehensive configuration reference (hierarchy, env vars, CLI options, file locations)
173
+ - **YARD Rake task** — `rake yard` generates API documentation to `doc/api/`
174
+ - **Test Kitchen `rai-commands` suite** — 13 InSpec control files for comprehensive CLI command verification
175
+ - **`acme` backend in target schema** — Added to `target_schema.json` enum for completeness
176
+
177
+ ### Fixed
178
+
179
+ - **Duplicate rule ID warnings scoped per-file** — Compiler now only
180
+ warns about duplicate rule IDs within a single behaviour file, not
181
+ across files. Rule IDs are scoped by behaviour name (WP#1130)
182
+ - **Removed dead compiler cache code** — `RosettAi::Cache::CompilerCache`
183
+ and `RosettAi::Cache::Manifest` were implemented but never wired into
184
+ the compilation pipeline. Removed until cache is properly
185
+ integrated (WP#768)
186
+ - **Pre-push hook segfault on GTK4 specs** — Switched pre-push RSpec from full suite to core-only (`RspecCore`) hook that excludes desktop/dbus specs matching CI's `--exclude-pattern`, preventing Ruby segfault in gobject-introspection gem (WP#1122)
187
+ - **Wrapper breaks project context (RC1)** — `.deb` wrapper `cd /opt/rosett-ai/app` made `ProjectContext` resolve to the rosett-ai internal tree instead of the user's project. Now preserves `RAI_ORIGINAL_PWD` before `cd`
188
+ - **Engine discovery fails on ABI mismatch (RC2)** — Embedded Ruby 3.3.0 could not find engine gems installed under 3.3.10 `GEM_PATH`. Added version-agnostic fallback scan of `/opt/rosett-ai/embedded/lib/ruby/gems/*/`
189
+ - **Target profiles not found after extraction (RC3)** — `TargetProfile.load` now checks the plugin registry first (engine's `target_profile_path`) before falling back to file-based lookup
190
+ - **Missing engine produces unhelpful error (RC4)** — `config compile` and `compile` now show actionable install hints (`apt install rosett-ai-engine-<name>`) instead of empty "Available:" lists
191
+ - **`init --project` crash on missing engine** — `run_compile` now rescues `CompileError` gracefully and suggests running `rai compile` after installing an engine
192
+ - **Build failure at install_gems** — Removed engine `path:` references from core Gemfile that broke staging tree bundle install (Issue #build-001)
193
+ - **Embedded Ruby wrong prefix** — Addressed via wrapper template `LD_LIBRARY_PATH`/`RUBYLIB` fix; CI no longer pre-seeds from Docker image's `/usr/local/` Ruby (Issue 002)
194
+ - **Wrapper missing LD_LIBRARY_PATH/RUBYLIB** — Wrapper template now sets `LD_LIBRARY_PATH`, `RUBYLIB`, `GEM_HOME` with correct embedded paths, eliminating chicken-and-egg ruby subprocess (Issue 001)
195
+ - **CI smoke test false positive** — Removed `apt-get install ruby` from smoke test; added prefix and RUNPATH verification assertions (Issue 003)
196
+ - **Bundler env leakage** — Added all `BUNDLER_ORIG_*` variables to `BUNDLER_ENV_VARS` constant for defense-in-depth cleanup
197
+
198
+ ### Breaking
199
+
200
+ - **Global behaviours relocated** — Global behaviour files now live at `~/.config/rosett-ai/conf/` (XDG-compliant) instead of `~/.claude/conf/`. Auto-migration runs on first compile.
201
+
202
+ ### Fixed
203
+
204
+ - **38 audit bugs** — Comprehensive audit campaign fixing remote contamination, XDG migration, worktree issues, and CI divergence (Epic WP#726)
205
+ - **CVE-2026-33946** — Updated mcp gem to patched version
206
+ - **Compile scope coexistence** — Global and project behaviours now merge correctly in project scope (Issue 005, WP#711/712)
207
+ - **Global scope source resolution** — Compile task now uses XDG-compliant path for global behaviour source (WP#943)
208
+
209
+ ### Changed
210
+
211
+ - **Engine registry delegation** — `RosettAi::Engines::Registry` now delegates entirely to `RosettAi::Plugins::Registry` (no hardcoded maps)
212
+ - **Backend resolution** — `RosettAi::Compiler::Backend.for` resolves exclusively via plugin registry
213
+ - **BehaviourCompiler** — Resolves Claude backend via plugin registry instead of direct require
214
+ - **Deprecated aliases** — `RosettAi::Config::*` and `RosettAi::Compiler::Backends::*` are constant aliases to `RosettAiEngine::*`
215
+ - **ARCHITECTURE.md** — Updated to reflect external gem plugin discovery model
216
+ - **CONTRIBUTING.md** — Rewritten engine guide for `RosettAiEngine::` gem-based plugins
217
+ - **ENGINES.md** — Updated diagrams and registry docs for fully external approach
218
+
219
+ ### Removed
220
+
221
+ - **Built-in engine code** — `lib/rosett_ai/engines/{claude,generic,...}/`, `conf/engines/`, `spec/rosett_ai/engines/{...}/` removed from core (now in separate gems)
222
+
223
+ ## [1.0.0] - 2026-03-05
224
+
225
+ Core-only release. Desktop components (D-Bus service, GTK4 app) available
226
+ via the `rosett-ai-gtk4` package. See ADR-009 for rationale.
227
+
228
+ ### Changed
229
+
230
+ - **render() signature** — `render(category, data)` → `render(data)` with `data['category']` set by caller (Finding #10)
231
+ - **Marker standardization** — All engines use `<!-- rosett-ai-{engine}-managed -->` format (Finding #7)
232
+ - **Capability warnings** — Grouped by feature type instead of per-file (Finding #9)
233
+ - **GTK4 engine list** — Dynamic via D-Bus `ListEngines()` instead of hardcoded (Finding #4)
234
+ - **README tagline** — Updated to list all 10 engines (Findings #5+6)
235
+ - **Core-only gemspec** — `ruby-dbus` and `i3ipc` moved to `:desktop` Bundler group (ADR-009)
236
+ - **Zeitwerk conditional ignore** — Desktop/D-Bus modules excluded when `ruby-dbus` unavailable
237
+ - **Desktop CLI graceful degradation** — `dbus` and `desktop` commands print install hint when desktop gems missing
238
+
239
+ ### Added
240
+
241
+ - **Operations design domain** — `operations` added as 13th domain in design schema
242
+ - **Monitoring/observability design doc** — `conf/design/monitoring_observability.yml` (structured telemetry, provider interface)
243
+ - **Usage optimization design doc** — `conf/design/usage_optimization.yml` (startup targets, compile caching, profiling)
244
+ - **SimpleCov thresholds** — Minimum 88% overall, 25% per file (baseline enforcement)
245
+ - **Test fixtures** — Design doc fixtures (valid, invalid, operations), config fixtures (minimal, full)
246
+ - **Mutant expanded subjects** — `RosettAi::Engines*` and `RosettAi::Quorum*` added to mutation testing
247
+ - **CI validation includes** — `design-docs.yml` and `tooling-docs.yml` now included in pipeline
248
+ - **Core-only rspec CI job** — `test:rspec:core` excluding desktop/dbus specs
249
+ - **Package smoke test** — `build:package:smoke_test` installs .deb and verifies CLI
250
+ - **ADR-009** — Core-only v1.0.0 release decision record
251
+ - **Security scan hardening** — Explicit `allow_failure: false` on all 4 security scan CI jobs
252
+ - **AI provenance** — `doc/AI_PROVENANCE.md` documenting AI-assisted development practices
253
+ - **Cursor engine** — `lib/rosett_ai/engines/cursor/` backend + detector for Cursor by Anysphere (Engine Phase 4)
254
+ - **Copilot engine** — `lib/rosett_ai/engines/copilot/` backend + detector for GitHub Copilot (Engine Phase 4)
255
+ - **Windsurf engine** — `lib/rosett_ai/engines/windsurf/` backend + detector for Windsurf by Codeium (Engine Phase 4)
256
+ - **Goose executor** — `lib/rosett_ai/engines/goose/executor.rb` CLI subprocess executor via `Open3.capture3` (Engine Phase 4)
257
+ - **Aider executor** — `lib/rosett_ai/engines/aider/executor.rb` CLI subprocess executor via `Open3.capture3` (Engine Phase 4)
258
+ - **CLI executor type** — `api_type: cli` in engine manifests for subprocess-based executors (Engine Phase 4)
259
+ - **ExecutorResolver CLI support** — `binary:` kwarg branch for CLI-type engine executors
260
+ - **Goose engine** — `lib/rosett_ai/engines/goose/` backend for Goose by Block (Engine Phase 3)
261
+ - **Aider engine** — `lib/rosett_ai/engines/aider/` backend for Aider (Engine Phase 3)
262
+ - **Ollama/GPT-NeoX target profiles** — `conf/engines/{ollama,gpt_neox}/target.yml` for compilation (Finding #1)
263
+ - **D-Bus ListEngines method** — Returns `[name, display_name]` tuples from Registry (Finding #4)
264
+ - **Executor API key guard** — Raises `AdoptError` with `--local` hint when API key is nil (Finding #2)
265
+ - **Bullet-list local analysis** — `LocalAnalysisCollector` parses bullet rules from AGENTS.md format (Finding #3)
266
+ - **check_summarized** — `CapabilityChecker` groups warnings by feature type (Finding #9)
267
+
268
+ ### Fixed
269
+
270
+ - `RuleAdopter::GENERATED_MARKER` updated to match new marker format
271
+ - `BACKENDS` hash includes all 10 engines (was missing aider, goose, gpt_neox, ollama, cursor, copilot, windsurf)
272
+ - `target_schema.json` backend enum includes all 10 engines
273
+ - `engine_manifest_schema.json` api_type enum includes `cli` for subprocess executors
274
+
275
+ ### Added
276
+
277
+ - **Quorum module** (Backfill — multi-engine adopt analysis)
278
+ - `lib/rosett_ai/quorum/dispatcher.rb` — Thread-based parallel dispatch to N engines
279
+ - `lib/rosett_ai/quorum/collector.rb` — normalize per-engine responses to common format
280
+ - `lib/rosett_ai/quorum/comparator.rb` — aggregate cross-engine findings, promote consensus
281
+ - `lib/rosett_ai/quorum/strategies/adopt.rb` — adopt-specific orchestration
282
+ - `--quorum` flag on `bin/raictl adopt --api` for multi-engine analysis
283
+
284
+ - **Capability checker** (Backfill — compile-time capability gap warnings)
285
+ - `lib/rosett_ai/compiler/capability_checker.rb` — check source YAML vs engine manifest
286
+ - Warns when sensitive content targets engines without `sensitive_filtering`
287
+ - `--strict` mode raises `CompileError` on capability gaps
288
+ - All 5 engine manifests updated with `sensitive_filtering` and `rule_metadata` keys
289
+
290
+ - **Executor normalization** (Backfill — uniform analyze interface)
291
+ - `lib/rosett_ai/adopter/executor_resolver.rb` — manifest-driven executor kwargs
292
+ - `analyze(prompt)` method added to Ollama and GPT-NeoX executors
293
+ - All executors return `{findings, overall_status, summary}` JSON contract
294
+
295
+ - **D-Bus stop command** (Backfill — `bin/raictl dbus stop`)
296
+ - `Shutdown` method on `be.neatnerds.rosettai.Manager` interface
297
+ - `bin/raictl dbus stop` sends shutdown signal via session bus
298
+
299
+ - **StatusNotifierItem** (Backfill — system tray icon)
300
+ - `lib/rosett_ai/dbus/status_notifier_interface.rb` — `org.kde.StatusNotifierItem`
301
+ - Properties: Id, Category, Status, Title, IconName, ToolTip
302
+ - Signals: NewStatus, NewTitle
303
+ - Graceful degradation if no SNI host available
304
+
305
+ - **GTK4 preference callbacks** (Backfill — instant-apply via D-Bus)
306
+ - Preference changes applied immediately via `DbusClient#set_config`
307
+ - `SetConfig(key, value)` method on Manager interface
308
+ - `RaiConfig#update` for persistent config changes with validation
309
+ - Callbacks: verbose, strict, engine selection, auto-switch
310
+
311
+ - **GTK4 application hardening** (Desktop Phase 2b — crash-proof architecture)
312
+ - `safe_action()` wrapper pattern — all event handlers wrapped, app never crashes
313
+ - `safe_callback()` wrapper for preferences dialog callbacks
314
+ - `lib/rosett_ai/desktop/gui_logger.rb` — structured JSON Lines logging for GUI debugging
315
+ - `RAI_GUI_LOG=1` environment variable enables logging to stderr
316
+ - `RAI_GUI_LOG_FILE` and `RAI_GUI_LOG_LEVEL` for file output and level control
317
+ - D-Bus client returns safe defaults (`SAFE_STATUS`, `SAFE_FOCUS`, `SAFE_COMPILE_RESULT`)
318
+ - `defined?` checks for libadwaita version compatibility (PreferencesDialog vs PreferencesWindow)
319
+ - Error dialogs via `Adw::MessageDialog` instead of crashes
320
+ - Thread-safe logging with `Mutex`
321
+
322
+ - **Ollama and GPT-NeoX engines** (Engine Phase 2 — local quorum capability)
323
+ - `lib/rosett_ai/engines/ollama/` — backend, detector, executor for Ollama
324
+ - `lib/rosett_ai/engines/gpt_neox/` — backend, detector, executor for GPT-NeoX on vLLM
325
+ - `conf/engines/ollama/manifest.yml` — Ollama capability declaration
326
+ - `conf/engines/gpt_neox/manifest.yml` — GPT-NeoX capability declaration
327
+ - Ollama detection: binary in PATH + localhost:11434
328
+ - GPT-NeoX detection: `VLLM_ENDPOINT` env var or config
329
+
330
+ - **GTK4/Adwaita desktop application** (Desktop Phase 2)
331
+ - `lib/rosett_ai/desktop/gtk4_app.rb` — main GTK4 app following GNOME HIG
332
+ - `lib/rosett_ai/desktop/gtk4_preferences.rb` — preferences dialog with instant-apply
333
+ - `lib/rosett_ai/desktop/dbus_client.rb` — D-Bus client for GUI apps
334
+ - `bin/raictl desktop gtk4` CLI subcommand
335
+ - Service status display, compile rules action, preferences pages
336
+ - Adwaita widgets: HeaderBar, ToastOverlay, PreferencesGroup, ActionRow, SwitchRow, ComboRow
337
+ - About window with license, version, and links
338
+
339
+ - **D-Bus service foundation** (Desktop Phase 1)
340
+ - `lib/rosett_ai/dbus/service.rb` — `be.neatnerds.rosettai` session bus service
341
+ - `lib/rosett_ai/dbus/manager_interface.rb` — Compile, SwitchContext, GetStatus methods
342
+ - `lib/rosett_ai/dbus/focus_monitor_interface.rb` — GetCurrentFocus, FocusChanged signal
343
+ - `lib/rosett_ai/dbus/compositor_detector.rb` — GNOME, KDE, i3, Hyprland, X11 detection
344
+ - `lib/rosett_ai/dbus/focus_adapters/` — 5 compositor-specific focus adapters
345
+ - `bin/raictl dbus start` CLI subcommand
346
+
347
+ - **AGENTS.md engine** (Engine Phase 1 — first vendor-neutral engine)
348
+ - `lib/rosett_ai/engines/agents_md/backend.rb` — compiles behaviour YAML to AGENTS.md format
349
+ - `lib/rosett_ai/engines/agents_md/detector.rb` — detects existing AGENTS.md in project root
350
+ - `conf/engines/agents_md/manifest.yml` — engine capability declaration
351
+ - `conf/engines/agents_md/target.yml` — target profile for AGENTS.md output
352
+ - `--engine agents_md` flag on `bin/raictl compile` for AGENTS.md output
353
+ - Bullet-list rule rendering, priority-sorted, no rule IDs or metadata comments
354
+ - "Instructions" section header (idiomatic for AGENTS.md format)
355
+ - Distinct managed marker (`<!-- agents_md-managed -->`) for file ownership detection
356
+
357
+ - **XDG config, engine detection, and CLI flags** (Phase 0c — engine-agnostic architecture)
358
+ - `lib/rosett_ai/rai_config.rb` — runtime config loader (`~/.config/rosett-ai/config.yml`)
359
+ - `conf/schemas/rai_config_schema.json` — rai config validation
360
+ - `conf/schemas/engine_manifest_schema.json` — engine manifest validation
361
+ - `lib/rosett_ai/engines/detector.rb` — base engine detector (manifest-driven)
362
+ - `lib/rosett_ai/engines/claude/detector.rb` — Claude engine detector
363
+ - `lib/rosett_ai/thor/tasks/engines.rb` — `engines list|detect|status` CLI subcommand
364
+ - `lib/rosett_ai/init/config_file_writer.rb` — default config writer for `rai init`
365
+ - `--engine` flag on `bin/raictl compile` (replaces `--target`)
366
+ - `--strict` flag on `bin/raictl compile` (warnings as errors)
367
+ - `--api` flag on `bin/raictl adopt` (opt-in remote analysis)
368
+ - Engine manifest validation in Registry via `json_schemer`
369
+ - Engine detection during `rai init --global`
370
+ - `RosettAi.rai_config` singleton accessor with `reset_config!` support
371
+
372
+ ### Changed
373
+
374
+ - `bin/raictl adopt` defaults to local-only analysis (was remote)
375
+ - `--target` flag deprecated in favour of `--engine` (emits warning)
376
+ - `RuleAdopter` accepts `engine:` parameter for dynamic executor resolution
377
+ - `conf/engines/claude/manifest.yml` sets `detector: true`
378
+
379
+ - **Engine directory structure** (Phase 0b — engine-agnostic architecture)
380
+ - `lib/rosett_ai/engines/claude/` — Backend, ConfigCompiler, KeyMap, ScopeRouter,
381
+ DomainTransformer, Executor (extracted from RuleAdopter)
382
+ - `lib/rosett_ai/engines/generic/` — Backend
383
+ - `lib/rosett_ai/engines/registry.rb` — static engine discovery
384
+ - `conf/engines/claude/manifest.yml` — capability declaration
385
+ - `conf/engines/generic/manifest.yml` — capability declaration
386
+ - Backward-compatible aliases for all moved classes (deprecated, remove in v1.1.0)
387
+
388
+ ### Changed
389
+
390
+ - Renamed from "NeatNerds Claude Companion" to "Rosett-AI"
391
+ - Version bump to 1.0.0 marking engine-agnostic architecture pivot (ADR-007)
392
+ - CLI descriptions updated to reflect multi-engine support
393
+ - Gemspec description reworded for engine-agnostic positioning
394
+ - Moved `anthropic` gem from core gemspec to Gemfile `:engines` group (lazy-loaded)
395
+ - Moved `conf/claude_code/*.yml` to `conf/engines/claude/config/`
396
+ - Moved `conf/targets/*.yml` to `conf/engines/<name>/target.yml`
397
+ - Moved `conf/schemas/claude_code_config_schema.json` to `conf/engines/claude/schemas/config_schema.json`
398
+ - `TargetProfile.load` searches `conf/engines/<name>/target.yml` first, falls back to legacy path
399
+ - `PathResolver#claude_code_config_dir` points to `conf/engines/claude/config`
400
+ - `RuleAdopter#analyze` delegates to `RosettAi::Engines::Claude::Executor`
401
+ - `Documentation::Translator` lazy-loads `anthropic` gem inside `call_api`
402
+
403
+ ### Added
404
+
405
+ - **Claude Code configuration compiler** (P2 — claude_code_configuration.yml, all 17 acceptance criteria)
406
+ - `RosettAi::Config::Compiler` — YAML-to-JSON compilation pipeline for Claude Code settings
407
+ - `RosettAi::Config::KeyMap` — explicit snake_case→camelCase mapping table (not algorithmic)
408
+ - `RosettAi::Config::ScopeRouter` — scope-to-target-path routing (managed/user/project/local)
409
+ - `RosettAi::Config::SecretResolver` — deterministic `${secret:backend:key}` parser (NO regex)
410
+ - `RosettAi::Config::CompileResult` — structured result value object per scope compilation
411
+ - `conf/schemas/claude_code_config_schema.json` — JSON Schema draft 2020-12 with scope-conditional validation
412
+ - `conf/claude_code/{managed,user,project,local}.yml` — four populated scope configuration files
413
+ - `bin/raictl config compile` — new CLI subcommand with `--verbose`, `--simulate`, `--scope` options
414
+ - Secret backends: `env` (ENV.fetch), `file` (0600 perms, 64 KiB cap), `path` (traversal rejection)
415
+ - Version compatibility checking via `Gem::Requirement` (advisory warnings only)
416
+ - Context env-target fields compile to `env` key within JSON (merged with explicit env entries)
417
+ - Network/API validate-only fields emit warnings when env vars are unset
418
+ - Idempotent compilation — no unnecessary writes when source is unchanged
419
+ - PathResolver extended with 5 new methods for settings target paths
420
+ - **Architecture packaging declarations** (P2 — architecture.yml criterion 8)
421
+ - `VariantConfig` loader validating `conf/packaging/<variant>.yml` against JSON Schema
422
+ - Dynamic `"current"` version keyword resolving to `RosettAi::VERSION` at load time
423
+ - `conf/packaging/core.yml`, `gtk4.yml`, `qt6.yml` variant configurations
424
+ - `conf/schemas/packaging_schema.json` with name pattern and version constraint validation
425
+ - `--variant` option on `bin/raictl build package` (default: `core`)
426
+ - Non-core variants fail early if adapter file doesn't exist yet (P3)
427
+ - **Compiler multi-target pipeline** (P2 — compiler.yml, all 9 acceptance criteria)
428
+ - Strategy-pattern `CompilationPipeline` with pluggable `Backend` instances
429
+ - `ClaudeBackend` — Claude Code markdown with HTML metadata and priority annotations
430
+ - `GenericBackend` — plain markdown without Claude-specific formatting
431
+ - `CompiledOutput` Struct value object replacing raw Hash returns
432
+ - `TargetProfile` loader validating `conf/targets/<name>.yml` against JSON Schema
433
+ - `LocaleCompiler` compiling ruby-i18n YAML to gettext (.pot/.po) and Qt Linguist (.ts)
434
+ - `--target claude|generic` flag for target selection on `bin/raictl compile`
435
+ - `--locales` flag for locale compilation on `bin/raictl compile`
436
+ - `conf/targets/claude.yml` and `conf/targets/generic.yml` target profiles
437
+ - `conf/schemas/target_schema.json` with strict enum validation
438
+ - `locales/en.yml` English locale source file
439
+ - Performance benchmark: 100 files compile in ~0.4s (criterion: < 5s)
440
+ - **PathResolver** (ADR-002) — centralised path resolution for all Claude Code
441
+ and rosett-ai directories, replacing hardcoded paths in 6 library files
442
+ - `RosettAi::PathResolver` class with instance methods (`Pathname` return type)
443
+ - `RosettAi.paths` module accessor with memoisation and reset support
444
+ - XDG-compliant `rai_config_dir` respecting `XDG_CONFIG_HOME`
445
+ - `engine:` keyword on constructor for future ADR-006 multi-engine support
446
+ - **Testing infrastructure** (P1 — testing.yml, all 9 acceptance criteria)
447
+ - Mutation testing via **mutant-rspec** with `.mutant.yml` (`usage: opensource`)
448
+ - Property-based testing via **Rantly** for security-critical code (YamlLoader)
449
+ - **factory_bot** factories for Behaviour and Rule domain objects
450
+ - Shared examples defining UI interface contract for future implementations
451
+ - Test fixtures: valid, invalid, malicious (YAML bomb, ANSI injection), and Unicode (NFC/NFD/CJK/RTL)
452
+ - AI-generated test review checklist (11-point, `doc/ai_test_review_checklist.md`)
453
+ - Mutant CI job on merge requests (`test:mutant`), blocks merge on score drop
454
+ - Debian packaging via **fpm + ruby-build**, replacing Omnibus
455
+ - `bin/raictl build package` produces self-contained `.deb` with embedded Ruby
456
+ - Proper APT lifecycle: postinst (symlink + conffile), prerm, postrm (purge)
457
+ - Multi-architecture support (amd64, arm64)
458
+ - `bin/raictl init` command with `--global` / `--local` / `--no-compile` flags
459
+ - `bin/raictl tooling validate-ci-yaml` for GitLab CI YAML validation
460
+ - GitLab CI retry policy (max 2) for transient infrastructure failures
461
+ - i18n/locale support scaffolding in CI pipeline
462
+ - **Release management** (P5 — release_management.yml, all 10 acceptance criteria)
463
+ - `bin/raictl release prepare LEVEL` — bumps version, runs 5 verification gates
464
+ (rspec, rubocop, reek, bundler-audit, ruby-audit), generates CHANGELOG, creates release commit
465
+ - `bin/raictl release tag` — creates annotated git tag with CHANGELOG excerpt
466
+ - `bin/raictl release status` — shows version, last tag, unreleased commit count
467
+ - `cliff.toml` — git-cliff conventional commit to Keep a Changelog mapping
468
+ - GitLab CI `release:publish` job creates GitLab release on `vX.Y.Z` tag push
469
+ - **Documentation tooling** (P5 — documentation.yml, all 10 acceptance criteria)
470
+ - `doc/man/rai.1.ronn` — complete ronn-ng man page source (NAME through LICENSE)
471
+ - `rake man:build` generates `man/man1/rai.1` from ronn source
472
+ - Build task `:install_man` stage gzips and installs man page to `/usr/share/man/man1/`
473
+ - `.yardopts` for YARD API documentation generation
474
+ - `INSTALL.md` — end-user installation guide (.deb, APT repo, verification, uninstall)
475
+ - CI `code_quality:doc_consistency` job verifies Ruby version and doc file presence
476
+ - `ronn-ng` (~> 0.10) and `yard` (~> 0.9) added as development dependencies
477
+ - `CONTRIBUTING.md` — developer expansion guide covering how to add translations,
478
+ AI engines, configuration sections, CLI subcommands, design documents, UI adapters, and CI jobs
479
+
480
+ ### Changed
481
+
482
+ - `claude_code_configuration.yml` design document status changed from `draft` to `approved`
483
+ (all 17 acceptance criteria met; completes P2 tier)
484
+ - `architecture.yml` design document status changed from `draft` to `approved`
485
+ (all 8 acceptance criteria met; unblocks P3 work)
486
+ - Build task uses `VariantConfig` for package name, description, and dependencies
487
+ instead of hardcoded values (backward compatible via `--variant core` default)
488
+ - `BehaviourCompiler` refactored to thin wrapper around `CompilationPipeline`,
489
+ preserving original 3-argument constructor for backward compatibility
490
+ - Compile Thor task uses `CompilationPipeline` with target-aware backend
491
+ instead of hardcoded `BehaviourCompiler`
492
+ - `compiler.yml` design document status changed from `draft` to `approved`
493
+ - `SecretsResolver` no longer owns path constants (`SECRETS_DIR`, `SECRETS_FILE`
494
+ removed); delegates to `RosettAi.paths` for all path resolution
495
+ - `BehaviourCompiler` lockfile output uses `RosettAi.paths.rules_display_path`
496
+ instead of hardcoded tilde strings
497
+ - Init, Backup, Compile, Adopt specs use `instance_double(RosettAi::PathResolver)`
498
+ instead of `stub_const` or `allow(File).to receive(:expand_path)` stubs
499
+ - Mutant coverage raised from **80%** to **97.83%** (543/555 killed, 12 equivalent survivors)
500
+ - SimpleCov thresholds raised from 50/40 to **90/80** (overall/per-file)
501
+ - SimpleCov coverage groups reorganized: Compilers, Validators, Adopter, Backup, Thor Tasks
502
+ - Added `rubocop-factory_bot` plugin to `.rubocop.yml`
503
+ - Replaced Omnibus (11 config files, 30-60 min builds, 100MB+ packages) with fpm (~650 LOC, <5 min builds, ~38MB packages)
504
+ - Rewrote `lib/rosett_ai/thor/tasks/init.rb` to delegate to `DirectoryBuilder` and `FileCopier`
505
+ - Simplified `lib/rosett_ai/thor/tasks/tooling.rb` from ~420 LOC to a focused CI validator
506
+ - Refactored build task: extracted `BuildContext` Struct for mutable state, `status_text` helper
507
+ - CI build job renamed from `omnibus.yml` to `package.yml`
508
+
509
+ ### Removed
510
+
511
+ - Entire `omnibus/` directory (Gemfile, Rakefile, config/, package-scripts/)
512
+ - Orphaned `lib/rosett_ai/tooling/` module (detector, display_helpers, package_manager, settings_manager, tool_registry)
513
+ - Corresponding specs for removed tooling code
514
+
515
+ ### Fixed
516
+
517
+ - Thor `[WARNING] Attempted to create command` messages during test runs
518
+ - fpm `--config-files` packaging error (conffile now ships at `/etc/rosett-ai/`)
519
+ - Gitleaks false positives on test fixtures and CI variables
data/CLAUDE.md ADDED
@@ -0,0 +1,141 @@
1
+ # Rosett-AI
2
+
3
+ ## Project Overview
4
+
5
+ | Field | Value |
6
+ |-------|-------|
7
+ | Gem name | rosett-ai |
8
+ | CLI | raictl (bin/raictl) |
9
+ | Purpose | Author AI assistant rules once, compile to Claude Code, Cursor, AGENTS.md, and more |
10
+ | License | GPL-3.0-only |
11
+ | Ruby | 3.3.10 (rbenv) |
12
+ | Framework | Thor (CLI), Zeitwerk (autoloading) |
13
+
14
+ ## CLI Usage
15
+
16
+ ```bash
17
+ # Core workflow
18
+ raictl compile # Compile rules to ~/.claude/rules/
19
+ raictl compile --verbose # Compile with detailed output
20
+ raictl compile --simulate --verbose # Dry run with diffs
21
+ raictl compile --vendor # Compile and write lockfile
22
+ raictl compile --engine generic # Compile for a specific engine
23
+ raictl validate # Validate all config files
24
+
25
+ # Behaviour management
26
+ raictl behaviour list # List behaviour files
27
+ raictl behaviour show NAME # Show specific behaviour
28
+ raictl behaviour validate [NAME] # Validate behaviour file(s)
29
+ raictl behaviour manage add NAME # Create new behaviour
30
+
31
+ # Design documents
32
+ raictl design list # List all design documents
33
+ raictl design show NAME # Show design document details
34
+ raictl design validate [NAME] # Validate design document(s)
35
+
36
+ # Project lifecycle
37
+ raictl init --global # Set up global ~/.claude/ structure
38
+ raictl init --local # Set up project-local .claude/ structure
39
+ raictl init --project # Set up .rosett-ai/ project structure
40
+ raictl doctor # Run diagnostic checks
41
+ raictl project status # Show project status
42
+
43
+ # Configuration management
44
+ raictl config compile # Compile YAML scopes to JSON settings
45
+ raictl migrate # Migrate legacy .nncc/ and ~/.config/nncc/ paths
46
+
47
+ # Compliance and provenance
48
+ raictl comply # Run all compliance checks (CRA, license, SPDX)
49
+ raictl provenance add # Record AI contribution for HEAD commit
50
+ raictl provenance validate # Validate provenance entries
51
+
52
+ # Engines and plugins
53
+ raictl engines list # List all known engines
54
+ raictl engines detect # Detect installed engines
55
+ raictl plugins list engine # List installed engine plugins
56
+
57
+ # Other
58
+ raictl hooks install # Install git hooks via overcommit
59
+ raictl mcp serve # Start MCP JSON-RPC server
60
+ raictl completion install # Install shell completions
61
+ raictl backup --global # Back up ~/.claude/ structure
62
+ ```
63
+
64
+ ## Directory Structure
65
+
66
+ ```text
67
+ ├── bin/raictl # CLI executable (symlinked as rai)
68
+ ├── lib/rosett_ai/ # Ruby library code (Zeitwerk-managed)
69
+ │ ├── thor/ # CLI command definitions
70
+ │ │ ├── cli.rb # Main Thor CLI class
71
+ │ │ └── tasks/ # Individual command implementations
72
+ │ ├── compiler/ # Rule compilation pipeline
73
+ │ ├── engines/ # Engine plugin system
74
+ │ ├── doctor/ # Diagnostic checks
75
+ │ ├── git_hooks/ # Git hook management
76
+ │ ├── migrate/ # Legacy config migration
77
+ │ └── version.rb # Version constant
78
+ ├── conf/
79
+ │ ├── behaviour/ # Behaviour YAML files (rules source)
80
+ │ ├── design/ # Design documents (YAML)
81
+ │ ├── schemas/ # JSON Schema validation files
82
+ │ ├── targets/ # Compiler target profiles
83
+ │ ├── packaging/ # Package variant configs (core, gtk4)
84
+ │ └── claude_code/ # Claude Code scope configs
85
+ ├── spec/ # RSpec test suite
86
+ ├── packaging/ # Debian packaging scripts
87
+ ├── locales/ # i18n locale files
88
+ ├── doc/man/ # Man page source (ronn-ng)
89
+ └── rosett-ai.gemspec # Gem specification
90
+ ```
91
+
92
+ ## Development
93
+
94
+ ```bash
95
+ bundle install # Install dependencies
96
+ overcommit --install # Install git hooks
97
+ bundle exec rspec # Run test suite
98
+ bundle exec rubocop # Run linter
99
+ bundle exec reek # Run code smell detector
100
+ bundle exec bundler-audit check # Security audit
101
+ ```
102
+
103
+ ## Architecture
104
+
105
+ - **Engine plugin system**: Engines (claude, generic, agents_md) define how rules compile to target formats. Engines are separate gems discovered via `RAI_ENGINE_PATH` or standard gem paths.
106
+ - **Scope hierarchy**: Configuration applies in order: global (`~/.claude/`) → local (`.claude/`) → project (`.rosett-ai/`). Later scopes override earlier ones.
107
+ - **XDG config**: Global config lives at `~/.config/rosett-ai/`
108
+ - **Compilation pipeline**: Behaviour YAML → rule extraction → target-specific rendering → output files
109
+ - **Design doc system**: `conf/design/*.yml` records architectural decisions with question/decision/rationale structure
110
+
111
+ ## Testing
112
+
113
+ - RSpec with SimpleCov coverage tracking
114
+ - Pre-commit hooks: RuboCop, Reek
115
+ - Pre-push hooks: RSpec, bundler-audit
116
+ - CI: GitLab CI with lint, test, build, and mutation stages
117
+
118
+ ## Packaging (Developer Rake Tasks)
119
+
120
+ Build, release, and packaging commands are developer-only and available via Rake:
121
+
122
+ ```bash
123
+ rake build:package # Build core .deb package
124
+ rake build:package[gtk4] # Build GTK4 variant
125
+ rake build:engine # Build engine plugin .deb
126
+ rake release:prepare[minor] # Bump version, changelog, release commit
127
+ rake release:tag # Create annotated git tag
128
+ rake release:status # Show version, last tag, unreleased commits
129
+ rake readme:update # Update README version/test/engine numbers
130
+ ```
131
+
132
+ - `.deb` packages include hermetic Ruby at `/opt/rosett-ai/`
133
+ - Variants: core (CLI-only), gtk4 (with desktop GUI)
134
+ - Wrapper script at `/usr/bin/raictl` sets `BUNDLE_PATH` and `BUNDLE_DEPLOYMENT`
135
+
136
+ ## Key Conventions
137
+
138
+ - Conventional Commits for all commit messages
139
+ - Language purity: Ruby only for all scripting
140
+ - SPDX license headers on all source files
141
+ - GPL-3.0-only license