architecture-discipline
Skill6 starsChanged 4 months agoMITView on GitHub
Загружай первым: границы слоёв (адаптер→core→executor→tools/services), JSON-only цикл, local-first, sqlite-vec, без новой архитектуры без согласования; указатель на остальные скиллы.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/agents.mdcCursor rule
- async-disciplineSkill
- automation-disciplineSkill
- debugging-disciplineSkill
- documentation-disciplineSkill
- error-handling-disciplineSkill
- git-disciplineSkill
- prompt-injection-defenseSkill
- pr-review-disciplineSkill
- pull-request-disciplineSkill
- skill-authoringSkill
- testing-disciplineSkill
The file
Files
Skill: architecture-discipline
Базовые архитектурные правила репозитория. Загружай первым для широкой/неочевидной задачи, затем — профильный скилл. Источник истины — _docs/architecture.md и _docs/instructions.md §11.
Когда использовать
- Задача широкая или неочевидная — начни отсюда, чтобы выбрать следующий скилл.
- Добавляешь компонент или поток, трогаешь границы слоёв, реестр tools, память или агентный цикл.
- Сомневаешься, не выходит ли решение за рамки уже принятой архитектуры.
Алгоритм
- Слоистая изоляция. Поток: адаптер (
app/adapters/) → core (app/core/orchestrator.py) → executor (app/agents/) → tools / LLM / memory (app/tools/,app/services/). Слой ниже не знает про слой выше: tool не знает про aiogram, memory — про executor, executor — про Telegram. - Единая точка входа. Любой адаптер вызывает только
core.handle_user_task(...). Адаптер не дёргаетExecutor/Planner/Criticнапрямую. - JSON-only цикл. Ответ LLM в агентном цикле — строго JSON одной из форм
_docs/agent-loop.md. Prose-ответ в цикле считается ошибкой. - Tools as a registry. Новый tool — отдельный модуль с контрактом
name/description/args_schema/async run(args, ctx), регистрация вapp/tools/registry.py(_docs/tools.md). - Memory split. Краткосрочная — in-memory
ConversationStore; долгосрочная —sqlite-vec(SemanticMemory), пополняется только саммари при/new, не сырыми сообщениями (_docs/memory.md). - Local-first, без облака. Только локальная Ollama; единственная БД —
sqlite-vec; polling, не webhook (_docs/instructions.md§11). - Async-first. Любой I/O — через
await; общие клиенты создаются один раз на приложение → скиллasync-discipline. - Без новой архитектуры без согласования. Новый слой/сервис/абстракция/паттерн/зависимость или смена структуры каталогов — сначала проговорить с пользователем (
_docs/instructions.md§11). В рамках задачи — только локальные технические решения.
Куда дальше
- Async и I/O →
async-discipline. Тесты →testing-discipline. Ошибки и исключения →error-handling-discipline. - Безопасность входов и опасных tools →
prompt-injection-defense. Документация →documentation-discipline. Git и коммиты →git-discipline.
Чего избегать
- Обращения адаптера к
Executorв обходcore; обращения tool/memory к верхним слоям. - Prose-ответов LLM в цикле вместо JSON.
- Новых зависимостей / слоёв / паттернов без согласования с пользователем.
- Облачных LLM, второй БД кроме
sqlite-vec, webhook в MVP.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

