Autumn

From SteelMorgan/1c-agent-based-dev-framework · View interactive version

Autumn is an AI agent skill from the GitHub repository SteelMorgan/1c-agent-based-dev-framework. Creates and configures component applications on the Autumn framework (ОСень) for OneScript with DI and annotations. Use when working with Autumn, Dependency Injection, "acorns", and the &Желудь, &Дуб, &Верховный annotations.

How to use this skill

Skill file

Autumn (ОСень)

A framework for component applications for OneScript with Dependency Injection and Inversion of Control. Automatically resolves constructor dependencies: there is no need to manually create object chains and pass parameters to every creation point.

How It Works

An object with a constructor that accepts parameters (dependencies) is registered as a component (an "acorn"). Instead of calling Новый Класс(зависимость1, зависимость2) in code, Осень.НайтиЖелудь("ИмяКласса") is used - the framework creates the dependencies itself and passes them to the constructor.

Entry Point

#Использовать autumn
#Использовать "Каталог/С/Классами/Команд"   // путь к папке с классами-компонентами

Поделка = Новый Поделка();
Поделка.ЗапуститьПриложение();

The directory with classes must contain classes marked with Autumn annotations (Желудь, Дуб, etc.) so that they are registered in the application context.

Getting a Component

Обновлятор1С = Осень.НайтиЖелудь("Обновлятор1С");

The identifier matches the class name or the value of the &Желудь("Идентификатор") annotation.

Key Annotations

Example of an acorn:

&Желудь("Обновлятор1С")
Процедура ПриСозданииОбъекта(ПроверяторВерсий, Настройки)
    // ПроверяторВерсий and Настройки will be resolved by Autumn and passed here
КонецПроцедуры

Example of a дуб with завязь:

&Дуб
Процедура ПриСозданииОбъекта()
КонецПроцедуры

&Завязь
&КомандаПриложения(Имя = "legacy", Описание = "Легаси команда")
Функция МояЛегасиКоманда() Экспорт
    Возврат Новый МояЛегасиКоманда();
КонецФункции

Recommendations

Additional

Extended reference for annotations and configuration - reference.md.

Documentation: autumn-library.github.io.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.