Skip to content

peter-lawrey/aide

Repository files navigation

AIDE Template and Tools

aide (noun) /ayd/ an assistant to an important person, especially a political leader.
— Oxford English Dictionary

Introduction

AIDE (Artificial Intelligence Development Environment) pairs AI-driven code generation with a documentation-driven workflow. This approach can significantly reduce the conceptual load for developers and testers. It uses AsciiDoc as a single source of truth so requirements, tests, and code stay in sync. AI handles repetitive tasks, while humans add domain insight and validate correctness.

See the AIDE Workflow for details on iterative development principles and AI-human collaboration.

Project Overview

This repository is a "Chronicle Build" sandbox for AI-based tools in Java. Key features include:

  • Template Management to handle AI prompt templates and text blocks.

  • Documentation-Driven Development to keep the code in sync with AsciiDoc requirements.

  • Project Statistics summarising text density and automatically substituting "full" .adoc with .ad versions when available.

Additional guidelines for coding conventions and commit messages can be found in the AIDE Style Guide. Definitions of AI and domain terms appear in the AIDE Glossary.

Highlight This Project as an Example

This project itself demonstrates an actual application of AI-enhanced, documentation-driven workflows. Each .adoc file outlines the architecture and best practices, and the incremental build approach AIDE Workflow lets you see how newly added or changed requirements become part of the final increment.asciidoc.

This makes it easier to:

  • Understand how the "document-first" approach is used in practice.

  • See the concrete code and tests that align with the updated .adoc specs.

Getting Started

Prerequisites

  • Java 11 or higher (recommended)

  • Maven for building and testing

Installation

Clone the Repository and Copy the AIDE Tool

git clone https://github.com/peter-lawrey/aide.git
cp aide
cp -r aide {your-project-directory}
mvn install exec:java -Dexec.mainClass=" com.example.tools.dc.AsciidocDocumentApp" \
    -Dexec.args="{your-project-directory}"

I prefer to run AsciidocDocumentApp from my IDE, but you can also run it from Maven or the command line. This generates a context.asciidoc file in your project directory allowing you to paste all the important information into your chat app to support queries and make sure your AI is up-to-date. Using a "Temporary Chat" means your query and results are not retained or used for training (Check the chat app’s privacy policy).

Post to your chat App the following command:

Consider the following project directory and reply Got it

<<Paste the project directory here>>

Expected response: "Got it"

or to get started

Suggest improvements to this project

<<Paste the project directory here>>

Basic Usage

  • AdocDocumentApp Utility Recursively scans directories, applying filters to list .adoc, pom.xml, or src/ files. It calculates line counts, blank lines, total tokens, and tokens/lines. Results are summarised at the end.

I run AdocDocumentApp with a directory path as an argument in my IDE. However, you can run it from Maven or on the command line.

  • Replaces "full" files with .ad summaries when available.

  • Excludes files and directories from .gitignore

  • Excludes .asciidoc, hidden files, PDFs, and images.

  • Aggregates stats (including GPT-like token counts) at the end.

Example AI Prompts

Below are sample prompts you can give to a Chat App for context.asciidoc, including AIDE, along with the kind of response you might expect. In each case, paste the context.asciidoc into the Chat App to see what it generates.

Consider the following project and reply Got it

<<Paste the context.asciidoc here>>

Expected response: Got it


images/vanilla-java.jpg
Describe this image as asciidoc

<<Paste the vannila-java.jpg image here>>

Expected (Summary of AI Response):

This is a close-up photo of dark-brown vanilla pods and roasted coffee beans on a warm, rustic wooden surface. Some beans are cracked to show lighter interiors, and the wood’s natural grain and knots create a cosy backdrop. Overall, it highlights the rich, earthy tones of the vanilla and coffee, evoking their combined aromatic appeal.


Give a high-performance sample program for event logging and processing.

Expected (Summary of AI Response):

  • The AI generates a Java program using Chronicle Queue for low-latency event logging and processing.

  • It includes a Maven dependency and a brief description of the Chronicle Queue.


Give a Java example of a high-performance key-value store

Expected (Summary of AI Response):

  • The AI generates a Java program using Chronicle Map for a high-performance key-value store.

  • It includes a Maven dependency and a brief description of the Chronicle Map.

See Examples with AIDE for more examples.


Contributing

Contributions are welcome. See CONTRIBUTING.adoc for coding style, branching, and pull-request guidelines. Bug reports and feature suggestions help the project grow.

License

This project is licensed under the Apache 2.0 License. You agree to license your contributions under Apache 2.0 by submitting patches or pull requests.

Contact / Support

Open a GitHub issue to report bugs, ask questions, or request features. Feel free to share roadmap ideas or suggest improvements.

About

Artifical Intelligence Development Environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages