Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,19 @@ below.
| Go (`.go`) | ✅ | ✅ | ✅ | ✅ |
| PHP / PHTML (`.php`, `.inc`, `.phtml`) | ✅ | ✅ | ✅ | ✅ |
| C# (`.cs`), Rust (`.rs`) | ✅ | ✅ | ✅ | — |
| TSX (`.tsx`) | ✅ | ✅ | ✅ | — |
| Bash / Shell, C, C++, CSS, Haskell, HTML, JSON, Ruby, Scala | ✅ | ✅ | generic | — |
| TSX (`.tsx`) | ✅ | ✅ | ✅ | framework-dependent |
| Ruby (`.rb`) | ✅ | ✅ | generic | framework-dependent |
| Bash / Shell, C, C++, CSS, Haskell, HTML, JSON, Scala | ✅ | ✅ | generic | — |
| Kotlin, Swift, Lua, Perl, COBOL, Objective-C, SQL, R, SCSS, Vue/Svelte SFCs, YAML/TOML/XML, Markdown/RST, and other text | ✅ | fallback | generic | — |

`generic` means language-aware or text chunking without a dedicated semantic RAG
query. TSX uses the TypeScript RAG parser/query compatibility path but is not
included in the TypeScript repository-fact session. C, C++, and Ruby ship RAG
parser packages but currently have no dedicated semantic query, so the table
reports their resulting generic chunk behavior rather than package availability.
`framework-dependent` means the base language tier does not emit those facts,
but a selected framework plugin does. Ember can additionally enrich conservative
`.hbs` template structure; this is not a general Handlebars language plugin.

Exact plugin facts are bounded, typed declarations and relationships. JavaScript,
TypeScript, and PHP maintain repository-scoped resolution sessions; Go, Java, and
Expand All @@ -135,9 +139,15 @@ replaces model review with a preset defect-rule engine.
| Plugin | Requires | Deterministic Context |
| :------------- | :--------------- | :--------------------------------------------------------------------------------------------------------------------------------------------- |
| Spring | Java | Components, combined controller routes, dependency injection, beans, configuration, and Spring Data repository inheritance |
| Quarkus | Java | CDI beans/injection, JAX-RS resources/routes, configuration-property uses and key/profile metadata, schedules, channels, and Panache topology |
| FastAPI | Python | Applications, routers and route prefixes, HTTP/WebSocket routes, `Depends`, middleware, lifespan handlers, and exception handlers |
| Django | Python | AppConfig, installed apps/middleware/root URL configuration, URL paths/includes, views, models/relations, middleware hooks, and signal receivers |
| Ember.js | `json` (auto-detected via `package.json`) | Router maps, route/controller/component/service/model roles, service injection, Ember Data relationships, and `.hbs` ownership/invocations |
| Express.js | `json` (auto-detected via `package.json`) | Applications and routers, HTTP routes, router mounts, middleware, and error-handler topology from JS/TS source |
| Next.js | `json` (auto-detected via `package.json`) | File-system pages and routes, HTTP handlers, layouts, middleware, client/server boundaries, Server Actions, and data loaders from JS/TS source |
| Magento 2 | PHP | Module topology, DI and plugins, events, routes and ACLs, layouts, blocks, templates and themes, Web APIs, queues, schemas, and related source |
| Hyvä | Magento 2 | ViewModel registry, layout/template, Alpine state/event, REST/Web API, DI, and bounded PHP call-chain relations |
| Ruby on Rails | Ruby | Routes/mounts, controllers/actions, models, associations/callbacks, and Active Job queues, `perform`, retry, and discard declarations |
| Data contracts | Language-neutral | Exact GraphQL, Protocol Buffers, JSON Schema, and explicit contract-path field declarations and references across languages |

Plugins are selected automatically from bounded facts at the pinned repository
Expand Down
21 changes: 21 additions & 0 deletions analysis-plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,27 @@ approval. This behavior lives entirely under `languages/javascript`; generic RAG
and inference hosts only consume neutral snapshots, packets, and validation
results.

Framework-owned indexing is also packaged inside this boundary. Django extracts
AppConfig, installed apps, middleware and root URL configuration, URL paths and
includes, views, models/relations, middleware hooks, and signal receivers from
Python. Quarkus extracts CDI beans/injection, JAX-RS resources/routes,
configuration-property uses and application-property key/profile metadata,
schedules, reactive channels, and Panache topology from Java. Ember.js extracts
router maps, route/controller/component/service/model roles, service injection,
Ember Data relationships, and conservative `.hbs` ownership/invocations;
Express.js extracts routing and
middleware topology, and Next.js extracts file-system routes, boundaries, data
loaders, and Server Actions from JavaScript-family source; Rails extracts routes,
mounts, controllers/actions, models, associations, callbacks, and Active Job
queue/perform/retry/discard declarations from Ruby. These plugins use bounded repository
markers and exact source constructs, abstain when a construct is dynamic or
ambiguous, and add no model or embedding call. Their structural facts can refute
a matching absence claim, but topology alone is not positive proof of a defect.
Full selection may under-detect when optional marker acquisition is bounded or
unavailable. Incremental selection retains the last reliable content for a
changed marker that cannot be inspected; a successfully read marker that stops
matching remains an authoritative plugin-set change and requires a full reindex.

Graph-fact attributes whose keys start with
`retrievalIdentifier:` are a neutral exact-retrieval hint. The value nominates
an identifier inside a fact's already-proven related paths; generic RAG may
Expand Down
10 changes: 10 additions & 0 deletions analysis-plugins/contracts/fixtures/plugin-globs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{"glob": "*.gemspec", "path": "blog.gemspec", "matches": true},
{"glob": "*.gemspec", "path": "nested/blog.gemspec", "matches": false},
{"glob": "lib/**/engine.rb", "path": "lib/blog/engine.rb", "matches": true},
{"glob": "lib/**/engine.rb", "path": "vendor/lib/blog/engine.rb", "matches": false},
{"glob": "**/*.java", "path": "src/main/App.java", "matches": true},
{"glob": "**/*.java", "path": "App.java", "matches": false},
{"glob": "app/?/page.tsx", "path": "app/a/page.tsx", "matches": true},
{"glob": "app/?/page.tsx", "path": "app/ab/page.tsx", "matches": false}
]
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
package org.rostilos.codecrow.plugins;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.regex.Pattern;

public final class PluginGlob {
private static final int CACHE_LIMIT = 512;
private static final Map<String, Pattern> COMPILED = new LinkedHashMap<>(
CACHE_LIMIT, 0.75f, true) {
@Override
protected boolean removeEldestEntry(Map.Entry<String, Pattern> eldest) {
return size() > CACHE_LIMIT;
}
};

private PluginGlob() {
}

public static boolean matches(String glob, String path) {
return compiled(glob).matcher(path).matches();
}

private static Pattern compiled(String glob) {
synchronized (COMPILED) {
Pattern cached = COMPILED.get(glob);
if (cached != null) return cached;
Pattern created = compile(glob);
COMPILED.put(glob, created);
return created;
}
}

private static Pattern compile(String glob) {
StringBuilder regex = new StringBuilder("^");
for (int index = 0; index < glob.length(); index++) {
char character = glob.charAt(index);
Expand All @@ -24,6 +49,6 @@ public static boolean matches(String glob, String path) {
regex.append(Pattern.quote(String.valueOf(character)));
}
}
return Pattern.compile(regex.append('$').toString()).matcher(path).matches();
return Pattern.compile(regex.append('$').toString());
}
}
Loading
Loading