Skip to main content

claude_native/rules/project_specific/
mod.rs

1pub mod monorepo;
2pub mod micro_repo;
3pub mod mobile;
4pub mod frontend;
5pub mod backend;
6pub mod iac;
7pub mod serverless;
8pub mod ml;
9pub mod codegen;
10pub mod polyglot;
11pub mod legacy;
12pub mod doc_site;
13pub mod game_dev;
14
15use crate::rules::Rule;
16
17/// Collect all project-specific rules
18pub fn project_specific_rules() -> Vec<Box<dyn Rule>> {
19    vec![
20        // Monorepo (M1-M7)
21        Box::new(monorepo::RootClaudeMdThin),
22        Box::new(monorepo::PerPackageClaudeMd),
23        Box::new(monorepo::WorkspaceOutputsIgnored),
24        Box::new(monorepo::PathScopedRulesPerPackage),
25        Box::new(monorepo::PerPackageTestCommands),
26        Box::new(monorepo::WorkspaceDepsNavigable),
27        Box::new(monorepo::SharedToolingConfig),
28        // Micro-repo (μ1-μ4)
29        Box::new(micro_repo::ReadmeIsPrimary),
30        Box::new(micro_repo::ComprehensiveTests),
31        Box::new(micro_repo::ManifestComplete),
32        Box::new(micro_repo::ExamplesExist),
33        // Mobile (MOB1-MOB5)
34        Box::new(mobile::PlatformBuildDirsIgnored),
35        Box::new(mobile::GeneratedCodeIgnored),
36        Box::new(mobile::PlatformCommands),
37        Box::new(mobile::BinaryAssetsExcluded),
38        Box::new(mobile::LightweightVerification),
39        // Frontend (FE1-FE4)
40        Box::new(frontend::BuildCacheIgnored),
41        Box::new(frontend::SourceMapsIgnored),
42        Box::new(frontend::EnvExampleExists),
43        Box::new(frontend::TypeCheckBeforeBuild),
44        // Backend (BE1-BE6)
45        Box::new(backend::MigrationHistoryManageable),
46        Box::new(backend::DatabaseFilesIgnored),
47        Box::new(backend::VirtualEnvsIgnored),
48        Box::new(backend::DataAccessDocumented),
49        Box::new(backend::ApiSpecExists),
50        Box::new(backend::LogFilesIgnored),
51        // IaC (IAC1-IAC5)
52        Box::new(iac::StateFilesBlocked),
53        Box::new(iac::PlanOutputFiltered),
54        Box::new(iac::ProviderCacheIgnored),
55        Box::new(iac::SecretsExternal),
56        Box::new(iac::ModuleConventions),
57        // Serverless (SLS1-SLS4)
58        Box::new(serverless::DeployArtifactsIgnored),
59        Box::new(serverless::FunctionsFocused),
60        Box::new(serverless::TestEventsExist),
61        Box::new(serverless::NoCloudCreds),
62        // ML (DS1-DS5)
63        Box::new(ml::NotebooksNotPrimary),
64        Box::new(ml::ModelFilesIgnored),
65        Box::new(ml::DatasetFilesIgnored),
66        Box::new(ml::ExperimentWorkflowDocumented),
67        Box::new(ml::RequirementsPinned),
68        // Codegen (GEN1-GEN4)
69        Box::new(codegen::GeneratedDirsIgnored),
70        Box::new(codegen::EditSpecsNotGenerated),
71        Box::new(codegen::RegenCommandDocumented),
72        Box::new(codegen::AutoRegenHook),
73        // Polyglot (POLY1-POLY4)
74        Box::new(polyglot::PerLanguageClaudeMd),
75        Box::new(polyglot::RootClaudeMdAgnostic),
76        Box::new(polyglot::IndependentBuildTest),
77        Box::new(polyglot::AllRuntimesIgnored),
78        // Legacy (LEG1-LEG5)
79        Box::new(legacy::DocumentsTheMess),
80        Box::new(legacy::CorrectPatternsIdentified),
81        Box::new(legacy::TestsForModifiedCode),
82        Box::new(legacy::DeadCodeFlagged),
83        Box::new(legacy::MegaFilesDocumented),
84        // Doc Site (DOC1-DOC3)
85        Box::new(doc_site::BuildOutputIgnored),
86        Box::new(doc_site::MarkdownSourceFocus),
87        Box::new(doc_site::NavigationDocumented),
88        // Game Dev (GAME1-GAME4)
89        Box::new(game_dev::BinaryAssetsIgnored),
90        Box::new(game_dev::EditorMetadataIgnored),
91        Box::new(game_dev::ScriptsArePrimary),
92        Box::new(game_dev::GameLogicTests),
93    ]
94}