This commit is contained in:
Ingo Schnabel
2026-06-13 15:37:12 +02:00
parent 790972cc78
commit ac2eb97979
44 changed files with 328 additions and 117 deletions

44
.idea/GrepConsole.xml generated Normal file
View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GrepConsole">
<option name="pinnedGrepConsolesState">
<PinnedGrepConsolesState>
<option name="map">
<map>
<entry>
<key>
<RunConfigurationRef>
<option name="icon" value="maven.svg)" />
<option name="name" value="agenticcode [clean,install]" />
</RunConfigurationRef>
</key>
<value>
<Pins>
<option name="pins">
<list>
<Pin>
<option name="consoleUUID" value="4c0d0d03-deae-44fc-9114-0fd5c13b96d1" />
<option name="contentType" value="ConsoleContent" />
<option name="grepCompositeModel">
<GrepCompositeModel>
<option name="models">
<list>
<GrepModel>
<option name="expression" value="" />
</GrepModel>
</list>
</option>
</GrepCompositeModel>
</option>
</Pin>
</list>
</option>
</Pins>
</value>
</entry>
</map>
</option>
</PinnedGrepConsolesState>
</option>
</component>
</project>

View File

@@ -3,6 +3,7 @@
<component name="CheckStyle-IDEA" serialisationVersion="2">
<checkstyleVersion>13.5.0</checkstyleVersion>
<scanScope>JavaOnly</scanScope>
<scanBeforeCheckin>true</scanBeforeCheckin>
<option name="thirdPartyClasspath" />
<option name="activeLocationIds" />
<option name="locations">

27
.idea/compiler.xml generated
View File

