- Match seal-use repository layout with .agents/rules and skills.json - Ensure no .agent singular directory or symlink exists - Set trigger: 'manual' on all rules to prevent automatic prompt injection - Track .agents/ in git by updating .gitignore
1.5 KiB
1.5 KiB
description, globs, trigger
| description | globs | trigger |
|---|---|---|
| TypeScript and ESM coding conventions for hose-use codebase | src/**/*.ts | manual |
TypeScript & ESM Conventions
When modifying or adding TypeScript files in src/:
-
Module System & Import Extensions:
- Use ES modules exclusively (
"type": "module"inpackage.json). - Local file imports MUST include explicit
.jsextensions (e.g.import { getGlobalDb } from "../db/connection.js"). - Do NOT omit the
.jsextension, or runtime Node/Bun ESM resolution will fail.
- Use ES modules exclusively (
-
Validation & Typing:
- Validate external inputs, environment variables, and external HTTP/JSON responses using Zod schemas or strictly typed models.
- Avoid
any. Prefer precise domain types defined insrc/domains/*/types.tsorsrc/types.ts. - Never suppress type errors with
// @ts-ignore; resolve type discrepancies cleanly.
-
Code Style & Formatting:
- 2-space indentation.
- Double quotes (
"). camelCasefor functions and variables,PascalCasefor classes, types, and interfaces.- Kebab-case filenames (e.g.
query-options.ts,task-service.ts).
-
Architecture & Separation of Concerns:
src/core/: Database (SQLite), HTTP client factory, encryption, global configuration, logger.src/domains/: Domain services, models, and business logic (e.g.bill,corps,task,workflow,key-center).src/cli/: Command-line definitions, option parsing, user feedback, table rendering, exit handling.- Keep domain services independent of CLI formatting.