maister
AGENTS.md10 starsChanged 6 months agoMITView on GitHub
Structural map for AI agents and new contributors. Read this file first to orient yourself, then drill into the referenced documents. Maintained by /aif. Update when the project structure changes significantly. The Documentation section is maintained by /aif-docs. MAIster is the self-hosted execution and governance layer for reproducible AI-powered SDLC processes over private code. Current validation wedge: processes from core packages running across internal/private projects through the Web control plane, ACP supervisor, graph-only Flow engine, multi-workspace execution, HITL, evidence, review,…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,843 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository59 other files it gives its agents.
- site-docs/AGENTS.mdAGENTS.md
- web/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- web/CLAUDE.mdCLAUDE.md
- aif-architectureSkill
- aif-best-practicesSkill
- aif-build-automationSkill
- aif-ciSkill
- aif-commitSkill
- aif-distillationSkill
- aif-dockerizeSkill
- aif-docsSkill
- aif-evolveSkill
- aif-exploreSkill
- aif-fixSkill
- aif-groundedSkill
- aif-implementSkill
- aif-improveSkill
- aif-loopSkill
- aif-planSkill
- aif-qaSkill
- aif-referenceSkill
- aif-reviewSkill
- aif-roadmapSkill
- aif-rules-checkSkill
- aif-rulesSkill
- aif-security-checklistSkill
- aif-skill-generatorSkill
- aifSkill
- aif-verifySkill
- generate-claudemdSkill
- aif-architectureSkill
- aif-best-practicesSkill
- aif-build-automationSkill
- aif-ciSkill
- aif-commitSkill
- aif-distillationSkill
- aif-dockerizeSkill
- aif-docsSkill
- aif-evolveSkill
- aif-exploreSkill
- aif-fixSkill
- aif-groundedSkill
- aif-implementSkill
- aif-improveSkill
- aif-loopSkill
- aif-planSkill
- aif-qaSkill
- aif-referenceSkill
- aif-reviewSkill
- aif-roadmapSkill
- aif-rules-checkSkill
- aif-rulesSkill
- aif-security-checklistSkill
- aif-skill-generatorSkill
- aifSkill
- aif-verifySkill
- generate-claudemdSkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 219
When this file disagrees with CLAUDE.md or docs/, those win — update this file.
- Very specific: line 229
Read
CLAUDE.mdandweb/CLAUDE.mdfirst: before touching any code. Both files encode product spine, current implementation boundaries, …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Structural map for AI agents and new contributors. Read this file first to orient yourself, then drill into the referenced documents.
Maintained by
/aif. Update when the project structure changes significantly. The Documentation section is maintained by/aif-docs.
Project Overview
MAIster is the self-hosted execution and governance layer for reproducible AI-powered SDLC processes over private code. Current validation wedge: processes from core packages running across internal/private projects through the Web control plane, ACP supervisor, graph-only Flow engine, multi-workspace execution, HITL, evidence, review, and promotion. External ACP adapters remain the agent runtimes.
Full description: .ai-factory/DESCRIPTION.md.
Tech Stack
- Framework: Next.js 16.2 (App Router)
- Language: TypeScript 5.6 (strict)
- UI library: HeroUI v3 (
@heroui/react3.2.6) - Styling: Tailwind CSS 4 +
tailwind-variants - Database: Postgres 16 via Drizzle ORM
- Supervisor daemon (
supervisor/): Fastify 5 + pino + zod; ACP via@agentclientprotocol/sdk@2.0.2spawningclaude-agent-acp@0.95.0,codex-acp@2.2.2, and readiness-gatedgemini --acp,opencode acp, andmimo acpadapter binaries - Tests: vitest (unit + integration), Playwright (E2E)
- Package manager: pnpm (monorepo workspace:
web+supervisor) - Node: 24
Project Structure
mAIster/
├── .ai-factory/ # AI Factory project context
│ ├── config.yaml # AI Factory configuration (language, paths, git)
│ ├── DESCRIPTION.md # Project specification
│ ├── ARCHITECTURE.md # Architecture pattern, folder structure, deps
│ ├── ROADMAP.md # Roadmap and completed work
│ ├── plans/ # Full-mode /aif-plan output, branch-keyed
│ └── rules/ # Project conventions for AI agents
│ ├── base.md # Project-wide rules
│ ├── frontend.md # Web-tier rules (HeroUI, RSC, lint)
│ ├── backend.md # Server-tier rules (subprocess, SSE, errors)
│ └── database.md # Drizzle / Postgres rules
├── .github/ # Public issue forms and pull-request template
│ ├── ISSUE_TEMPLATE/
│ └── PULL_REQUEST_TEMPLATE.md
├── .agents/ # Codex agent bundles (do not hand-edit)
├── .claude/ # Claude skills + agents (managed via /aif)
├── .codex/ # Codex skills + config.toml
├── .mcp.json # MCP servers: github, filesystem, postgres,
│ # chromeDevtools, playwright
├── .ai-factory.json # AI Factory installed-skills registry
├── .pre-commit-config.yaml # Pre-commit hooks: lint/typecheck/prettier (web + supervisor)
├── pnpm-workspace.yaml # Monorepo: web + supervisor + site + site-docs
├── pnpm-lock.yaml # Frozen lockfile (root)
├── Dockerfile # Single image; web/supervisor selected via command:
├── compose.yml # Postgres only; web + supervisor run on the host
├── compose.production.yml # Prod hardening: read_only, cap_drop, tmpfs
├── docs/ # Product & engineering documentation
│ ├── VISION.md
│ ├── PRODUCT_VIEW.md
│ ├── supervisor.md # HTTP+SSE API, lifecycle, event/object plane
│ ├── configuration.md
│ ├── database-schema.md
│ ├── error-taxonomy.md
│ ├── getting-started.md
│ ├── architecture.md
│ ├── decisions.md
│ ├── api/
│ ├── db/
│ └── system-analytics/
├── site/ # Public EN/RU product landing (Next.js)
│ ├── app/ # Localized routes + GitHub repository proxy
│ ├── components/ # Landing UI; reuses the web login SpineGraph
│ ├── lib/ # Localized copy, locale and GitHub contracts
│ └── public/ # Landing-only generated/static artwork
├── site-docs/ # Public EN/RU user docs (Mintlify + Markdown)
│ ├── concepts/ # Public product concepts
│ ├── guides/ # Public task-oriented guides
│ ├── operations/ # Public operator guides
│ ├── reference/ # Public manifest and runtime reference
│ ├── ru/ # Russian public-doc parity tree
│ └── docs.json # Navigation, theme, AI-context integrations
├── supervisor/ # ── ACP SUPERVISOR DAEMON ──
│ ├── src/
│ │ ├── main.ts # Fastify boot + graceful shutdown
│ │ ├── http-api.ts # 6 routes (POST/DELETE/GET /sessions, SSE, checkpoint/input stubs)
│ │ ├── spawn.ts # child_process dispatch (claude-agent-acp | codex-acp)
│ │ ├── heartbeat.ts # exit/error → session.exited/crashed + orphan watcher
│ │ ├── cost.ts # cache/input/output usage normalization
│ │ ├── registry.ts # In-memory SessionRecord map + per-session event ring buffer
│ │ ├── types.ts # Zod schemas + SessionEvent union + SupervisorError
│ │ └── __tests__/ # 30 unit + 9 integration tests
│ ├── test/fixtures/
│ │ └── fake-acp.mjs # Stand-in for the real ACP binary in tests
│ ├── package.json # @maister/supervisor; tsx runtime
│ ├── tsconfig.json
│ ├── vitest.workspace.ts # unit | integration split
│ └── eslint.config.mjs
├── web/ # ── NEXT.JS WEB TIER ──
│ ├── app/ # App Router (layout, pages, api/, server actions)
│ ├── components/ # HeroUI-based React components
│ ├── config/ # Site config (navItems), fonts
│ ├── lib/ # Server-only modules (errors, atomic, config, db, supervisor-client)
│ ├── i18n/ # EN + RU translations (required from day one)
│ ├── styles/ # globals.css (Tailwind 4 + HeroUI styles)
│ ├── types/ # Shared TS types
│ ├── public/ # Static assets
│ ├── CLAUDE.md # Web slice conventions — READ THIS
│ ├── package.json # Dependencies, scripts (dev/build/start/lint)
│ ├── tsconfig.json # strict, @/* path alias
│ ├── next.config.mjs
│ ├── eslint.config.mjs # ESLint 9 flat config
│ └── postcss.config.mjs # @tailwindcss/postcss
├── CLAUDE.md # Root project instructions for AI agents
├── AGENTS.md # This file
├── README.md # Landing page: quick start, docs index
├── CONTRIBUTING.md # Development and contribution workflow
├── SECURITY.md # Private vulnerability-reporting policy
├── CODE_OF_CONDUCT.md # Contributor Covenant 2.1
├── .env.example # Server env vars (web + supervisor)
├── .dockerignore
├── LICENSE # MIT
└── .gitignoreTwo Node processes: web/ (Next.js — UI + Route Handlers + server actions
- Drizzle DB access + SSE bridge) and
supervisor/(Fastify daemon — owns ACP sessions and spawns agent processes). They communicate over HTTP+SSE throughweb/lib/supervisor-client.ts; the supervisor runs as a separate process on the supported single host. Stage B removes the web runtime-data mount; Stage C owns remote repository/workspace placement.
Key Entry Points
| File | Purpose |
web/app/layout.tsx | Root layout: Providers + Navbar + container |
web/app/page.tsx | Home page (template stub — to replace with portfolio grid) |
web/app/providers.tsx | next-themes ThemeProvider wrapper |
web/app/error.tsx | Root error boundary |
web/lib/supervisor-client.ts | The ONLY place web/ talks to supervisor/ (HTTP+SSE) |
web/lib/errors.ts | MaisterError discriminated union (11 codes) |
web/lib/db/schema.ts | Drizzle schema; node_attempts is the sole Flow execution ledger |
web/lib/agents/activity-queries.ts | Scoped active executions and retained run/attempt history |
web/lib/tasks/qualification.ts | Versioned request assessments and authoritative admission |
web/components/agents/ | Project agent history, grouped incidents, retries and qualification controls |
web/lib/agents/launch-contract.ts | Immutable agent kind, definition and operational completion snapshots |
web/lib/run-results/operational-projection.ts | Shared operational diagnostic projection for run details, collect and automation history |
web/lib/gc/operational-disposition.ts | Durable operational cleanup through existing workspace lifecycle claims |
web/lib/execution-host/events/projection-runtime.ts | Autonomous canonical projection registry and worker activation |
web/lib/config.ts | maister.yaml v2 loader (zod-validated) |
web/lib/project-config-persistence/ | Reviewed configuration projection, commit/push intents, Git publication and recovery |
site/app/[locale]/page.tsx | Public localized landing page |
site/app/api/github/route.ts | Validated live GitHub repository widget endpoint |
site-docs/docs.json | Public Markdown docs navigation, theme, and AI context |
site-docs/AGENTS.md | Public-doc authoring boundary; excludes internal docs/ |
supervisor/src/main.ts | Supervisor daemon entrypoint (Fastify on :7777) |
supervisor/src/http-api.ts | Six HTTP routes + SSE bridge |
supervisor/src/spawn.ts | child_process.spawn dispatcher (claude-agent-acp / codex-acp) |
supervisor/package.json | @maister/supervisor; scripts: dev, start, test:unit, test:integration |
pnpm-workspace.yaml | Monorepo: web + supervisor + site + site-docs |
.mcp.json | MCP server configuration |
Documentation
| Document | Path | Description |
| README | README.md | Landing page: quick start, key features, docs table |
| Contributing | CONTRIBUTING.md | Setup, validation, PR, privacy, and AI-assistance expectations |
| Security Policy | SECURITY.md | Supported versions and private vulnerability-reporting path |
| Code of Conduct | CODE_OF_CONDUCT.md | Community behavior and enforcement policy |
| Getting Started | docs/getting-started.md | Install, dev workflow, first run |
| Russian Guide | docs/ru/README.md | Purpose, workflow, operator guide |
| Supervisor | docs/supervisor.md | ACP daemon: HTTP+SSE API, lifecycle, durable events, runtime objects, env vars |
| Database Schema | docs/database-schema.md | 155 tables, FK cascade chain, indexes, Drizzle workflow |
| Error Taxonomy | docs/error-taxonomy.md | MaisterError codes — when each fires, what the UI does |
| Configuration | docs/configuration.md | maister.yaml v2 + flow.yaml v1 + form_schema versioning + env vars |
| Project configuration persistence | docs/system-analytics/project-config-persistence.md | Reviewed export, commits, recovery and push; Implemented |
| Vision | docs/VISION.md | One-liner, product spine, principles, validation goal |
| Product View | docs/PRODUCT_VIEW.md | Lean Canvas, JTBD, gaps, MVP / Phase 2 / Later |
| Architecture | docs/architecture.md | Current system architecture, C4 diagrams, data flows |
| Decisions | docs/decisions.md | ADRs and locked technical decisions |
| Agent activity design | docs/system-analytics/agent-activity-history.md | Active executions and retained history |
| Task qualification design | docs/system-analytics/task-qualification.md | Incoming requests and admission contracts |
| Task launch admission | docs/system-analytics/task-launch-admission.md | Explicit manual authority and qualified automation |
| Agent preparation | docs/system-analytics/agent-preparation.md | Fenced checkout, baseline, handoff and cleanup |
| System Analytics | docs/system-analytics/ | Domain flows for projects, runs, HITL, executors, Flow DSL, and test database infrastructure |
| Screens Reference | docs/screens/README.md | User-facing screens and shared chrome |
| API Contracts | docs/api/ | Web/supervisor OpenAPI and SSE AsyncAPI contracts |
| README (web) | web/README.md | HeroUI template README — replace when something to say |
| Public documentation | site-docs/ | Published EN/RU product docs authored as Markdown; separate from internal docs/ |
| Run Git guide | site-docs/guides/run-git.md | Worktree changes, publication, PRs, restoration, staged-work rescue; EN/RU |
| Agent messaging guide | site-docs/guides/message-a-running-agent.md | Steering, queued messages, recovery; EN/RU |
| Personal librarian guide | site-docs/guides/personal-librarian.md | Tasks, clarifications, confirmations, personal memory and history; EN/RU |
AI Context Files
| File | Purpose |
AGENTS.md | This file — structural map for AI agents and new contributors |
CLAUDE.md | Root project instructions: product spine, locked architectural decisions, conventions |
web/CLAUDE.md | Web/Next.js slice: stack details, scripts, structure, HeroUI conventions |
.ai-factory/DESCRIPTION.md | Project specification synthesized from product docs |
.ai-factory/ARCHITECTURE.md | Architecture pattern, folder structure, dependency rules, code examples |
.ai-factory/config.yaml | AI Factory configuration (language, paths, git settings) |
.ai-factory/ROADMAP.md | Roadmap and completed work |
.ai-factory/rules/base.md | Project-wide conventions extracted from CLAUDE.md files |
.ai-factory/rules/frontend.md | Web-tier rules (HeroUI, RSC, lint) |
.ai-factory/rules/backend.md | Server-tier rules (supervisor, SSE, errors, concurrency) |
.ai-factory/rules/database.md | Drizzle / Postgres rules |
When this file disagrees with CLAUDE.md or docs/, those win — update
this file.
Agent Rules
- Decompose shell commands — run each command separately, not chained,
so failures surface clearly and approvals stay scoped.
- Wrong (combined):
git checkout main && git pull - Right (decomposed): first
git checkout main, thengit pull origin main
- Wrong (combined):
- Read
CLAUDE.mdandweb/CLAUDE.mdfirst before touching any code. Both files encode product spine, current implementation boundaries, and project conventions. - Surgical changes only — every changed line must trace directly to the user's request. Do not refactor adjacent code while you're there.
- Throw
MaisterErrorwithcodefor known domain failures. Never use plainErrorfor domain errors. UI branches oncode, never on string matching. - Atomic writes to
.maister/— always tmp + rename viaatomicWriteJson. The Flow may read mid-write otherwise. - No
chokidar/fs.watch/ polling. State transitions are driven by ACP notifications (live path) plus artifact presence (recovery path); process exit codes feed the heartbeat-promoted crash event. - Agent processes live in
supervisor/, notweb/. The web tier reaches the supervisor throughweb/lib/supervisor-client.tsonly. ACP sessions are held live across permission HITL; designed checkpoint resume uses the sameacp_session_idhandle. - Scope labels are descriptive, not blockers — use docs labels
(
Implemented,Designed,Phase 2) to explain trade-offs. Do not block useful work solely because an old planning note called it out of scope.
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.