@@ -30,15 +30,24 @@
<entry name="$USER_HOME$/.m2/my-repo/com/google/auto/service/auto-service-annotations/1.0.1/auto-service-annotations-1.0.1.jar" />
<entry name="$USER_HOME$/.m2/my-repo/org/jspecify/jspecify/1.0.0/jspecify-1.0.0.jar" />
<entry name="$USER_HOME$/.m2/my-repo/javax/inject/javax.inject/1/javax.inject-1.jar" />
<entry name="$USER_HOME$/.m2/my-repo/com/uber/nullaway/nullaway/0.13.1/nullaway-0.13.1.jar" />
<entry name="$USER_HOME$/.m2/my-repo/org/checkerframework/dataflow-nullaway/3.53.0/dataflow-nullaway-3.53.0.jar" />
</processorPath>
<module name="ac-mvn-plugins" />
<module name="ac-parser-natural" />
<module name="ac-neo4j-store" />
<module name="ac-parser-core" />
<module name="ac-code-server" />
<module name="ac-parser-java" />
<module name="ac-common" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="agenticcode-parent" target="1.5" />
<module name="api-server" target="21" />
<module name="code-server" target="21" />
<module name="common" target="21" />
<module name="mvn-ac-plugins" target="21" />
<module name="neo4j-store" target="21" />
<module name="package-info-maven-plugin" target="21" />
<module name="parser-core" target="21" />
<module name="parser-java" target="21" />
<module name="parser-natural" target="21" />
@@ -46,13 +55,13 @@
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="api-server" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -Xplugin:ErrorProne -Xpkginfo:always" />
<module name="common" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -Xplugin:ErrorProne -Xpkginfo:always" />
<module name="neo4j-store" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -Xplugin:ErrorProne -Xpkginfo:always" />
<module name="package-info-maven-plugin" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -Xplugin:ErrorProne -Xpkginfo:always" />
<module name="parser-core" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -Xplugin:ErrorProne -Xpkginfo:always" />
<module name="parser-java" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -Xplugin:ErrorProne -Xpkginfo:always" />
<module name="parser-natural" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -Xplugin:ErrorProne -Xpkginfo:always" />
<module name="ac-code-server" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -XDaddTypeAnnotationsToSymbol=true &quot;-Xplugin:ErrorProne -Xep:NullAway:ERROR&#10; -XepOpt:NullAway:AnnotatedPackages=com.agenticcode -XepOpt:NullAway:JSpecifyMode=true&quot; -Xpkginfo:always" />
<module name="ac-common" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -XDaddTypeAnnotationsToSymbol=true &quot;-Xplugin:ErrorProne -Xep:NullAway:ERROR&#10; -XepOpt:NullAway:AnnotatedPackages=com.agenticcode -XepOpt:NullAway:JSpecifyMode=true&quot; -Xpkginfo:always" />
<module name="ac-mvn-plugins" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -XDaddTypeAnnotationsToSymbol=true &quot;-Xplugin:ErrorProne -Xep:NullAway:ERROR&#10; -XepOpt:NullAway:AnnotatedPackages=com.agenticcode -XepOpt:NullAway:JSpecifyMode=true&quot; -Xpkginfo:always" />
<module name="ac-neo4j-store" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -XDaddTypeAnnotationsToSymbol=true &quot;-Xplugin:ErrorProne -Xep:NullAway:ERROR&#10; -XepOpt:NullAway:AnnotatedPackages=com.agenticcode -XepOpt:NullAway:JSpecifyMode=true&quot; -Xpkginfo:always" />
<module name="ac-parser-core" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -XDaddTypeAnnotationsToSymbol=true &quot;-Xplugin:ErrorProne -Xep:NullAway:ERROR&#10; -XepOpt:NullAway:AnnotatedPackages=com.agenticcode -XepOpt:NullAway:JSpecifyMode=true&quot; -Xpkginfo:always" />
<module name="ac-parser-java" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -XDaddTypeAnnotationsToSymbol=true &quot;-Xplugin:ErrorProne -Xep:NullAway:ERROR&#10; -XepOpt:NullAway:AnnotatedPackages=com.agenticcode -XepOpt:NullAway:JSpecifyMode=true&quot; -Xpkginfo:always" />
<module name="ac-parser-natural" options="-parameters -XDcompilePolicy=simple --should-stop=ifError=FLOW -XDaddTypeAnnotationsToSymbol=true &quot;-Xplugin:ErrorProne -Xep:NullAway:ERROR&#10; -XepOpt:NullAway:AnnotatedPackages=com.agenticcode -XepOpt:NullAway:JSpecifyMode=true&quot; -Xpkginfo:always" />
</option>
</component>
</project>

28
.idea/encodings.xml generated
View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/api-server/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/api-server/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/common/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/neo4j-store/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/neo4j-store/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/package-info-maven-plugin/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/package-info-maven-plugin/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/parser-core/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/parser-core/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/parser-java/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/parser-java/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/parser-natural/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/parser-natural/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-code-server/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-code-server/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-common/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-neo4j-store/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-neo4j-store/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-mvn-plugins/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-mvn-plugins/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-parser-core/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-parser-core/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-parser-java/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-parser-java/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-parser-natural/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ac-parser-natural/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>

View File

