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.
- checksums.yaml +7 -0
- data/.ai-provenance.yml +119 -0
- data/.debride_whitelist +186 -0
- data/.fasterer.yml +29 -0
- data/.mdl_style.rb +10 -0
- data/.mdlrc +3 -0
- data/.mutant.yml +49 -0
- data/.namespace-allowlist +42 -0
- data/.reek.yml +1040 -0
- data/.rosett-ai/config.yml +3 -0
- data/.rspec +5 -0
- data/.rubocop.yml +380 -0
- data/.ruby-version +1 -0
- data/.yamllint +51 -0
- data/.yardopts +12 -0
- data/AI-DISCLOSURE.md +48 -0
- data/CHANGELOG.md +519 -0
- data/CLAUDE.md +141 -0
- data/CONTRIBUTING.md +734 -0
- data/INSTALL.md +154 -0
- data/LICENSE +674 -0
- data/LICENSE.md +675 -0
- data/QUICKSTART.md +73 -0
- data/README.md +366 -0
- data/Rakefile +200 -0
- data/SECURITY.md +114 -0
- data/bin/rai +1 -0
- data/cliff.toml +52 -0
- data/conf/adopt_redactions.yml +8 -0
- data/conf/behaviour/.gitkeep +0 -0
- data/conf/compliance/cra_rules.yml +25 -0
- data/conf/compliance/license_rules.yml +20 -0
- data/conf/design/aaif_alignment.yml +181 -0
- data/conf/design/ab_testing.yml +172 -0
- data/conf/design/accessibility.yml +84 -0
- data/conf/design/ai_authorship.yml +210 -0
- data/conf/design/ai_provenance.yml +224 -0
- data/conf/design/ai_tool_configuration.yml +207 -0
- data/conf/design/architecture.yml +139 -0
- data/conf/design/autocompletion.yml +115 -0
- data/conf/design/backward_compatibility.yml +112 -0
- data/conf/design/behaviour_composition.yml +246 -0
- data/conf/design/build_rake_extraction.yml +57 -0
- data/conf/design/ci_pipeline.yml +100 -0
- data/conf/design/claude_code_configuration.yml +157 -0
- data/conf/design/compiler.yml +128 -0
- data/conf/design/comply.yml +153 -0
- data/conf/design/content_packs.yml +84 -0
- data/conf/design/desktop_integration.yml +289 -0
- data/conf/design/distribution.yml +216 -0
- data/conf/design/doctor.yml +184 -0
- data/conf/design/documentation.yml +152 -0
- data/conf/design/engine_architecture.yml +257 -0
- data/conf/design/error_handling.yml +103 -0
- data/conf/design/feature_flags.yml +142 -0
- data/conf/design/git_hooks.yml +165 -0
- data/conf/design/gui_plugins.yml +475 -0
- data/conf/design/i18n.yml +84 -0
- data/conf/design/integration_testing.yml +56 -0
- data/conf/design/licensing_system.yml +88 -0
- data/conf/design/lifecycle_management.yml +208 -0
- data/conf/design/mcp_integration.yml +207 -0
- data/conf/design/mcp_settings.yml +126 -0
- data/conf/design/migration.yml +56 -0
- data/conf/design/monitoring_observability.yml +194 -0
- data/conf/design/namespace_cleanup.yml +145 -0
- data/conf/design/plugin_test_segregation.yml +145 -0
- data/conf/design/policy_management.yml +229 -0
- data/conf/design/project_management.yml +183 -0
- data/conf/design/rai_mcp_asset_discovery.yml +164 -0
- data/conf/design/rai_mcp_server.yml +605 -0
- data/conf/design/release_management.yml +117 -0
- data/conf/design/retrofit.yml +199 -0
- data/conf/design/retrospective_analyzer.yml +79 -0
- data/conf/design/scope_hierarchy.yml +352 -0
- data/conf/design/security.yml +115 -0
- data/conf/design/session_retrospective.yml +85 -0
- data/conf/design/smart_ui_feedback.yml +89 -0
- data/conf/design/structured_logging.yml +148 -0
- data/conf/design/styles.yml +123 -0
- data/conf/design/test_peer_review.yml +89 -0
- data/conf/design/testing.yml +136 -0
- data/conf/design/threat_model.yml +108 -0
- data/conf/design/ui_framework.yml +111 -0
- data/conf/design/usage_optimization.yml +122 -0
- data/conf/design/version_management.yml +60 -0
- data/conf/design/workflow.yml +227 -0
- data/conf/mcp/server_defaults.yml +42 -0
- data/conf/mcp/trust.yml +21 -0
- data/conf/packaging/core.yml +12 -0
- data/conf/packaging/gtk4.yml +11 -0
- data/conf/packaging/qt6.yml +11 -0
- data/conf/policy/default_deny_list.yml +197 -0
- data/conf/review/cli-command-audit.yml +857 -0
- data/conf/review/design-docs.yml +1064 -0
- data/conf/review/design-questionnaire.yml +153 -0
- data/conf/review/questionnaire.yml +146 -0
- data/conf/review/rosett-ai-core.yml +2919 -0
- data/conf/schemas/ai_config_schema.json +73 -0
- data/conf/schemas/behaviour_schema.json +132 -0
- data/conf/schemas/compliance_rule_schema.json +63 -0
- data/conf/schemas/content_pack_manifest_schema.json +51 -0
- data/conf/schemas/design_schema.json +210 -0
- data/conf/schemas/engine_manifest_schema.json +144 -0
- data/conf/schemas/lockfile_schema.json +74 -0
- data/conf/schemas/mcp_server_schema.json +48 -0
- data/conf/schemas/packaging_schema.json +70 -0
- data/conf/schemas/policy_schema.json +85 -0
- data/conf/schemas/provenance_schema.json +84 -0
- data/conf/schemas/rai_config_schema.json +56 -0
- data/conf/schemas/rai_project_schema.json +20 -0
- data/conf/schemas/scope_hierarchy_schema.json +49 -0
- data/conf/schemas/target_schema.json +67 -0
- data/conf/schemas/tooling_schema.json +65 -0
- data/conf/schemas/workflow_schema.json +112 -0
- data/conf/targets/agents_md.yml +17 -0
- data/conf/targets/claude.yml +12 -0
- data/conf/tooling/tools.yml +58 -0
- data/dist/rosett-ai-mcp.service +48 -0
- data/dist/rosett-ai-mcp.yml.default +45 -0
- data/doc/AAIF_POSITIONING.md +58 -0
- data/doc/ADOPT.md +224 -0
- data/doc/AI_PROVENANCE.md +139 -0
- data/doc/ARCHITECTURE.md +920 -0
- data/doc/BEHAVIOUR.md +409 -0
- data/doc/BUILD.md +138 -0
- data/doc/CI_CD_RECIPES.md +171 -0
- data/doc/CLAUDE_SESSIONS_MOVED.md +16 -0
- data/doc/COMMAND_ANALYSIS.md +229 -0
- data/doc/CONFIGURATION.md +281 -0
- data/doc/DESIGN_AUDIT.md +235 -0
- data/doc/DESIGN_PEER_REVIEW.md +771 -0
- data/doc/DESKTOP.md +447 -0
- data/doc/ENGINES.md +567 -0
- data/doc/ENGINE_DEVELOPMENT_GUIDE.md +417 -0
- data/doc/FEATURE_AUDIT.md +218 -0
- data/doc/IMPLEMENTATION_PLAN.md +669 -0
- data/doc/INCIDENT_REPORT_2026-02-02.md +251 -0
- data/doc/MIGRATION_GUIDE.md +88 -0
- data/doc/PACKAGING.md +232 -0
- data/doc/PROJECT_DASHBOARD.md +153 -0
- data/doc/PULP_DEPLOYMENT.md +164 -0
- data/doc/QUALITY_FIX_SUMMARY.md +110 -0
- data/doc/QUICK_START.md +162 -0
- data/doc/REEK_CONFIGURATION.md +166 -0
- data/doc/REFERENCE.md +253 -0
- data/doc/REFERENCES.md +324 -0
- data/doc/SECURITY_REVIEW_CHECKLIST.md +72 -0
- data/doc/SESSION_2026-02-28_GTK4_HARDENING.md +359 -0
- data/doc/SETUP.md +202 -0
- data/doc/TEST_PEER_REVIEW.md +152 -0
- data/doc/THREAT_MODEL.md +230 -0
- data/doc/USAGE.md +545 -0
- data/doc/USER_MANUAL.md +585 -0
- data/doc/ai_test_review_checklist.md +110 -0
- data/doc/changes/2026-02-18-packaging-fpm.md +155 -0
- data/doc/changes/2026-02-19-testing-infrastructure.md +221 -0
- data/doc/changes/2026-02-20-security-implementation.md +281 -0
- data/doc/changes/2026-02-20-styles-implementation.md +220 -0
- data/doc/changes/2026-02-21-architecture-completion.md +95 -0
- data/doc/changes/2026-02-21-architecture-ui-layer.md +253 -0
- data/doc/changes/2026-02-21-cc-config-implementation.md +108 -0
- data/doc/changes/2026-02-21-ci-pipeline-implementation.md +214 -0
- data/doc/changes/2026-02-21-compiler-multi-target-pipeline.md +241 -0
- data/doc/changes/2026-02-21-config-design-show-commands.md +61 -0
- data/doc/changes/2026-02-21-design-implementation-overview.md +455 -0
- data/doc/changes/2026-02-21-lifecycle-management.md +196 -0
- data/doc/changes/2026-02-21-path-resolver.md +128 -0
- data/doc/changes/2026-02-24-ci-tmpdir-mutant-fetch.md +45 -0
- data/doc/changes/2026-03-01-ci-bundler-strategy.md +120 -0
- data/doc/changes/2026-03-20-security-hardening-phase2.md +163 -0
- data/doc/context/SESSION-HANDOFF.md +69 -0
- data/doc/context/ai-engine-usage-trends-2026.md +80 -0
- data/doc/context/plan-pluggable-engines.md +590 -0
- data/doc/decisions/001-flog-deferred.md +32 -0
- data/doc/decisions/002-path-resolution-strategy.md +158 -0
- data/doc/decisions/003-ui-adapter-selection.md +193 -0
- data/doc/decisions/004-design-document-validation.md +179 -0
- data/doc/decisions/005-package-splitting-strategy.md +200 -0
- data/doc/decisions/006-multi-engine-architecture.md +147 -0
- data/doc/decisions/007-engine-agnostic-pivot.md +219 -0
- data/doc/decisions/008-ci-bundler-strategy.md +129 -0
- data/doc/decisions/009-core-only-v1-release.md +60 -0
- data/doc/decisions/010-engine-debian-packaging.md +66 -0
- data/doc/decisions/011-context-aware-cli.md +71 -0
- data/doc/dependency_decisions.yml +247 -0
- data/doc/issues/001-wrapper-missing-environment-variables.md +197 -0
- data/doc/issues/002-embedded-ruby-wrong-prefix.md +217 -0
- data/doc/issues/003-smoke-test-false-positive.md +127 -0
- data/doc/issues/004-market-research-design-updates.md +109 -0
- data/doc/issues/005-compile-scope-coexistence.md +161 -0
- data/doc/locales/.gitkeep +0 -0
- data/doc/man/rai.1.ronn +505 -0
- data/doc/operations/packaging.md +133 -0
- data/doc/operations/rosett-ai-release.md +65 -0
- data/doc/reference/error-catalog.md +107 -0
- data/doc/reference/rosett-ai-technical-reference.pdf +0 -0
- data/doc/reference/src/Pictures/cover.jpg +0 -0
- data/doc/reference/src/Pictures/head1.jpg +0 -0
- data/doc/reference/src/Pictures/head2.jpg +0 -0
- data/doc/reference/src/Pictures/head3.jpg +0 -0
- data/doc/reference/src/Pictures/head4.jpg +0 -0
- data/doc/reference/src/Pictures/head5.jpg +0 -0
- data/doc/reference/src/Pictures/head6.jpg +0 -0
- data/doc/reference/src/Pictures/head7.jpg +0 -0
- data/doc/reference/src/Pictures/head8.jpg +0 -0
- data/doc/reference/src/StyleInd.ist +4 -0
- data/doc/reference/src/bibliography.bib +79 -0
- data/doc/reference/src/main.tex +1288 -0
- data/doc/reference/src/structure.tex +303 -0
- data/doc/rosett-ai-bookmarks.html +301 -0
- data/kitchen.yml +46 -0
- data/lib/rosett_ai/adopter/executor_resolver.rb +77 -0
- data/lib/rosett_ai/adopter/local_analysis_collector.rb +154 -0
- data/lib/rosett_ai/adopter/rule_adopter.rb +254 -0
- data/lib/rosett_ai/ai_config/config_compiler.rb +111 -0
- data/lib/rosett_ai/ai_config/context_window.rb +55 -0
- data/lib/rosett_ai/ai_config/cost_controls.rb +44 -0
- data/lib/rosett_ai/ai_config/fallback_chain.rb +64 -0
- data/lib/rosett_ai/ai_config/model_router.rb +121 -0
- data/lib/rosett_ai/ai_config/validator.rb +45 -0
- data/lib/rosett_ai/authorship/attribution_compiler.rb +99 -0
- data/lib/rosett_ai/authorship/disclosure_policy.rb +81 -0
- data/lib/rosett_ai/authorship/review_validator.rb +39 -0
- data/lib/rosett_ai/authorship/trailer_generator.rb +88 -0
- data/lib/rosett_ai/backup/compressor.rb +180 -0
- data/lib/rosett_ai/backup/destination.rb +91 -0
- data/lib/rosett_ai/behaviour/manager.rb +156 -0
- data/lib/rosett_ai/compiler/backend.rb +86 -0
- data/lib/rosett_ai/compiler/backends/agents_md_backend.rb +80 -0
- data/lib/rosett_ai/compiler/backends/claude_backend.rb +88 -0
- data/lib/rosett_ai/compiler/backends/generic_backend.rb +15 -0
- data/lib/rosett_ai/compiler/behaviour_compiler.rb +40 -0
- data/lib/rosett_ai/compiler/capability_checker.rb +104 -0
- data/lib/rosett_ai/compiler/compilation_pipeline.rb +361 -0
- data/lib/rosett_ai/compiler/compiled_output.rb +39 -0
- data/lib/rosett_ai/compiler/locale_compiler.rb +250 -0
- data/lib/rosett_ai/compiler/target_profile.rb +112 -0
- data/lib/rosett_ai/completion/generator.rb +101 -0
- data/lib/rosett_ai/completion/shells/bash_generator.rb +126 -0
- data/lib/rosett_ai/completion/shells/fish_generator.rb +78 -0
- data/lib/rosett_ai/completion/shells/zsh_generator.rb +126 -0
- data/lib/rosett_ai/comply/checkers/cra_checker.rb +102 -0
- data/lib/rosett_ai/comply/checkers/license_checker.rb +85 -0
- data/lib/rosett_ai/comply/checkers/spdx_header_checker.rb +98 -0
- data/lib/rosett_ai/comply/reporter.rb +113 -0
- data/lib/rosett_ai/comply/runner.rb +50 -0
- data/lib/rosett_ai/composition/circular_dependency_detector.rb +56 -0
- data/lib/rosett_ai/composition/composer.rb +158 -0
- data/lib/rosett_ai/composition/composition_result.rb +64 -0
- data/lib/rosett_ai/composition/conflict_detector.rb +53 -0
- data/lib/rosett_ai/composition/lockfile.rb +103 -0
- data/lib/rosett_ai/composition/merge_strategy.rb +131 -0
- data/lib/rosett_ai/composition/priority_sorter.rb +29 -0
- data/lib/rosett_ai/composition/scope_resolver.rb +55 -0
- data/lib/rosett_ai/config/compile_result.rb +37 -0
- data/lib/rosett_ai/config/compiler.rb +13 -0
- data/lib/rosett_ai/config/domain_transformer.rb +13 -0
- data/lib/rosett_ai/config/key_map.rb +13 -0
- data/lib/rosett_ai/config/masking_secret_resolver.rb +40 -0
- data/lib/rosett_ai/config/scope_router.rb +13 -0
- data/lib/rosett_ai/config/secret_resolver.rb +125 -0
- data/lib/rosett_ai/configuration.rb +119 -0
- data/lib/rosett_ai/content/content_client.rb +60 -0
- data/lib/rosett_ai/content/pack_installer.rb +117 -0
- data/lib/rosett_ai/content/pack_manifest.rb +50 -0
- data/lib/rosett_ai/content/pack_registry.rb +68 -0
- data/lib/rosett_ai/content_packs/manager.rb +50 -0
- data/lib/rosett_ai/dbus/compositor_detector.rb +77 -0
- data/lib/rosett_ai/dbus/focus_adapters/base.rb +59 -0
- data/lib/rosett_ai/dbus/focus_adapters/gnome_adapter.rb +172 -0
- data/lib/rosett_ai/dbus/focus_adapters/hyprland_adapter.rb +77 -0
- data/lib/rosett_ai/dbus/focus_adapters/i3_adapter.rb +65 -0
- data/lib/rosett_ai/dbus/focus_adapters/kwin_adapter.rb +103 -0
- data/lib/rosett_ai/dbus/focus_adapters/x11_adapter.rb +105 -0
- data/lib/rosett_ai/dbus/focus_monitor_interface.rb +103 -0
- data/lib/rosett_ai/dbus/manager_interface.rb +213 -0
- data/lib/rosett_ai/dbus/plugin_manager_interface.rb +169 -0
- data/lib/rosett_ai/dbus/rate_limiter.rb +89 -0
- data/lib/rosett_ai/dbus/service.rb +121 -0
- data/lib/rosett_ai/dbus/status_notifier_interface.rb +79 -0
- data/lib/rosett_ai/deprecation.rb +79 -0
- data/lib/rosett_ai/desktop/dbus_client.rb +259 -0
- data/lib/rosett_ai/desktop/gtk4_app.rb +371 -0
- data/lib/rosett_ai/desktop/gtk4_preferences.rb +331 -0
- data/lib/rosett_ai/desktop/gui_logger.rb +236 -0
- data/lib/rosett_ai/doctor/check.rb +92 -0
- data/lib/rosett_ai/doctor/checks/cache_health_check.rb +50 -0
- data/lib/rosett_ai/doctor/checks/dbus_availability_check.rb +39 -0
- data/lib/rosett_ai/doctor/checks/engine_detection_check.rb +46 -0
- data/lib/rosett_ai/doctor/checks/file_permission_check.rb +44 -0
- data/lib/rosett_ai/doctor/checks/gem_dependency_check.rb +55 -0
- data/lib/rosett_ai/doctor/checks/ruby_version_check.rb +50 -0
- data/lib/rosett_ai/doctor/checks/stale_config_nncc_check.rb +57 -0
- data/lib/rosett_ai/doctor/checks/stale_home_nncc_check.rb +59 -0
- data/lib/rosett_ai/doctor.rb +81 -0
- data/lib/rosett_ai/documentation/reference_compiler.rb +122 -0
- data/lib/rosett_ai/documentation/translator.rb +62 -0
- data/lib/rosett_ai/engines/base_config_compiler.rb +203 -0
- data/lib/rosett_ai/engines/detector.rb +63 -0
- data/lib/rosett_ai/engines/registry.rb +50 -0
- data/lib/rosett_ai/error_handler.rb +139 -0
- data/lib/rosett_ai/exit_codes.rb +76 -0
- data/lib/rosett_ai/feature_flags.rb +102 -0
- data/lib/rosett_ai/formatting.rb +33 -0
- data/lib/rosett_ai/gem_consistency_checker.rb +199 -0
- data/lib/rosett_ai/git_hooks/chain_detector.rb +86 -0
- data/lib/rosett_ai/git_hooks/installer.rb +175 -0
- data/lib/rosett_ai/git_hooks/script_generator.rb +125 -0
- data/lib/rosett_ai/gitlab/validators/supplementary_gitlab_ci_yaml_validator.rb +79 -0
- data/lib/rosett_ai/i18n/locale_resolver.rb +46 -0
- data/lib/rosett_ai/i18n/utf8_checker.rb +32 -0
- data/lib/rosett_ai/init/config_file_writer.rb +24 -0
- data/lib/rosett_ai/init/directory_builder.rb +38 -0
- data/lib/rosett_ai/init/file_copier.rb +95 -0
- data/lib/rosett_ai/init/global_initializer.rb +28 -0
- data/lib/rosett_ai/init/local_initializer.rb +27 -0
- data/lib/rosett_ai/init/mcp_registrar.rb +109 -0
- data/lib/rosett_ai/init/project_initializer.rb +38 -0
- data/lib/rosett_ai/licensing/license_key.rb +139 -0
- data/lib/rosett_ai/licensing/license_store.rb +64 -0
- data/lib/rosett_ai/licensing/license_validator.rb +60 -0
- data/lib/rosett_ai/licensing/tier.rb +42 -0
- data/lib/rosett_ai/mcp/admin/auditor.rb +88 -0
- data/lib/rosett_ai/mcp/admin/health_checker.rb +81 -0
- data/lib/rosett_ai/mcp/admin/registry.rb +100 -0
- data/lib/rosett_ai/mcp/admin/schema_validator.rb +63 -0
- data/lib/rosett_ai/mcp/enforcement/.gitkeep +0 -0
- data/lib/rosett_ai/mcp/enforcement/hook_generator.rb +197 -0
- data/lib/rosett_ai/mcp/enforcement/validator.rb +215 -0
- data/lib/rosett_ai/mcp/governance.rb +160 -0
- data/lib/rosett_ai/mcp/http_security_config.rb +158 -0
- data/lib/rosett_ai/mcp/instructions.rb +266 -0
- data/lib/rosett_ai/mcp/key_hasher.rb +66 -0
- data/lib/rosett_ai/mcp/keyfile.rb +221 -0
- data/lib/rosett_ai/mcp/middleware/authentication.rb +146 -0
- data/lib/rosett_ai/mcp/middleware/content_type.rb +56 -0
- data/lib/rosett_ai/mcp/middleware/cors.rb +83 -0
- data/lib/rosett_ai/mcp/middleware/origin_validation.rb +73 -0
- data/lib/rosett_ai/mcp/middleware/rate_limit.rb +106 -0
- data/lib/rosett_ai/mcp/middleware/request_size.rb +51 -0
- data/lib/rosett_ai/mcp/plugins.rb +143 -0
- data/lib/rosett_ai/mcp/prompts/compilation_prompt.rb +40 -0
- data/lib/rosett_ai/mcp/prompts/compliance_prompt.rb +41 -0
- data/lib/rosett_ai/mcp/prompts/diagnostics_prompt.rb +41 -0
- data/lib/rosett_ai/mcp/prompts/validation_prompt.rb +41 -0
- data/lib/rosett_ai/mcp/resources/behaviour_resource.rb +127 -0
- data/lib/rosett_ai/mcp/resources/config_resource.rb +72 -0
- data/lib/rosett_ai/mcp/resources/design_resource.rb +58 -0
- data/lib/rosett_ai/mcp/resources/hooks_resource.rb +74 -0
- data/lib/rosett_ai/mcp/resources/provenance_resource.rb +51 -0
- data/lib/rosett_ai/mcp/resources/rules_resource.rb +60 -0
- data/lib/rosett_ai/mcp/resources/schema_resource.rb +72 -0
- data/lib/rosett_ai/mcp/response_helper.rb +46 -0
- data/lib/rosett_ai/mcp/security_logger.rb +60 -0
- data/lib/rosett_ai/mcp/server.rb +212 -0
- data/lib/rosett_ai/mcp/settings/server_installer.rb +112 -0
- data/lib/rosett_ai/mcp/settings/trust_manager.rb +142 -0
- data/lib/rosett_ai/mcp/tools/adopt_tool.rb +70 -0
- data/lib/rosett_ai/mcp/tools/backup_tool.rb +64 -0
- data/lib/rosett_ai/mcp/tools/behaviour_display_tool.rb +72 -0
- data/lib/rosett_ai/mcp/tools/behaviour_list_tool.rb +56 -0
- data/lib/rosett_ai/mcp/tools/behaviour_manage_tool.rb +114 -0
- data/lib/rosett_ai/mcp/tools/behaviour_show_tool.rb +62 -0
- data/lib/rosett_ai/mcp/tools/compile_status_tool.rb +122 -0
- data/lib/rosett_ai/mcp/tools/compile_tool.rb +191 -0
- data/lib/rosett_ai/mcp/tools/comply_tool.rb +79 -0
- data/lib/rosett_ai/mcp/tools/config_compile_tool.rb +71 -0
- data/lib/rosett_ai/mcp/tools/config_status_tool.rb +79 -0
- data/lib/rosett_ai/mcp/tools/content_tool.rb +78 -0
- data/lib/rosett_ai/mcp/tools/context_query_tool.rb +156 -0
- data/lib/rosett_ai/mcp/tools/design_list_tool.rb +57 -0
- data/lib/rosett_ai/mcp/tools/design_show_tool.rb +69 -0
- data/lib/rosett_ai/mcp/tools/doctor_tool.rb +62 -0
- data/lib/rosett_ai/mcp/tools/documentation_status_tool.rb +45 -0
- data/lib/rosett_ai/mcp/tools/engines_tool.rb +84 -0
- data/lib/rosett_ai/mcp/tools/hook_install_tool.rb +190 -0
- data/lib/rosett_ai/mcp/tools/hook_preview_tool.rb +173 -0
- data/lib/rosett_ai/mcp/tools/hooks_status_tool.rb +84 -0
- data/lib/rosett_ai/mcp/tools/init_tool.rb +87 -0
- data/lib/rosett_ai/mcp/tools/license_status_tool.rb +44 -0
- data/lib/rosett_ai/mcp/tools/project_tool.rb +117 -0
- data/lib/rosett_ai/mcp/tools/provenance_tool.rb +97 -0
- data/lib/rosett_ai/mcp/tools/provenance_write_tool.rb +40 -0
- data/lib/rosett_ai/mcp/tools/retrofit_tool.rb +81 -0
- data/lib/rosett_ai/mcp/tools/rule_search_tool.rb +163 -0
- data/lib/rosett_ai/mcp/tools/schema_get_tool.rb +94 -0
- data/lib/rosett_ai/mcp/tools/tooling_tool.rb +86 -0
- data/lib/rosett_ai/mcp/tools/validate_tool.rb +105 -0
- data/lib/rosett_ai/mcp/tools/workflow_execute_tool.rb +74 -0
- data/lib/rosett_ai/mcp/tools/workflow_tool.rb +78 -0
- data/lib/rosett_ai/migration/detector.rb +117 -0
- data/lib/rosett_ai/migration/nncc_config_migrator.rb +94 -0
- data/lib/rosett_ai/migration/nncc_project_migrator.rb +90 -0
- data/lib/rosett_ai/migration/xdg_migrator.rb +123 -0
- data/lib/rosett_ai/package_manager/apt.rb +108 -0
- data/lib/rosett_ai/package_manager/base.rb +68 -0
- data/lib/rosett_ai/package_manager/gem_backend.rb +90 -0
- data/lib/rosett_ai/packaging/variant_config.rb +92 -0
- data/lib/rosett_ai/path_resolver.rb +115 -0
- data/lib/rosett_ai/plugins/contract.rb +43 -0
- data/lib/rosett_ai/plugins/engine_contract.rb +60 -0
- data/lib/rosett_ai/plugins/gui_contract.rb +74 -0
- data/lib/rosett_ai/plugins/mcp_contract.rb +48 -0
- data/lib/rosett_ai/plugins/registry.rb +150 -0
- data/lib/rosett_ai/policy/auditor.rb +41 -0
- data/lib/rosett_ai/policy/deny_list.rb +71 -0
- data/lib/rosett_ai/policy/opt_out_scanner.rb +37 -0
- data/lib/rosett_ai/policy/policy_compiler.rb +84 -0
- data/lib/rosett_ai/policy/protected_files.rb +47 -0
- data/lib/rosett_ai/policy/tier_hierarchy.rb +48 -0
- data/lib/rosett_ai/policy/validator.rb +35 -0
- data/lib/rosett_ai/profiler.rb +79 -0
- data/lib/rosett_ai/project/drift_detector.rb +126 -0
- data/lib/rosett_ai/project/manager.rb +115 -0
- data/lib/rosett_ai/project/sync_manager.rb +138 -0
- data/lib/rosett_ai/project/template_applier.rb +105 -0
- data/lib/rosett_ai/project_context.rb +82 -0
- data/lib/rosett_ai/provenance/entry.rb +63 -0
- data/lib/rosett_ai/provenance/file_source.rb +32 -0
- data/lib/rosett_ai/provenance/source.rb +62 -0
- data/lib/rosett_ai/provenance/store.rb +153 -0
- data/lib/rosett_ai/provenance/tracker.rb +62 -0
- data/lib/rosett_ai/provenance/trailer_generator.rb +43 -0
- data/lib/rosett_ai/provenance/validator.rb +45 -0
- data/lib/rosett_ai/quorum/collector.rb +59 -0
- data/lib/rosett_ai/quorum/comparator.rb +81 -0
- data/lib/rosett_ai/quorum/dispatcher.rb +57 -0
- data/lib/rosett_ai/quorum/strategies/adopt.rb +56 -0
- data/lib/rosett_ai/rai_config.rb +107 -0
- data/lib/rosett_ai/retrofit/base_parser.rb +66 -0
- data/lib/rosett_ai/retrofit/engine.rb +171 -0
- data/lib/rosett_ai/retrofit/parsers/agents_md_parser.rb +50 -0
- data/lib/rosett_ai/retrofit/parsers/claude_parser.rb +69 -0
- data/lib/rosett_ai/retrofit/parsers/cursor_parser.rb +82 -0
- data/lib/rosett_ai/retrofit/round_trip_validator.rb +65 -0
- data/lib/rosett_ai/retrofit/scanner.rb +47 -0
- data/lib/rosett_ai/retrofit/secret_detector.rb +87 -0
- data/lib/rosett_ai/secrets_resolver.rb +71 -0
- data/lib/rosett_ai/smart_feedback/suggester.rb +83 -0
- data/lib/rosett_ai/smart_feedback/thor_middleware.rb +84 -0
- data/lib/rosett_ai/structured_logger.rb +110 -0
- data/lib/rosett_ai/telemetry/json_lines_writer.rb +50 -0
- data/lib/rosett_ai/telemetry/log_rotator.rb +67 -0
- data/lib/rosett_ai/telemetry/provider.rb +26 -0
- data/lib/rosett_ai/telemetry/reporter.rb +144 -0
- data/lib/rosett_ai/telemetry.rb +47 -0
- data/lib/rosett_ai/text_sanitizer.rb +62 -0
- data/lib/rosett_ai/thor/cli.rb +269 -0
- data/lib/rosett_ai/thor/tasks/adopt.rb +250 -0
- data/lib/rosett_ai/thor/tasks/backup.rb +420 -0
- data/lib/rosett_ai/thor/tasks/behaviour.rb +474 -0
- data/lib/rosett_ai/thor/tasks/build.rb +1162 -0
- data/lib/rosett_ai/thor/tasks/compile.rb +415 -0
- data/lib/rosett_ai/thor/tasks/completion.rb +123 -0
- data/lib/rosett_ai/thor/tasks/comply.rb +82 -0
- data/lib/rosett_ai/thor/tasks/config.rb +265 -0
- data/lib/rosett_ai/thor/tasks/content.rb +193 -0
- data/lib/rosett_ai/thor/tasks/dbus.rb +321 -0
- data/lib/rosett_ai/thor/tasks/design.rb +258 -0
- data/lib/rosett_ai/thor/tasks/desktop.rb +129 -0
- data/lib/rosett_ai/thor/tasks/doctor.rb +127 -0
- data/lib/rosett_ai/thor/tasks/documentation.rb +321 -0
- data/lib/rosett_ai/thor/tasks/engines.rb +167 -0
- data/lib/rosett_ai/thor/tasks/hooks.rb +219 -0
- data/lib/rosett_ai/thor/tasks/init.rb +259 -0
- data/lib/rosett_ai/thor/tasks/license.rb +120 -0
- data/lib/rosett_ai/thor/tasks/mcp.rb +535 -0
- data/lib/rosett_ai/thor/tasks/migrate.rb +121 -0
- data/lib/rosett_ai/thor/tasks/plugins.rb +157 -0
- data/lib/rosett_ai/thor/tasks/project.rb +260 -0
- data/lib/rosett_ai/thor/tasks/provenance.rb +195 -0
- data/lib/rosett_ai/thor/tasks/release.rb +314 -0
- data/lib/rosett_ai/thor/tasks/retrofit.rb +90 -0
- data/lib/rosett_ai/thor/tasks/tooling.rb +308 -0
- data/lib/rosett_ai/thor/tasks/validate.rb +108 -0
- data/lib/rosett_ai/thor/tasks/workflow.rb +196 -0
- data/lib/rosett_ai/tooling/ci_yaml_validator.rb +37 -0
- data/lib/rosett_ai/tooling/version_checker.rb +35 -0
- data/lib/rosett_ai/ui/accessible_tui.rb +61 -0
- data/lib/rosett_ai/ui/base.rb +46 -0
- data/lib/rosett_ai/ui/gtk4.rb +98 -0
- data/lib/rosett_ai/ui/kde.rb +40 -0
- data/lib/rosett_ai/ui/qt6.rb +40 -0
- data/lib/rosett_ai/ui/registry.rb +60 -0
- data/lib/rosett_ai/ui/tty_helper.rb +74 -0
- data/lib/rosett_ai/ui/tui.rb +59 -0
- data/lib/rosett_ai/validators/behaviour_validator.rb +20 -0
- data/lib/rosett_ai/validators/design_validator.rb +17 -0
- data/lib/rosett_ai/validators/schema_validator.rb +84 -0
- data/lib/rosett_ai/validators/tooling_validator.rb +17 -0
- data/lib/rosett_ai/version.rb +8 -0
- data/lib/rosett_ai/version_consistency_checker.rb +129 -0
- data/lib/rosett_ai/workflow/audit_log.rb +86 -0
- data/lib/rosett_ai/workflow/engine.rb +142 -0
- data/lib/rosett_ai/workflow/manager.rb +82 -0
- data/lib/rosett_ai/workflow/schema_validator.rb +71 -0
- data/lib/rosett_ai/workflow/step_runner.rb +61 -0
- data/lib/rosett_ai/workflow/steps/prompt_step.rb +62 -0
- data/lib/rosett_ai/workflow/steps/rai_step.rb +74 -0
- data/lib/rosett_ai/workflow/steps/shell_step.rb +53 -0
- data/lib/rosett_ai/yaml_loader.rb +78 -0
- data/lib/rosett_ai.rb +221 -0
- data/lib/rubocop/cop/rosett_ai/shell_interpolation.rb +54 -0
- data/lib/rubocop/cop/rosett_ai/unsafe_const_get.rb +60 -0
- data/lib/rubocop/cop/rosett_ai/unsafe_send.rb +50 -0
- data/lib/rubocop/cop/rosett_ai/unsafe_yaml_load.rb +40 -0
- data/lib/rubocop/rosett_ai.rb +9 -0
- data/lib/scripts/generated/docker_hub_tags.rb +126 -0
- data/locales/.gitkeep +0 -0
- data/locales/ar.yml +579 -0
- data/locales/en.yml +571 -0
- data/locales/fr.yml +567 -0
- data/packaging/build-engine-deb.sh +81 -0
- data/packaging/scripts/postinst +17 -0
- data/packaging/scripts/postrm +19 -0
- data/packaging/scripts/prerm +10 -0
- data/packaging/wrapper.sh.template +38 -0
- data/rosett-ai.gemspec +63 -0
- data/rules/.gitkeep +0 -0
- data/scripts/publish/pulp_upload.sh +123 -0
- data/settings.json +29 -0
- data/share/applications/be.neatnerds.rosettai.desktop +29 -0
- data/share/dbus-1/interfaces/be.neatnerds.rosettai.xml +103 -0
- data/share/dbus-1/services/be.neatnerds.rosettai.service +3 -0
- data/share/templates/behaviour/criticalthinking.yml +69 -0
- metadata +810 -0
data/doc/USER_MANUAL.md
ADDED
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
# Rosett-AI User Manual
|
|
2
|
+
|
|
3
|
+
Version 1.2.0
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
1. [Getting Started](#getting-started)
|
|
8
|
+
2. [Core Concepts](#core-concepts)
|
|
9
|
+
3. [CLI Reference](#cli-reference)
|
|
10
|
+
4. [Writing Behaviour Rules](#writing-behaviour-rules)
|
|
11
|
+
5. [Engine System](#engine-system)
|
|
12
|
+
6. [Project Configuration](#project-configuration)
|
|
13
|
+
7. [Troubleshooting](#troubleshooting)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Getting Started
|
|
18
|
+
|
|
19
|
+
### Installation
|
|
20
|
+
|
|
21
|
+
#### From .deb package (recommended)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
sudo dpkg -i rosett-ai_1.2.0-1_amd64.deb
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The package installs a self-contained Ruby environment at `/opt/rosett-ai/`
|
|
28
|
+
with symlinks at `/usr/local/bin/raictl` and `/usr/local/bin/rai`.
|
|
29
|
+
|
|
30
|
+
#### From APT repository
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Import the signing key
|
|
34
|
+
curl -fsSL https://repo.neatnerds.be/gpg-key.asc | \
|
|
35
|
+
sudo gpg --dearmor -o /usr/share/keyrings/rosett-ai.gpg
|
|
36
|
+
|
|
37
|
+
# Add stable channel
|
|
38
|
+
echo "deb [signed-by=/usr/share/keyrings/rosett-ai.gpg] \
|
|
39
|
+
https://repo.neatnerds.be/stable bookworm main" | \
|
|
40
|
+
sudo tee /etc/apt/sources.list.d/rosett-ai.list
|
|
41
|
+
|
|
42
|
+
sudo apt update && sudo apt install rosett-ai
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### From source (development)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
git clone https://gitlab.neatnerds.be/foss/rosett-ai/rosett-ai.git
|
|
49
|
+
cd rosett-ai
|
|
50
|
+
bundle install
|
|
51
|
+
bin/rai version
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### First Run
|
|
55
|
+
|
|
56
|
+
After installation, initialise the global configuration:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
raictl init --global
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
This creates:
|
|
63
|
+
|
|
64
|
+
- `~/.config/rosett-ai/conf/behaviour/` — your behaviour files
|
|
65
|
+
- `~/.config/rosett-ai/conf/schemas/` — validation schemas
|
|
66
|
+
- `~/.config/rosett-ai/config.yml` — global settings
|
|
67
|
+
|
|
68
|
+
Verify the installation:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
raictl version # Show version
|
|
72
|
+
raictl doctor # Run diagnostics
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Your First Behaviour File
|
|
76
|
+
|
|
77
|
+
Create a behaviour file at `~/.config/rosett-ai/conf/behaviour/code_style.yml`:
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
name: code_style
|
|
81
|
+
description: Code style guidelines for AI assistants
|
|
82
|
+
version: 1.0.0
|
|
83
|
+
rules:
|
|
84
|
+
- id: rule_001
|
|
85
|
+
description: "Use descriptive variable names."
|
|
86
|
+
priority: 50
|
|
87
|
+
enabled: true
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
See the [Writing Behaviour Rules](#writing-behaviour-rules) section for
|
|
91
|
+
the full YAML schema reference.
|
|
92
|
+
|
|
93
|
+
Validate and compile:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
raictl validate # Validate all configs
|
|
97
|
+
raictl compile --verbose # Compile to default engine
|
|
98
|
+
raictl compile --simulate --verbose # Preview without writing
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Core Concepts
|
|
104
|
+
|
|
105
|
+
### Behaviour Files
|
|
106
|
+
|
|
107
|
+
Behaviour files are YAML documents containing rules for AI assistants.
|
|
108
|
+
Each file groups related rules under a descriptive name. Rules have
|
|
109
|
+
priorities that control their ordering in the compiled output.
|
|
110
|
+
|
|
111
|
+
**Location**: `~/.config/rosett-ai/conf/behaviour/` (global) or
|
|
112
|
+
`.rosett-ai/conf/behaviour/` (project-level).
|
|
113
|
+
|
|
114
|
+
### Engines
|
|
115
|
+
|
|
116
|
+
Engines translate behaviour rules into tool-specific formats. Each AI
|
|
117
|
+
tool (Claude Code, Cursor, AGENTS.md, etc.) has its own engine that
|
|
118
|
+
knows the tool's native configuration format and filesystem layout.
|
|
119
|
+
|
|
120
|
+
| Engine | Output Format | Output Location |
|
|
121
|
+
|--------|--------------|-----------------|
|
|
122
|
+
| claude | Markdown rules | `~/.claude/rules/` |
|
|
123
|
+
| agents_md | AGENTS.md | Project root |
|
|
124
|
+
| generic | Plain markdown | Configurable |
|
|
125
|
+
|
|
126
|
+
### Scopes
|
|
127
|
+
|
|
128
|
+
Configuration is layered in a scope hierarchy. Lower scopes override
|
|
129
|
+
higher scopes:
|
|
130
|
+
|
|
131
|
+
1. **Global** (`~/.config/rosett-ai/conf/`) — user-wide defaults
|
|
132
|
+
2. **Project** (`.rosett-ai/conf/`) — project-specific overrides
|
|
133
|
+
|
|
134
|
+
When you run `raictl compile` from a project directory containing a
|
|
135
|
+
`.rosett-ai/` marker, project-scope rules merge with global rules.
|
|
136
|
+
|
|
137
|
+
### Compilation Pipeline
|
|
138
|
+
|
|
139
|
+
```text
|
|
140
|
+
Behaviour YAML ──> Rule extraction ──> Priority sorting ──> Engine rendering ──> Output files
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The compiler reads all `.yml` files from the active scope(s), extracts
|
|
144
|
+
enabled rules, sorts by priority (highest first), and renders them
|
|
145
|
+
through the selected engine's backend.
|
|
146
|
+
|
|
147
|
+
### Rule Priorities
|
|
148
|
+
|
|
149
|
+
| Range | Level | Use Case |
|
|
150
|
+
|-------|-------|----------|
|
|
151
|
+
| 90-100 | Critical | Security constraints, hard requirements |
|
|
152
|
+
| 70-89 | High | Methodology enforcement, quality gates |
|
|
153
|
+
| 50-69 | Medium | Style guidelines, conventions |
|
|
154
|
+
| 30-49 | Low | Preferences, nice-to-haves |
|
|
155
|
+
| 1-29 | Minimal | Background context |
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## CLI Reference
|
|
160
|
+
|
|
161
|
+
### Compile
|
|
162
|
+
|
|
163
|
+
Compile behaviour rules to engine-specific output.
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
raictl compile # Compile with default engine
|
|
167
|
+
raictl compile --verbose # Show detailed output
|
|
168
|
+
raictl compile --simulate --verbose # Dry run — preview diffs
|
|
169
|
+
raictl compile --vendor # Compile and write lockfile
|
|
170
|
+
raictl compile --engine claude # Target Claude Code
|
|
171
|
+
raictl compile --engine agents_md # Target AGENTS.md
|
|
172
|
+
raictl compile --engine generic # Target plain markdown
|
|
173
|
+
raictl compile --strict # Treat warnings as errors
|
|
174
|
+
raictl compile --locales # Compile locale files
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Validate
|
|
178
|
+
|
|
179
|
+
Validate all configuration files (behaviours, design docs, tooling).
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
raictl validate # Validate everything
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Behaviour Management
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
raictl behaviour list # List all behaviour files
|
|
189
|
+
raictl behaviour display # Show rules as table
|
|
190
|
+
raictl behaviour show code_style # Show specific behaviour
|
|
191
|
+
raictl behaviour validate # Validate all behaviours
|
|
192
|
+
raictl behaviour validate code_style # Validate one behaviour
|
|
193
|
+
raictl behaviour manage add my_rules # Create new behaviour
|
|
194
|
+
raictl behaviour manage modify my_rules # Edit existing behaviour
|
|
195
|
+
raictl behaviour manage delete my_rules # Delete behaviour
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Init
|
|
199
|
+
|
|
200
|
+
Set up directory structures for rosett-ai.
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
raictl init --global # Set up ~/.config/rosett-ai/
|
|
204
|
+
raictl init --project # Set up .rosett-ai/ in current dir
|
|
205
|
+
raictl init --global --local # Set up both
|
|
206
|
+
raictl init --global --no-compile # Skip compilation step
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Doctor
|
|
210
|
+
|
|
211
|
+
Run diagnostic checks to verify your environment.
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
raictl doctor # Run all checks
|
|
215
|
+
raictl doctor --check ruby_version # Run specific check
|
|
216
|
+
raictl doctor --format json # Machine-readable output
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Available checks: `ruby_version`, `gem_dependency`, `engine_detection`,
|
|
220
|
+
`file_permission`, `cache_health`, `dbus_availability`,
|
|
221
|
+
`stale_home_nncc`, `stale_config_nncc`.
|
|
222
|
+
|
|
223
|
+
### Migrate
|
|
224
|
+
|
|
225
|
+
Migrate legacy configuration from previous versions.
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
raictl migrate # Migrate ~/.config/nncc/ paths
|
|
229
|
+
raictl migrate --workspace ~/projects # Batch migrate project markers
|
|
230
|
+
raictl migrate --dry-run # Show what would change
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Build and Release (Developer Rake Tasks)
|
|
234
|
+
|
|
235
|
+
Build and release commands are developer-only and available via Rake, not the user-facing CLI:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
rake build:package # Build core .deb package
|
|
239
|
+
rake build:package[gtk4] # Build GTK4 variant
|
|
240
|
+
rake build:engine # Build engine plugin .deb
|
|
241
|
+
rake release:prepare[minor] # Bump minor, changelog, commit
|
|
242
|
+
rake release:prepare[patch] # Bump patch version
|
|
243
|
+
rake release:tag # Create annotated git tag
|
|
244
|
+
rake release:status # Show version and tag info
|
|
245
|
+
rake readme:update # Update README numbers
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Design Documents
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
raictl design list # List all design docs
|
|
252
|
+
raictl design show compiler # Show specific design doc
|
|
253
|
+
raictl design validate # Validate all design docs
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Compliance
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
raictl comply # Run all compliance checks
|
|
260
|
+
raictl comply --cra # CRA-specific checks
|
|
261
|
+
raictl comply --license # License audit
|
|
262
|
+
raictl comply --headers # SPDX header verification
|
|
263
|
+
raictl comply --format json # Machine-readable output
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Provenance
|
|
267
|
+
|
|
268
|
+
Track AI contributions.
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
raictl provenance add # Record AI contribution
|
|
272
|
+
raictl provenance validate # Validate entries
|
|
273
|
+
raictl provenance log # Show all entries
|
|
274
|
+
raictl provenance show COMMIT # Show entry for commit
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Engines
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
raictl engines list # List all known engines
|
|
281
|
+
raictl engines detect # Detect installed engines
|
|
282
|
+
raictl engines status # Show default engine
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Other Commands
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
raictl license activate KEY # Activate license key
|
|
289
|
+
raictl license status # Show license status
|
|
290
|
+
raictl hooks install # Install git hooks
|
|
291
|
+
raictl hooks status # Show hook status
|
|
292
|
+
raictl backup --global # Back up ~/.claude/
|
|
293
|
+
raictl completion install # Install shell completions
|
|
294
|
+
raictl config compile # Compile YAML to JSON settings
|
|
295
|
+
raictl mcp serve # Start MCP server
|
|
296
|
+
raictl retrofit scan # Scan for native configs
|
|
297
|
+
raictl project status # Show project status
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Writing Behaviour Rules
|
|
303
|
+
|
|
304
|
+
### YAML Structure
|
|
305
|
+
|
|
306
|
+
Every behaviour file follows this schema:
|
|
307
|
+
|
|
308
|
+
```yaml
|
|
309
|
+
---
|
|
310
|
+
name: behaviour_name # Required: unique identifier
|
|
311
|
+
description: What these rules cover # Required: human description
|
|
312
|
+
version: 1.0.0 # Recommended: semver
|
|
313
|
+
author: your_name # Who wrote it
|
|
314
|
+
created_at: "2026-01-01" # Creation date
|
|
315
|
+
modified_at: "2026-01-01" # Last modified
|
|
316
|
+
modified_by: your_name # Who last modified
|
|
317
|
+
sensitive: false # true = excluded from API analysis
|
|
318
|
+
used_in: [] # Which projects use this
|
|
319
|
+
rules: # Required: at least one rule
|
|
320
|
+
- id: rule_001 # Required: unique within file
|
|
321
|
+
description: | # Required: the actual rule text
|
|
322
|
+
The rule content goes here. Use YAML block scalar (|)
|
|
323
|
+
for multi-line descriptions. This text is compiled
|
|
324
|
+
directly into the engine's output format.
|
|
325
|
+
priority: 50 # Required: 1-100
|
|
326
|
+
enabled: true # Required: false to skip
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### Priority Guidelines
|
|
330
|
+
|
|
331
|
+
Rules are compiled in priority order (highest first). Use priorities
|
|
332
|
+
to control which rules appear first in the compiled output:
|
|
333
|
+
|
|
334
|
+
- **90+**: Security and compliance rules that must not be overridden
|
|
335
|
+
- **70-89**: Methodology rules (TDD enforcement, review gates)
|
|
336
|
+
- **50-69**: General coding style and conventions
|
|
337
|
+
- **30-49**: Preferences that can be overridden per-project
|
|
338
|
+
- **1-29**: Background context and documentation rules
|
|
339
|
+
|
|
340
|
+
### Sensitive Rules
|
|
341
|
+
|
|
342
|
+
Mark rules as `sensitive: true` to exclude them from API-based analysis
|
|
343
|
+
(e.g., `raictl adopt --api`). Use this for rules containing internal
|
|
344
|
+
processes, infrastructure details, or proprietary methods.
|
|
345
|
+
|
|
346
|
+
### Cross-References Between Rules
|
|
347
|
+
|
|
348
|
+
Rules in different behaviour files can reference each other by
|
|
349
|
+
convention. Group related rules in the same file. Use the `used_in`
|
|
350
|
+
field to document which projects rely on a behaviour.
|
|
351
|
+
|
|
352
|
+
### Validation
|
|
353
|
+
|
|
354
|
+
Always validate after editing:
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
raictl behaviour validate my_rules # Validate specific file
|
|
358
|
+
raictl validate # Validate everything
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
The validator checks:
|
|
362
|
+
|
|
363
|
+
- YAML syntax
|
|
364
|
+
- Required fields present
|
|
365
|
+
- Rule IDs unique within file
|
|
366
|
+
- Priority values in range 1-100
|
|
367
|
+
- Schema compliance
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## Engine System
|
|
372
|
+
|
|
373
|
+
### What Engines Are
|
|
374
|
+
|
|
375
|
+
Engines are plugins that translate your behaviour rules into the native
|
|
376
|
+
configuration format of a specific AI tool. Each engine is a separate
|
|
377
|
+
Ruby gem following the naming convention `rosett-ai-engine-<name>`.
|
|
378
|
+
|
|
379
|
+
### Available Engines
|
|
380
|
+
|
|
381
|
+
| Engine | Gem | Output |
|
|
382
|
+
|--------|-----|--------|
|
|
383
|
+
| Claude Code | rosett-ai-engine-claude | `~/.claude/rules/*.md` |
|
|
384
|
+
| AGENTS.md | rosett-ai-engine-agents-md | `AGENTS.md` in project root |
|
|
385
|
+
| Generic | (built-in) | Plain markdown files |
|
|
386
|
+
|
|
387
|
+
### Using Engines
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
# Detect which AI tools are installed
|
|
391
|
+
raictl engines detect
|
|
392
|
+
|
|
393
|
+
# Compile for a specific engine
|
|
394
|
+
raictl compile --engine claude
|
|
395
|
+
raictl compile --engine agents_md
|
|
396
|
+
|
|
397
|
+
# List all known engines
|
|
398
|
+
raictl engines list
|
|
399
|
+
|
|
400
|
+
# Show current default
|
|
401
|
+
raictl engines status
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
### Installing Engines
|
|
405
|
+
|
|
406
|
+
Engine gems are discovered automatically:
|
|
407
|
+
|
|
408
|
+
```bash
|
|
409
|
+
gem install rosett-ai-engine-claude
|
|
410
|
+
gem install rosett-ai-engine-agents-md
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
After installation, `raictl engines list` will show the new engine.
|
|
414
|
+
|
|
415
|
+
### Writing Your Own Engine
|
|
416
|
+
|
|
417
|
+
See `doc/ENGINE_DEVELOPMENT_GUIDE.md` for the full plugin SDK. An engine
|
|
418
|
+
gem needs:
|
|
419
|
+
|
|
420
|
+
1. A `manifest.yml` declaring capabilities and detection rules
|
|
421
|
+
2. A backend class that renders behaviour rules to the tool's format
|
|
422
|
+
3. A `register.rb` entry point for plugin discovery
|
|
423
|
+
|
|
424
|
+
Minimal engine structure:
|
|
425
|
+
|
|
426
|
+
```text
|
|
427
|
+
rosett-ai-engine-mytools/
|
|
428
|
+
lib/rosett_ai_engine/mytool/
|
|
429
|
+
register.rb # Plugin entry point
|
|
430
|
+
engine.rb # Engine class
|
|
431
|
+
backend.rb # Compilation backend
|
|
432
|
+
manifest.yml # Capabilities declaration
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## Project Configuration
|
|
438
|
+
|
|
439
|
+
### Setting Up a Project
|
|
440
|
+
|
|
441
|
+
Create a `.rosett-ai/` marker in your project root:
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
cd ~/projects/my-app
|
|
445
|
+
raictl init --project
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
This creates:
|
|
449
|
+
|
|
450
|
+
```text
|
|
451
|
+
my-app/
|
|
452
|
+
.rosett-ai/
|
|
453
|
+
config.yml # Project settings
|
|
454
|
+
conf/
|
|
455
|
+
behaviour/ # Project-specific rules
|
|
456
|
+
design/ # Project design docs
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### Project Config File
|
|
460
|
+
|
|
461
|
+
`.rosett-ai/config.yml` controls project-level settings:
|
|
462
|
+
|
|
463
|
+
```yaml
|
|
464
|
+
---
|
|
465
|
+
project_name: my-app
|
|
466
|
+
default_engine: claude
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
### Scope Override Rules
|
|
470
|
+
|
|
471
|
+
Project-level behaviours override global behaviours with the same
|
|
472
|
+
filename. If both `~/.config/rosett-ai/conf/behaviour/security.yml`
|
|
473
|
+
and `.rosett-ai/conf/behaviour/security.yml` exist, the project
|
|
474
|
+
version takes precedence.
|
|
475
|
+
|
|
476
|
+
To compile only global rules (ignoring project scope):
|
|
477
|
+
|
|
478
|
+
```bash
|
|
479
|
+
raictl compile --global
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### Environment Variables
|
|
483
|
+
|
|
484
|
+
| Variable | Purpose | Default |
|
|
485
|
+
|----------|---------|---------|
|
|
486
|
+
| `RAI_ORIGINAL_PWD` | Preserves working directory | `Dir.pwd` |
|
|
487
|
+
| `RAI_ENGINE_PATH` | Custom engine search paths (colon-separated) | None |
|
|
488
|
+
| `RAI_LOG_LEVEL` | Log verbosity: DEBUG, INFO, WARN, ERROR | WARN |
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
## Troubleshooting
|
|
493
|
+
|
|
494
|
+
### Command not found after installation
|
|
495
|
+
|
|
496
|
+
The symlink may be missing. Recreate it:
|
|
497
|
+
|
|
498
|
+
```bash
|
|
499
|
+
sudo ln -sf /opt/rosett-ai/bin/raictl /usr/local/bin/raictl
|
|
500
|
+
sudo ln -sf /opt/rosett-ai/bin/raictl /usr/local/bin/rai
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
### Engine not found when compiling
|
|
504
|
+
|
|
505
|
+
Install the engine gem:
|
|
506
|
+
|
|
507
|
+
```bash
|
|
508
|
+
gem install rosett-ai-engine-claude
|
|
509
|
+
raictl engines detect # Verify detection
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
### Validation errors in behaviour files
|
|
513
|
+
|
|
514
|
+
Run the validator with the specific file name:
|
|
515
|
+
|
|
516
|
+
```bash
|
|
517
|
+
raictl behaviour validate my_rules
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
Common causes: missing `name` or `description` field, rule priority
|
|
521
|
+
outside 1-100 range, duplicate rule IDs, invalid YAML syntax.
|
|
522
|
+
|
|
523
|
+
### Permission errors
|
|
524
|
+
|
|
525
|
+
```bash
|
|
526
|
+
sudo chown -R $(whoami) ~/.config/rosett-ai/
|
|
527
|
+
chmod 755 ~/.config/rosett-ai/
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
### Diagnostics
|
|
531
|
+
|
|
532
|
+
Run the built-in diagnostic tool:
|
|
533
|
+
|
|
534
|
+
```bash
|
|
535
|
+
raictl doctor
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
This checks: Ruby version, gem dependencies, engine detection, file
|
|
539
|
+
permissions, cache health, D-Bus availability, and legacy config paths.
|
|
540
|
+
|
|
541
|
+
For machine-readable output (CI integration):
|
|
542
|
+
|
|
543
|
+
```bash
|
|
544
|
+
raictl doctor --format json
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
### Migrating from nncc
|
|
548
|
+
|
|
549
|
+
If you previously used the NeatNerds Code Companion (nncc), migrate
|
|
550
|
+
your configuration:
|
|
551
|
+
|
|
552
|
+
```bash
|
|
553
|
+
raictl migrate --dry-run # Preview changes
|
|
554
|
+
raictl migrate # Migrate ~/.config/nncc/ to ~/.config/rosett-ai/
|
|
555
|
+
raictl migrate --workspace ~/projects # Migrate .nncc/ project markers
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
Migration copies files (originals preserved with `.migrated-*` suffix).
|
|
559
|
+
|
|
560
|
+
### Reporting Bugs
|
|
561
|
+
|
|
562
|
+
File issues at the project repository or contact: query@neatnerds.be
|
|
563
|
+
|
|
564
|
+
---
|
|
565
|
+
|
|
566
|
+
## Exit Codes
|
|
567
|
+
|
|
568
|
+
| Code | Meaning |
|
|
569
|
+
|------|---------|
|
|
570
|
+
| 0 | Success |
|
|
571
|
+
| 1 | Warning (non-fatal issues) |
|
|
572
|
+
| 2 | Error (operation failed) |
|
|
573
|
+
|
|
574
|
+
---
|
|
575
|
+
|
|
576
|
+
## Further Reading
|
|
577
|
+
|
|
578
|
+
- `doc/QUICK_START.md` — 5-minute getting started guide
|
|
579
|
+
- `doc/BEHAVIOUR.md` — Detailed behaviour system documentation
|
|
580
|
+
- `doc/ENGINES.md` — Engine architecture deep dive
|
|
581
|
+
- `doc/ENGINE_DEVELOPMENT_GUIDE.md` — Plugin SDK for engine authors
|
|
582
|
+
- `doc/ARCHITECTURE.md` — System architecture overview
|
|
583
|
+
- `doc/CONFIGURATION.md` — Configuration reference
|
|
584
|
+
- `INSTALL.md` — Installation guide
|
|
585
|
+
- `AI-DISCLOSURE.md` — AI governance policy
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# AI-Generated Test Review Checklist
|
|
2
|
+
|
|
3
|
+
Every AI-generated test must pass all 11 checks before acceptance.
|
|
4
|
+
Reviewers (human or AI) must verify each point explicitly.
|
|
5
|
+
|
|
6
|
+
## Checklist
|
|
7
|
+
|
|
8
|
+
### 1. No tautological assertions
|
|
9
|
+
|
|
10
|
+
The test expectation must not reimplement the code under test.
|
|
11
|
+
|
|
12
|
+
**Bad:** `expect(result).to eq(input.select(&:enabled?).count)`
|
|
13
|
+
**Good:** `expect(result).to eq(3)`
|
|
14
|
+
|
|
15
|
+
### 2. Concrete expected values
|
|
16
|
+
|
|
17
|
+
Expectations must use literal, predetermined values.
|
|
18
|
+
|
|
19
|
+
**Bad:** `expect(output).to include(name)`
|
|
20
|
+
**Good:** `expect(output).to include('test_behaviour')`
|
|
21
|
+
|
|
22
|
+
### 3. Mocks only at boundaries
|
|
23
|
+
|
|
24
|
+
Mocking is only permitted for file system, network, shell commands,
|
|
25
|
+
and external service calls. Internal collaborators must be real.
|
|
26
|
+
|
|
27
|
+
**Bad:** `allow(compiler).to receive(:render).and_return('...')`
|
|
28
|
+
**Good:** `allow(File).to receive(:read).and_return(yaml_content)`
|
|
29
|
+
|
|
30
|
+
### 4. Unit under test never mocked
|
|
31
|
+
|
|
32
|
+
The object being tested must never have its own methods stubbed.
|
|
33
|
+
|
|
34
|
+
**Bad:** `allow(subject).to receive(:validate!).and_return(true)`
|
|
35
|
+
**Good:** Test the actual `validate!` method with real input.
|
|
36
|
+
|
|
37
|
+
### 5. Both positive and negative assertions
|
|
38
|
+
|
|
39
|
+
Tests must assert what IS in the output AND what is NOT.
|
|
40
|
+
|
|
41
|
+
**Bad:** Only checking `expect(result).to include('enabled_rule')`
|
|
42
|
+
**Good:** Also checking `expect(result).not_to include('disabled_rule')`
|
|
43
|
+
|
|
44
|
+
### 6. Edge cases: empty, nil, boundary values
|
|
45
|
+
|
|
46
|
+
Every public method must have tests for:
|
|
47
|
+
|
|
48
|
+
- Empty input (`[]`, `{}`, `""`)
|
|
49
|
+
- Nil input
|
|
50
|
+
- Boundary values (0, max, off-by-one)
|
|
51
|
+
|
|
52
|
+
### 7. Error cases tested
|
|
53
|
+
|
|
54
|
+
Tests must verify that invalid input raises the correct exception
|
|
55
|
+
with an informative message.
|
|
56
|
+
|
|
57
|
+
**Good:**
|
|
58
|
+
|
|
59
|
+
```ruby
|
|
60
|
+
expect { subject.load_file('/nonexistent') }
|
|
61
|
+
.to raise_error(RosettAi::ValidationError, /not found/)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 8. No implementation coupling
|
|
65
|
+
|
|
66
|
+
Tests must verify outcomes (what the code produces), not call
|
|
67
|
+
sequences (how the code does it internally).
|
|
68
|
+
|
|
69
|
+
**Bad:** `expect(subject).to have_received(:select).with(...)`
|
|
70
|
+
**Good:** `expect(subject.compile(input)).to contain_exactly(...)`
|
|
71
|
+
|
|
72
|
+
### 9. Behaviour-focused descriptions
|
|
73
|
+
|
|
74
|
+
Test descriptions must describe observable behaviour, not
|
|
75
|
+
implementation steps.
|
|
76
|
+
|
|
77
|
+
**Bad:** `it 'calls select then map on the rules array'`
|
|
78
|
+
**Good:** `it 'includes only enabled rules in the output'`
|
|
79
|
+
|
|
80
|
+
### 10. Mutant score >= 85%
|
|
81
|
+
|
|
82
|
+
After tests are written, run `bundle exec mutant run` against the
|
|
83
|
+
class. The mutation score must be at least 85% for established code
|
|
84
|
+
and 95% for security-critical paths.
|
|
85
|
+
|
|
86
|
+
### 11. No redundant tests
|
|
87
|
+
|
|
88
|
+
Each test must kill at least one unique mutation that no other test
|
|
89
|
+
kills. If removing a test does not decrease the mutation score,
|
|
90
|
+
the test is redundant and should be removed or strengthened.
|
|
91
|
+
|
|
92
|
+
## Usage
|
|
93
|
+
|
|
94
|
+
When reviewing a test file (human or AI review), check each point:
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
[ ] 1. No tautological assertions
|
|
98
|
+
[ ] 2. Concrete expected values
|
|
99
|
+
[ ] 3. Mocks only at boundaries
|
|
100
|
+
[ ] 4. Unit under test never mocked
|
|
101
|
+
[ ] 5. Both positive and negative assertions
|
|
102
|
+
[ ] 6. Edge cases covered
|
|
103
|
+
[ ] 7. Error cases tested
|
|
104
|
+
[ ] 8. No implementation coupling
|
|
105
|
+
[ ] 9. Behaviour-focused descriptions
|
|
106
|
+
[ ] 10. Mutant score >= 85%
|
|
107
|
+
[ ] 11. No redundant tests
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Any check that fails must be fixed before the test is accepted.
|