This file provides guidance for agentic coding assistants working in this repo. It captures build/test commands, coding conventions, and repo-specific context. If these instructions conflict with system/user instructions, follow those.
- This repo currently contains design documents only.
- There is no application source code or tooling config yet.
- The docs in
docs/define the intended domain-first framework.
There are no build, lint, or test tools defined in the repo yet. If you add tooling in the future, update this file accordingly.
- Not defined. There is no build configuration in the repo.
- If a build system is introduced, document the primary command here.
- Not defined. There is no lint or formatter configuration in the repo.
- If a linter/formatter is introduced, document the primary command here.
- Not defined. There is no test runner configuration in the repo.
- If a test framework is introduced, document the primary command here.
- Not defined. There is no test runner configuration in the repo.
- When a test framework is introduced, include examples for: - Running one test file - Running a single test by name - Running a focused subset (e.g., tag, grep, or pattern)
There is no implementation code yet, so follow these general conventions until the codebase provides more specific guidance.
- Default to TypeScript for new code unless stated otherwise.
- Prefer ES module syntax (
import/export) overrequire/module.exports. - Keep files small and focused; avoid multi-concern modules.
- Group imports by source:
- Node built-ins
- External dependencies
- Internal modules
- Separate groups with a single blank line.
- Use named imports over default when the library supports it.
- Avoid deep relative import chains; prefer scoped internal paths when added.
- Use 2-space indentation unless the repo introduces a formatter.
- Prefer single quotes in JS/TS unless escaping would be excessive.
- Keep lines reasonably short (around 100 characters).
- Avoid trailing whitespace and keep a newline at EOF.
- Use explicit types for public APIs and exported functions.
- Prefer type aliases for data shapes and interfaces for contracts.
- Avoid
any; useunknownand narrow when needed. - Model domain concepts with strong types instead of primitives.
- Use
camelCasefor variables/functions. - Use
PascalCasefor types, classes, and constructors. - Use
SCREAMING_SNAKE_CASEfor constants only when truly global. - Names should reflect domain language from the docs.
- Validate input at the boundary (schema validation or equivalents).
- Prefer returning structured errors over throwing for expected failures.
- Throw only for programmer errors or truly exceptional conditions.
- Include context (domain identifiers, command names) in error payloads.
- Use
async/awaitfor readability. - Avoid unhandled promise chains; always return or await.
- Prefer explicit command enqueue/execute semantics for domain actions.
- Use structured logging with consistent fields when introduced.
- Propagate trace context when the tracing stack is added.
- Avoid logging sensitive data.
- Encode domain language directly in names (commands, events, queries).
- Keep invariants close to the domain model.
- Separate application services (edge orchestration) from domain logic.
- Use events to express facts, commands to express intent, queries to ask.
- Keep docs concise and narrative.
- Prefer examples that reflect the contents in
docs/.
- No
.cursor/rules/,.cursorrules, or.github/copilot-instructions.mdfiles exist in this repo currently. - If these are added later, include their requirements here.
- Make minimal, focused edits.
- Do not introduce new files unless required.
- Keep new content aligned with the domain-first principles in
docs/.