@@ -0,0 +1,31 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="AssertWithSideEffects" enabled="true" level="ERROR" enabled_by_default="true" editorAttributes="ERRORS_ATTRIBUTES" />
<inspection_tool class="CapturingCleaner" enabled="true" level="WARNING" enabled_by_default="true" editorAttributes="WARNING_ATTRIBUTES" />
<inspection_tool class="DataFlowIssue" enabled="true" level="ERROR" enabled_by_default="true" editorAttributes="ERRORS_ATTRIBUTES">
<option name="SUGGEST_NULLABLE_ANNOTATIONS" value="false" />
<option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" />
</inspection_tool>
<inspection_tool class="IgnoreResultOfCall" enabled="true" level="WARNING" enabled_by_default="true" editorAttributes="WARNING_ATTRIBUTES">
<option name="m_reportAllNonLibraryCalls" value="false" />
<option name="callCheckString" value="java.io.File,.*,java.io.InputStream,read|skip|available|markSupported,java.io.Reader,read|skip|ready|markSupported,java.lang.AbstractStringBuilder,capacity|codePointAt|codePointBefore|codePointCount|indexOf|lastIndexOf|offsetByCodePoints|substring|subSequence,java.lang.Boolean,.*,java.lang.Byte,.*,java.lang.Character,.*,java.lang.Double,.*,java.lang.Float,.*,java.lang.Integer,.*,java.lang.Long,.*,java.lang.Math,.*,java.lang.Object,equals|hashCode|toString,java.lang.Short,.*,java.lang.StrictMath,.*,java.lang.String,.*,java.lang.Thread,interrupted,java.math.BigDecimal,.*,java.math.BigInteger,.*,java.net.InetAddress,.*,java.net.URI,.*,java.nio.channels.AsynchronousChannelGroup,.*,java.nio.channels.Channel,isOpen,java.nio.channels.FileChannel,open|map|lock|tryLock|write,java.nio.channels.ScatteringByteChannel,read,java.nio.channels.SocketChannel,open|socket|isConnected|isConnectionPending,java.util.Arrays,.*,java.util.Collections,(?!addAll).*,java.util.List,of,java.util.Map,of|ofEntries|entry,java.util.Set,of,java.util.UUID,.*,java.util.concurrent.BlockingQueue,offer|remove,java.util.concurrent.CountDownLatch,await|getCount,java.util.concurrent.ExecutorService,awaitTermination|isShutdown|isTerminated,java.util.concurrent.ForkJoinPool,awaitQuiescence,java.util.concurrent.Semaphore,tryAcquire|availablePermits|isFair|hasQueuedThreads|getQueueLength|getQueuedThreads,java.util.concurrent.locks.Condition,await|awaitNanos|awaitUntil,java.util.concurrent.locks.Lock,tryLock|newCondition,java.util.regex.Matcher,pattern|toMatchResult|start|end|group|groupCount|matches|find|lookingAt|quoteReplacement|replaceAll|replaceFirst|regionStart|regionEnd|hasTransparentBounds|hasAnchoringBounds|hitEnd|requireEnd,java.util.regex.Pattern,.*,java.util.stream.BaseStream,.*,java.util.stream.DoubleStream,.*,java.util.stream.IntStream,.*,java.util.stream.LongStream,.*,java.util.stream.Stream,.*" />
</inspection_tool>
<inspection_tool class="ImplicitArrayToString" enabled="true" level="ERROR" enabled_by_default="true" editorAttributes="ERRORS_ATTRIBUTES" />
<inspection_tool class="MathRoundingWithIntArgument" enabled="true" level="ERROR" enabled_by_default="true" editorAttributes="ERRORS_ATTRIBUTES" />
<inspection_tool class="NotNullFieldNotInitialized" enabled="true" level="ERROR" enabled_by_default="true" editorAttributes="ERRORS_ATTRIBUTES" />
<inspection_tool class="NullableProblems" enabled="true" level="ERROR" enabled_by_default="true" editorAttributes="ERRORS_ATTRIBUTES">
<option name="REPORT_NULLABLE_METHOD_OVERRIDES_NOTNULL" value="true" />
<option name="REPORT_NOT_ANNOTATED_METHOD_OVERRIDES_NOTNULL" value="true" />
<option name="REPORT_NOTNULL_PARAMETER_OVERRIDES_NULLABLE" value="true" />
<option name="REPORT_NOT_ANNOTATED_PARAMETER_OVERRIDES_NOTNULL" value="true" />
<option name="REPORT_NOT_ANNOTATED_GETTER" value="true" />
<option name="REPORT_NOT_ANNOTATED_SETTER_PARAMETER" value="true" />
<option name="REPORT_ANNOTATION_NOT_PROPAGATED_TO_OVERRIDERS" value="true" />
<option name="REPORT_NULLS_PASSED_TO_NON_ANNOTATED_METHOD" value="true" />
</inspection_tool>
<inspection_tool class="OptionalOfNullableMisuse" enabled="true" level="ERROR" enabled_by_default="true" editorAttributes="ERRORS_ATTRIBUTES" />
<inspection_tool class="SameParameterValue" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnsupportedChronoFieldUnitCall" enabled="true" level="ERROR" enabled_by_default="true" editorAttributes="ERRORS_ATTRIBUTES" />
</profile>
</component>

