Skip to content

Minimal AGENT.md #223

@fraxken

Description

@fraxken

Create a minimal AGENTS.md for the NodeSecure repositories:

Here is a first draft of template

# ${name} Agent Guide

## Build & Test Commands

\```
# Build the project
npm run build

# Run all tests
npm test

# Run a single test file
node --test 'test/path/to/file.test.ts'

# Lint the code
npm run lint
\```

## Code Style Guidelines

- **TypeScript**: Strict typing with explicit type imports `import type { X }`. Avoid `any` all the times. Ensure types compliance.
- **Formatting**: Use UTF-8, LF line endings, 2-space indentation (no tabs), a final newline, and trim trailing whitespace.
- **Imports**: Strict order — Node.js core → Third-party → Internal — each group preceded by a comment (`// Import Node.js Dependencies`, etc.). Always use the `node:` prefix for core modules; never require().
- **Naming**: PascalCase for classes, camelCase for variables/functions, `#` prefix for private fields, ALL_CAPS for exported constants, `k`+PascalCase for file-local constants. Place all constants beneath imports under a `// CONSTANTS` comment.
- **API Design**: Consistent API interface with options objects and promise-based returns.
- **Testing**: Node.js test runner with deep assertions. Use deepStrictEqual when appropriate. Never modify the src folder. The test file for src/foo/bar/baz.ts is test/foo/bar/baz.test.ts
- **Comments**: always on the preceding line, never inline. Keep them concise.
- **Quotes**: double quotes or template literals; never single quotes.
- **Returns**: always add a blank line before return inside functions.

## Node Requirements
- Node.js >= 22.18.0 or >= 24.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions