- Monorepo: NestJS API (Fastify) + React web (antd/ProComponents) + shared packages - PostgreSQL/Prisma (unified resources, relations graph, audit, events, jobs) - Auth/RBAC/workspace isolation, credential vault (AES-256-GCM) - Servers/SSH, Docker discovery & lifecycle, Job Center - Websites & deployments (git provider credential clone, env, health verification) - Domains/DNS (Cloudflare adapter), certificates (TLS probe), monitoring - Automation (cron/event/webhook HMAC + notifications), AI Gateway, MCP (29 tools) - AI chat window (LLM function-calling + rules fallback, SSE streaming, approvals) - Notes: Vditor WYSIWYG markdown editor, non-blocking autosave - Tests: 35 unit/security tests; UI audit clean (desktop+mobile, deep links)
1.7 KiB
1.7 KiB
AGENTS.md — DevOS Coding Rules
Mission
Build DevOS as a maintainable modular monolith and preserve the Resource + Action + Event + Agent architecture.
Mandatory Rules
- TypeScript strict mode.
- Never use
anyunless explicitly justified. - All API endpoints use DTOs.
- Controllers contain transport concerns only.
- Business logic belongs in services/domain/application layers.
- Every mutation requires an audit record.
- Every credential is encrypted at rest.
- Secrets must never appear in logs or model context unless explicitly required and policy-approved.
- UI uses Ant Design / ProComponents unless there is a documented exception.
- Every feature must have an API contract.
- Every module must have tests appropriate to its risk.
- Do not introduce dependencies without justification.
- Provider-specific behavior belongs behind integration adapters.
- Long-running work must be asynchronous.
- External operations require timeout and explicit failure handling.
- HIGH/CRITICAL AI actions require approval.
- Security controls cannot be bypassed by UI, API, MCP or Agent paths.
- Preserve workspace isolation.
- Prefer idempotent operations.
- Update documentation when changing a domain contract.
Development Sequence
Requirement
↓
Domain Model
↓
API Contract
↓
UI / Interaction
↓
Tests
↓
Implementation
↓
Verification
↓
Documentation
Definition of Done
A feature is not done until:
- type checks pass
- tests pass
- API contract is documented
- authorization is enforced
- audit behavior is implemented where applicable
- error handling exists
- UI states cover loading/empty/error/success
- documentation is updated