11
.idea/misc.xml generated
View File

@@ -2,8 +2,15 @@
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="Quarkus" url="file://$PROJECT_DIR$/api-server" />
<file type="Quarkus" url="file://$PROJECT_DIR$/neo4j-store" />
<file type="Quarkus" url="file://$PROJECT_DIR$/ac-code-server" />
<file type="Quarkus" url="file://$PROJECT_DIR$/ac-neo4j-store" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_25" default="true" project-jdk-name="temurin-25" project-jdk-type="JavaSDK" />
</project>

View File

@@ -34,18 +34,18 @@ Parser Layer → Unified AST → Neo4j Graph DB → Enrichment → Agent
## Tech Stack
| Component | Technology |
|---|---|
| Server | Quarkus (latest stable) |
| Language | Java 21 (Virtual Threads enabled) |
| Graph DB | Neo4j 5.x (via neo4j-java-driver) |
| REST | Quarkus RESTEasy Reactive (JAX-RS) |
| JSON | Jackson (quarkus-jackson) |
| Natural Parser | Custom impl in `parser-natural` module |
| Java Parser | JavaParser (com.github.javaparser) |
| Tests | JUnit 5 + RestAssured + Testcontainers (Neo4j) |
| Build | Maven (multi-module) |
| Config | `application.properties` (dev/prod profiles) |
| Component | Technology |
|----------------|------------------------------------------------|
| Server | Quarkus (latest stable) |
| Language | Java 21 (Virtual Threads enabled) |
| Graph DB | Neo4j 5.x (via neo4j-java-driver) |
| REST | Quarkus RESTEasy Reactive (JAX-RS) |
| JSON | Jackson (quarkus-jackson) |
| Natural Parser | Custom impl in `ac-parser-natural` module |
| Java Parser | JavaParser (com.github.javaparser) |
| Tests | JUnit 5 + RestAssured + Testcontainers (Neo4j) |
| Build | Maven (multi-module) |
| Config | `application.properties` (dev/prod profiles) |
## Project Structure
@@ -53,7 +53,7 @@ Parser Layer → Unified AST → Neo4j Graph DB → Enrichment → Agent
agenticcode/
├── CLAUDE.md
├── pom.xml # Root POM (multi-module)
├── api-server/ # Quarkus application
├── ac-code-server/ # Quarkus application
│ ├── src/main/java/de/agenticcode/
│ │ ├── api/ # JAX-RS Resources
│ │ ├── service/ # Business logic
@@ -61,15 +61,15 @@ agenticcode/
│ │ └── mcp/ # MCP tool endpoints
│ └── src/main/resources/
│ └── application.properties
├── parser-natural/ # Natural parser module
├── ac-parser-natural/ # Natural parser module
│ └── src/main/java/de/agenticcode/parser/natural/
├── parser-java/ # Java parser module
├── ac-parser-java/ # Java parser module
│ └── src/main/java/de/agenticcode/parser/java/
├── parser-core/ # Shared AST schema + interfaces
├── ac-parser-core/ # Shared AST schema + interfaces
│ └── src/main/java/de/agenticcode/ast/
│ ├── model/ # AstNode, AstEdge, NodeType, EdgeType
│ └── spi/ # LanguageParser interface
├── neo4j-store/ # Neo4j persistence + queries
├── ac-neo4j-store/ # Neo4j persistence + queries
│ └── src/main/java/de/agenticcode/graph/
└── docs/
├── ast-schema.md # Neo4j node/edge types with Cypher examples
@@ -85,7 +85,7 @@ agenticcode/
mvn clean install
# Dev mode (hot reload)
cd api-server && mvn quarkus:dev
cd ac-code-server && mvn quarkus:dev
# Native build (GraalVM)
mvn package -Pnative
@@ -94,7 +94,7 @@ mvn package -Pnative
mvn test
# Test a single module
mvn test -pl parser-natural
mvn test -pl ac-parser-natural
```
Requirements: Java 21+, Maven 3.9+, Docker (for Testcontainers).
@@ -128,8 +128,9 @@ docker run -p 7474:7474 -p 7687:7687 \
- Implement health checks: `@Liveness`, `@Readiness`
### AST / Graph
- Node types are defined as `enum NodeType` in `parser-core` — never use raw strings
- Edge types are defined as `enum EdgeType` in `parser-core` — never use raw strings
- Node types are defined as `enum NodeType` in `ac-parser-core` — never use raw strings
- Edge types are defined as `enum EdgeType` in `ac-parser-core` — never use raw strings
- Every node must have: `id` (UUID), `sourceFile`, `language`, `startLine`, `endLine`
- Cypher queries do not belong inline in service classes — put them in a `CypherQueries` constants class

View File

@@ -133,11 +133,11 @@ erDiagram
```
agenticcode/
├── api-server/ # Quarkus application (REST + MCP)
├── parser-core/ # Shared AST model + LanguageParser SPI
├── parser-natural/ # Custom Natural/Software AG parser
├── parser-java/ # Java parser (JavaParser-based)
├── neo4j-store/ # Neo4j persistence + Cypher queries
├── ac-code-server/ # Quarkus application (REST + MCP)
├── ac-parser-core/ # Shared AST model + LanguageParser SPI
├── ac-parser-natural/ # Custom Natural/Software AG parser
├── ac-parser-java/ # Java parser (JavaParser-based)
├── ac-neo4j-store/ # Neo4j persistence + Cypher queries
└── docs/
├── ast-schema.md
├── natural-grammar.md
@@ -163,7 +163,7 @@ docker run -p 7474:7474 -p 7687:7687 \
neo4j:5
# Run in dev mode (hot reload)
cd api-server && mvn quarkus:dev
cd ac-code-server && mvn quarkus:dev
```
The API is available at `http://localhost:8080/api` and the Neo4j browser at `http://localhost:7474`.

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

