Fork me on GitHub

AI Assembly

AI Assembly is a Machanism feature that helps turn a plain-language request into the first working version of an application or a major feature. Instead of producing only isolated code snippets, it helps assemble a practical project foundation by combining AI generation with curated library information.

In simple terms, you describe what you want to build, AI Assembly looks for suitable libraries, reads their structured metadata, and prepares the initial files, dependencies, configuration, and starter implementation needed to get started.

Reference: https://machanism.org/ai-assembly/index.html

What AI Assembly does

AI Assembly is designed to help developers move from an idea to an initial project more quickly. It focuses on:

  • understanding a natural-language project request
  • finding relevant libraries based on intent, not only keywords
  • analyzing structured library metadata from bindex.json
  • generating an initial project structure and configuration
  • creating starter source code and integration points
  • producing a practical starting point that developers can review and improve

Unlike generic AI code generation, AI Assembly is built to work with the Machanism platform's curated library ecosystem. This makes the generated result more grounded in real libraries, known integration details, and practical setup requirements.

How it works

AI Assembly is based on bindex.json, a structured descriptor file used for reusable libraries.

According to the platform documentation, bindex.json files are created automatically by analyzing project artifacts such as build files, source code, and other metadata. These files can contain information such as:

  • the purpose of a library
  • supported features
  • integration points
  • example usage
  • dependency and build details
  • authorship and licensing information

These descriptors are indexed for semantic search. This allows the system to search by meaning and intent, which helps it recommend libraries that match a user's goal more accurately.

A typical AI Assembly flow is:

  1. The developer describes the request
    • The request is written in natural language and explains the application's purpose, key features, and any specific requirements.
  2. Relevant libraries are identified
    • Semantic search checks indexed bindex.json data and ranks libraries that best match the request.
  3. Library metadata is analyzed
    • The assistant reads detailed Bindex information to understand capabilities, setup requirements, examples, and integration details.
  4. The project is assembled
    • The assistant generates the initial project structure, configuration files, dependencies, and starter implementation.
  5. The developer reviews the result
    • The generated output is a starting point. The developer is still responsible for reviewing functionality, security, and overall quality.

Why it is useful

AI Assembly is useful when you need more than a short example and want a realistic project starting point. It reduces manual setup work and supports better initial library selection by using structured metadata instead of relying only on general code generation.

This is especially helpful when:

  • you know what you want to build but not which libraries to choose
  • you want an initial implementation that already includes dependencies and configuration
  • you need a project skeleton that can be extended instead of starting from a blank project

Act: Assembly

This project includes an Act named Assembly, defined in src/main/resources/acts/assembly.toml.

Purpose

The Assembly act is used to implement a user request by finding suitable libraries and using them to build the requested application or feature.

Its main purpose is to help the assistant create a functional project foundation instead of producing disconnected code snippets. It is best suited for requests that describe what should be built while the exact libraries, setup, and implementation details still need to be selected.

When to use it

Use the Assembly act when you:

  • want to create a new application
  • want to add a major feature to an existing project
  • have a request written in natural language
  • need help selecting libraries that fit the task
  • want the assistant to generate or update multiple project files
  • want a practical, buildable starting point rather than a single code example

Main functionality

Based on assembly.toml, the Assembly act guides the assistant to:

  • use the pick_libraries tool with the user's query to find recommended libraries
  • analyze which recommended libraries actually match the request
  • use the get_bindex tool to read detailed metadata for matching libraries
  • prefer suitable libraries instead of writing everything from scratch
  • create all necessary files in the project folder
  • add required code and public dependencies
  • clean and build the project, then fix errors after changes
  • make the project functional
  • create a detailed README.md
  • ask the user for missing information when needed
  • use the default Clean Architecture template unless the user requests something else

Important behavior

The act configuration also defines several operating rules:

  • Interactive mode is enabled with gw.interactive = true, so the assistant can ask follow-up questions when important information is missing.
  • Non-recursive mode is enabled with gw.nonRecursive = true, which limits how the act is applied.
  • A recommendation threshold is defined with pick.score = 0.86, which helps focus on stronger library matches.
  • The instructions explicitly support working with the local file system and command-line tools.

In simple words

If you know what you want to build but do not know which libraries or setup to use, Assembly is the act for that situation.

It helps turn requests such as:

  • “Create a REST API application for managing a user login”
  • “Build a command-line tool for processing files”
  • “Generate an application that integrates with a specific platform”

into an initial project with recommended libraries, configuration, source files, and documentation.

Summary

The Assembly act is intended for project creation and structured implementation. It helps move from a high-level request to a practical starting application by:

  • finding relevant libraries
  • reading their metadata and examples
  • generating the necessary project files
  • producing an initial implementation that a developer can review and continue improving