Document AI/agent contribution workflow and architecture; align Queue docs and internal API boundaries #1690
+2,124
−373
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



This PR adds repository-wide guidance for AI-assisted contributions, improves Chronicle Queue’s documentation set, and clarifies internal vs public API boundaries via package-level docs and Javadoc. The only behavioural change is a small robustness tweak in file-state detection for non-Linux platforms; all other changes are documentation or annotation/metadata only.
Changes
1. AI/agent guidance and model-specific docs
Add
AGENTS.mdat the repo root:mvn -q clean verifyfrom a clean checkout).FN,NF-P,NF-S,NF-O,TEST,DOC,OPS,UX,RISK) and an ADR template.:sectnums:, list formatting patterns, bold/emphasis).Add
CLAUDE.md:QueueTestCommon,IOTools.deleteDirWithFiles, etc.).Add
GEMINI.md:These files are documentation-only and do not affect runtime behaviour.
2. New architecture, requirements, and security docs
src/main/docs/architecture-overview.adocsrc/main/docs/decision-log.adocIntroduces
CQ-*decision records:CQ-FN-101– Queue file format and roll-cycle model.CQ-FN-102– Appender and tailer concurrency model (single-writer style, independent tailers).CQ-NF-P-201– Durability, flush policy and recovery behaviour.CQ-NF-O-401– Retention and roll-file cleanup as operational responsibility.Cross-references existing docs under
docs/.src/main/docs/project-requirements.adocQUEUE-FN-*andQUEUE-NF-*requirements using the Nine-Box taxonomy for Chronicle Queue (functional behaviour, performance, security, operability).src/main/docs/security-review.adocSummarises Chronicle Queue’s security posture:
References the
QUEUE-NF-S-*andQUEUE-NF-O-*requirements andCQ-NF-S-301/CQ-NF-O-401decisions.All four documents are AsciiDoc-only and formalise existing behaviour and design decisions.
3. Documentation clean-up and consistency
README and docs alignment
:lang: en-GB,:source-highlighter: rouge) acrossREADME.adocand manydocs/*.adocand Antora pages.µswhere appropriate (e.g. latency guarantees and benchmark descriptions).System-properties doc rename and link fix
docs/systemProperties.adoc→docs/system-properties.adoc.README.adoc, to the new path.:toc:tosystem-properties.adocand tighten the table options ([cols=4*,options="header"]).AsciiDoc structural improvements
cq4dumps from documentation sections in favour of prose that explains the binary format and how to dump via tools.:toc:or:sectnums:and fix section levels where appropriate (e.g.MigratingToV4.adocheadings).JAVA_HOMEusage in FAQ/quick-start/command-line docs.These are purely documentation changes; they do not alter code behaviour.
4. Public vs internal API boundaries and Javadoc
New
package-info.javafiles:net.openhft.chronicle.queue– describes the core public API and emphasises single-writer semantics and non-thread-safe appenders/tailers.net.openhft.chronicle.queue.impl,.impl.single,.impl.table– mark implementation classes (storage, roll-cycle, indexing, table store) as internal/non-API.net.openhft.chronicle.queue.rollcycles– describes roll-cycle definitions as configuration primitives.net.openhft.chronicle.queue.reader,.reader.comparator– documents reader tools as operational/diagnostic utilities rather than core APIs.net.openhft.chronicle.queue.internal.*(and subpackages.domestic,.main,.reader,.writer,.util) – explicitly state that these are strictly internal, not to be used via casting/reflection/serialization, and subject to change without notice.Javadoc enhancements:
Add or expand Javadoc on:
ChronicleQueue.indexForId(String)– describes return value as theLongValuetracking a named tailer’s position.ChronicleQueue.createPretoucherEventHandler()– clarifies that it creates anEventHandlerto drive pretouching.ExcerptCommon<E>– documents the type parameter for fluent chaining and clarifies the semantics ofcurrentFile()andsync().TailerDirectionandTailerStateenums – each constant now has descriptive Javadoc.ExcerptContext– documented as a short-lived view over read/writeWireand timeout.RollingResourcesCache,SingleTableBuilder,NoOpWriteLock, and several reader/writer helper classes.Constructor visibility improvements:
ChronicleHistoryReaderMainandChronicleReaderMainnow have explicit public no-arg constructors for easier testability and embedding.BenchmarkMain,DumpMain,HistoryMain,PingPongMain,ReaderMain,RefreshMain,RemovableRollFileCandidatesMain,UnlockMain,ChronicleWriterMain) now have private constructors annotated via comments as “utility holders” to make non-instantiability explicit.These changes are descriptive/metadata-only and do not change method semantics.
Functional / behavioural impact
The code changes are intentionally minimal and low-risk:
NoOpCondition.await(long, TimeUnit)signature:throws InterruptedException. The implementation already never threw and always returnstrue, so this narrows the declared contract without changing behaviour.Deprecation markers (API surface only, no immediate behaviour change):
Mark several legacy/testing-only methods and constants as
@Deprecatedwith a comment indicating removal in or after 2027, for example:ChronicleQueue.dumpLastHeader()ExcerptAppender.wire()NoMessageHistoryenumExcerptContext.timeoutMS()WireStore.indexable(long)WireStoreSupplier.CreateStrategy.canBeReused(...)SingleChronicleQueue.DISK_SPACE_CHECKER_NAMESingleChronicleQueueBuilder.DEFAULT_SPARSE_CAPACITYPrecreatedFiles.preCreatedFileForStoreFile(...)WriteLock.isLockedByCurrentProcess(LongConsumer)Reader.stop(),ChronicleReader.withDocumentPollMethod(...))These are signature-only changes for now; runtime behaviour is unchanged. Callers will see new deprecation warnings and can begin migrating away.
Tests and minor method signatures:
throws IOExceptionremoved where not thrown).