View File

@@ -6,32 +6,32 @@
<parent>
<groupId>com.agenticcode</groupId>
<artifactId>agenticcode-parent</artifactId>
<artifactId>agenticcode</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>api-server</artifactId>
<artifactId>ac-code-server</artifactId>
<packaging>jar</packaging>
<name>api-server</name>
<name>ac-code-server</name>
<description>Quarkus application exposing the agentic source code API</description>
<dependencies>
<dependency>
<groupId>com.agenticcode</groupId>
<artifactId>parser-core</artifactId>
<artifactId>ac-parser-core</artifactId>
</dependency>
<dependency>
<groupId>com.agenticcode</groupId>
<artifactId>parser-natural</artifactId>
<artifactId>ac-parser-natural</artifactId>
</dependency>
<dependency>
<groupId>com.agenticcode</groupId>
<artifactId>parser-java</artifactId>
<artifactId>ac-parser-java</artifactId>
</dependency>
<dependency>
<groupId>com.agenticcode</groupId>
<artifactId>neo4j-store</artifactId>
<artifactId>ac-neo4j-store</artifactId>
</dependency>
<dependency>
@@ -57,7 +57,7 @@
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<artifactId>quarkus-junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@@ -96,10 +96,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>com.agenticcode</groupId>
<artifactId>package-info-maven-plugin</artifactId>
<artifactId>ac-mvn-plugins</artifactId>
</plugin>
</plugins>
</build>

