Apache AsterixDB — the BDMS query engine, storage layer, and Hyracks distributed runtime. See README.md for an overview.
The tree has two roots:
asterixdb/— the AsterixDB engine (SQL++ compiler, external data, cloud, storage).hyracks-fullstack/— the Hyracks runtime and shared utilities (hyracks-util,hyracks-cloud, etc.).
Files here carry the Apache license header (see README.md). Preserve it when editing or creating files.
When you (an AI agent) generate or assist with Java code in this tree, annotate it with @AiProvenance. This records which model and tool produced the code so the contribution is auditable. The annotation is defined here, in this repository.
- Annotation:
org.apache.hyracks.util.annotations.AiProvenance— source athyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/annotations/AiProvenance.java. It is on the classpath of every module that depends onhyracks-util(effectively all of them). @Retention(SOURCE)— documentation only; stripped at compile time, so no runtime or bytecode cost. The repeatable container@AiProvenancesisRUNTIME-retained for tools that scan class files.- Applies to: types, methods, constructors, fields, and local variables.
| Attribute | Required | Values |
|---|---|---|
agent |
yes | AiProvenance.Agent — the model that did the work (e.g. CLAUDE_OPUS_4_8, CLAUDE_SONNET_4_6, GPT_5_MINI) |
tool |
yes | AiProvenance.Tool — the invocation surface (e.g. CLAUDE_CODE_UI, CLAUDE_CODE_CLI, GITHUB_COPILOT) |
contributionKind |
no (default GENERATED) |
GENERATED, ASSISTED, REFACTORED, TEST_GENERATED, DOC_GENERATED |
notes |
no | free-text, e.g. what changed or why |
- Pick the narrowest element that captures the AI contribution: annotate the type only when the whole class is AI-authored. When AI adds or rewrites individual methods (or a field/constructor) within an otherwise human-authored class, annotate each of those methods — do not promote the annotation to the type level.
- Match
agentto the model actually used. When the author is Claude Code (the Code tab in the Claude app / theclaudeCLI), useagent = AiProvenance.Agent.CLAUDE_OPUS_4_8(the current model — update if running a different one) andtool = AiProvenance.Tool.CLAUDE_CODE_UI. For the claude.ai chat web app useCLAUDE_CODE_UI; for Copilot-in-IDE useGITHUB_COPILOT. - Choose
contributionKindhonestly:GENERATED(from scratch),ASSISTED(human-led, AI-suggested),REFACTORED(rewriting existing code),TEST_GENERATED,DOC_GENERATED. - Stack annotations (it is
@Repeatable) to record history — e.g. generated by one model then refactored by another. - Import style: either static-import the constants for brevity, or import the type and qualify (
AiProvenance.Agent.X). Both are used in-tree.
In-tree usages include asterixdb/asterix-external-data/.../aws/s3/S3Utils.java, asterixdb/asterix-cloud/.../S3TrustManagerProvider.java, and hyracks-fullstack/hyracks/hyracks-util/.../Span.java.
import org.apache.hyracks.util.annotations.AiProvenance;
@AiProvenance(agent = AiProvenance.Agent.CLAUDE_OPUS_4_8, tool = AiProvenance.Tool.CLAUDE_CODE_UI,
contributionKind = AiProvenance.ContributionKind.GENERATED, notes = "Initial implementation")
public final class ExampleHelper { ... }If a model you used is missing from the Agent/Tool/Provider enums, add it to AiProvenance.java rather than falling back to OTHER.