View File

@@ -2,4 +2,4 @@
* JAX-RS resources exposing the agentic source code API.
*/
@org.jspecify.annotations.NullMarked
package com.agenticcode.apiserver.api;
package com.agenticcode.codeserver.api;

View File

@@ -2,4 +2,4 @@
* Enrichment pipelines that run after AST ingest to add semantic information.
*/
@org.jspecify.annotations.NullMarked
package com.agenticcode.apiserver.enrichment;
package com.agenticcode.codeserver.enrichment;

View File

@@ -2,4 +2,4 @@
* MCP tool endpoints for AI agent integration.
*/
@org.jspecify.annotations.NullMarked
package com.agenticcode.apiserver.mcp;
package com.agenticcode.codeserver.mcp;

View File

@@ -2,4 +2,4 @@
* Business logic services (ingest, call graph, enrichment orchestration).
*/
@org.jspecify.annotations.NullMarked
package com.agenticcode.apiserver.service;
package com.agenticcode.codeserver.service;

6
ac-common/ac-common.iml Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

View File

@@ -6,14 +6,14 @@
<parent>
<groupId>com.agenticcode</groupId>
<artifactId>agenticcode-parent</artifactId>
<artifactId>agenticcode</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>common</artifactId>
<artifactId>ac-common</artifactId>
<packaging>jar</packaging>
<name>common</name>
<name>ac-common</name>
<description>Shared utility classes used across modules</description>
<dependencies>
@@ -41,7 +41,7 @@
</plugin>
<plugin>
<groupId>com.agenticcode</groupId>
<artifactId>package-info-maven-plugin</artifactId>
<artifactId>ac-mvn-plugins</artifactId>
</plugin>
</plugins>
</build>

View File

@@ -0,0 +1,22 @@
package com.agenticcode.common.util;
import org.jspecify.annotations.Nullable;
/**
* String helper utilities.
*/
public final class Strings {
private Strings() {
}
/**
* Returns {@code value} if it is non-null and not blank, otherwise {@code fallback}.
*/
public static String firstNonBlank(@Nullable String value, String fallback) {
if (value == null || value.isBlank()) {
return fallback;
}
return value;
}
}

View File

@@ -0,0 +1,35 @@
package com.agenticcode.common.util;
import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class StringsTest {
@Test
void returnsValueWhenNonBlank() {
assertEquals("hello", Strings.firstNonBlank("hello", "fallback"));
}
@Test
void returnsFallbackWhenNull() {
assertEquals("fallback", Strings.firstNonBlank(null, "fallback"));
}
@SuppressWarnings("ConstantValue")
@Test
void returnsFallbackWhenBlank() {
String value = test("x");
boolean endsWith = value == null || value.endsWith("c");
assertFalse(endsWith);
String value2 = test(null);
boolean endsWith2 = value2 == null || value2.endsWith("x");
assertTrue(endsWith2);
assertEquals("fallback", Strings.firstNonBlank(" ", "fallback"));
}
private @Nullable String test(@Nullable String value) {
return value;
}
}

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

View File

@@ -6,14 +6,14 @@
<parent>
<groupId>com.agenticcode</groupId>
<artifactId>agenticcode-parent</artifactId>
<artifactId>agenticcode</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>package-info-maven-plugin</artifactId>
<artifactId>ac-mvn-plugins</artifactId>
<packaging>maven-plugin</packaging>
<name>package-info-maven-plugin</name>
<name>ac-mvn-plugins</name>
<description>Generates @NullMarked package-info.java files for packages missing one</description>
<properties>
@@ -60,6 +60,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven-plugin-plugin.version}</version>
<configuration>
<goalPrefix>ac-mvn</goalPrefix>
</configuration>
</plugin>
</plugins>
</build>

View File

@@ -5,6 +5,7 @@ import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.jspecify.annotations.Nullable;
import java.io.File;
import java.io.IOException;
@@ -14,7 +15,6 @@ import java.nio.file.StandardOpenOption;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import org.jspecify.annotations.Nullable;
/**
* Generates package-info.java files annotated with {@code @NullMarked}
@@ -25,6 +25,7 @@ public class PackageInfoGeneratorMojo extends AbstractMojo {
private static final String ANNOTATION = "@org.jspecify.annotations.NullMarked";
@SuppressWarnings("NullAway.Init")
@Parameter(defaultValue = "${project.build.sourceDirectory}", required = true)
private File sourceDirectory;

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

View File

@@ -6,20 +6,20 @@
<parent>
<groupId>com.agenticcode</groupId>
<artifactId>agenticcode-parent</artifactId>
<artifactId>agenticcode</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>neo4j-store</artifactId>
<artifactId>ac-neo4j-store</artifactId>
<packaging>jar</packaging>
<name>neo4j-store</name>
<name>ac-neo4j-store</name>
<description>Neo4j persistence and queries for the unified AST graph</description>
<dependencies>
<dependency>
<groupId>com.agenticcode</groupId>
<artifactId>parser-core</artifactId>
<artifactId>ac-parser-core</artifactId>
</dependency>
<dependency>
@@ -37,7 +37,7 @@
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<artifactId>quarkus-junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
@@ -54,7 +54,7 @@
</plugin>
<plugin>
<groupId>com.agenticcode</groupId>
<artifactId>package-info-maven-plugin</artifactId>
<artifactId>ac-mvn-plugins</artifactId>
</plugin>
</plugins>
</build>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

View File

@@ -6,14 +6,14 @@
<parent>
<groupId>com.agenticcode</groupId>
<artifactId>agenticcode-parent</artifactId>
<artifactId>agenticcode</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>parser-core</artifactId>
<artifactId>ac-parser-core</artifactId>
<packaging>jar</packaging>
<name>parser-core</name>
<name>ac-parser-core</name>
<description>Shared AST schema and language parser SPI</description>
<dependencies>
@@ -45,7 +45,7 @@
</plugin>
<plugin>
<groupId>com.agenticcode</groupId>
<artifactId>package-info-maven-plugin</artifactId>
<artifactId>ac-mvn-plugins</artifactId>
</plugin>
</plugins>
</build>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

View File

@@ -6,20 +6,20 @@
<parent>
<groupId>com.agenticcode</groupId>
<artifactId>agenticcode-parent</artifactId>
<artifactId>agenticcode</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>parser-java</artifactId>
<artifactId>ac-parser-java</artifactId>
<packaging>jar</packaging>
<name>parser-java</name>
<name>ac-parser-java</name>
<description>Java source parser based on JavaParser</description>
<dependencies>
<dependency>
<groupId>com.agenticcode</groupId>
<artifactId>parser-core</artifactId>
<artifactId>ac-parser-core</artifactId>
</dependency>
<dependency>
@@ -50,7 +50,7 @@
</plugin>
<plugin>
<groupId>com.agenticcode</groupId>
<artifactId>package-info-maven-plugin</artifactId>
<artifactId>ac-mvn-plugins</artifactId>
</plugin>
</plugins>
</build>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

View File

@@ -6,20 +6,20 @@
<parent>
<groupId>com.agenticcode</groupId>
<artifactId>agenticcode-parent</artifactId>
<artifactId>agenticcode</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>parser-natural</artifactId>
<artifactId>ac-parser-natural</artifactId>
<packaging>jar</packaging>
<name>parser-natural</name>
<name>ac-parser-natural</name>
<description>Custom parser for Software AG Natural source code</description>
<dependencies>
<dependency>
<groupId>com.agenticcode</groupId>
<artifactId>parser-core</artifactId>
<artifactId>ac-parser-core</artifactId>
</dependency>
<dependency>
<groupId>org.jspecify</groupId>
@@ -45,7 +45,7 @@
</plugin>
<plugin>
<groupId>com.agenticcode</groupId>
<artifactId>package-info-maven-plugin</artifactId>
<artifactId>ac-mvn-plugins</artifactId>
</plugin>
</plugins>
</build>

6
agenticcode.iml Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

52
pom.xml
View File

@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.agenticcode</groupId>
<artifactId>agenticcode-parent</artifactId>
<artifactId>agenticcode</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
@@ -13,13 +13,13 @@
<description>Parsing, storing, and agentically querying source code (Natural/Software AG and Java)</description>
<modules>
<module>package-info-maven-plugin</module>
<module>common</module>
<module>parser-core</module>
<module>parser-natural</module>
<module>parser-java</module>
<module>neo4j-store</module>
<module>api-server</module>
<module>ac-mvn-plugins</module>
<module>ac-common</module>
<module>ac-parser-core</module>
<module>ac-parser-natural</module>
<module>ac-parser-java</module>
<module>ac-neo4j-store</module>
<module>ac-code-server</module>
</modules>
<properties>
@@ -27,8 +27,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.version>3.17.7</quarkus.platform.version>
<quarkus-neo4j.version>5.0.3</quarkus-neo4j.version>
<quarkus.platform.version>3.36.2</quarkus.platform.version>
<quarkus-neo4j.version>6.6.1</quarkus-neo4j.version>
<javaparser.version>3.26.2</javaparser.version>
<junit.version>5.11.3</junit.version>
<compiler-plugin.version>3.13.0</compiler-plugin.version>
@@ -36,7 +36,7 @@
<error-prone.version>2.36.0</error-prone.version>
<nullaway.version>0.13.1</nullaway.version>
<jspecify.version>1.0.0</jspecify.version>
<package-info-maven-plugin.version>${project.version}</package-info-maven-plugin.version>
<ac-mvn-plugins.version>${project.version}</ac-mvn-plugins.version>
</properties>
<dependencyManagement>
@@ -52,27 +52,27 @@
<!-- internal modules -->
<dependency>
<groupId>com.agenticcode</groupId>
<artifactId>common</artifactId>
<artifactId>ac-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.agenticcode</groupId>
<artifactId>parser-core</artifactId>
<artifactId>ac-parser-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.agenticcode</groupId>
<artifactId>parser-natural</artifactId>
<artifactId>ac-parser-natural</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.agenticcode</groupId>
<artifactId>parser-java</artifactId>
<artifactId>ac-parser-java</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.agenticcode</groupId>
<artifactId>neo4j-store</artifactId>
<artifactId>ac-neo4j-store</artifactId>
<version>${project.version}</version>
</dependency>
@@ -119,7 +119,11 @@
<arg>-XDcompilePolicy=simple</arg>
<arg>--should-stop=ifError=FLOW</arg>
<arg>-Xplugin:ErrorProne</arg>
<arg>-XDaddTypeAnnotationsToSymbol=true</arg>
<arg>-Xplugin:ErrorProne -Xep:NullAway:ERROR
-XepOpt:NullAway:AnnotatedPackages=com.agenticcode -XepOpt:NullAway:JSpecifyMode=true
</arg>
<arg>-Xpkginfo:always</arg>
</compilerArgs>
@@ -129,6 +133,11 @@
<artifactId>error_prone_core</artifactId>
<version>${error-prone.version}</version>
</path>
<path>
<groupId>com.uber.nullaway</groupId>
<artifactId>nullaway</artifactId>
<version>${nullaway.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
@@ -136,16 +145,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>com.agenticcode</groupId>
<artifactId>package-info-maven-plugin</artifactId>
<version>${package-info-maven-plugin.version}</version>
<artifactId>ac-mvn-plugins</artifactId>
<version>${ac-mvn-plugins.version}</version>
<executions>
<execution>
<goals>