ai-ops-cli 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,6 +19,8 @@ content:
19
19
  - 'For non-trivial business rules, start with a failing test (TDD).'
20
20
  - 'Use a functional-core / imperative-shell structure.'
21
21
  - 'Use immutable updates (const/final, copy/spread patterns).'
22
+ - 'Within a file, order declarations by role: types → constants → validators/guards → helper functions → main logic/exports.'
23
+ - 'When a file contains multiple semantic groups, add section divider comments (e.g., // ----- types -----) between groups.'
22
24
  decision_table:
23
25
  - when: 'Implementing complex business logic'
24
26
  then: 'Write failing tests first, then implement pure functions'
@@ -28,3 +30,6 @@ content:
28
30
  avoid: 'Early shared abstraction'
29
31
  - when: 'Similar code appears in three or more places'
30
32
  then: 'Extract a clearly named shared function'
33
+ - when: 'A file has two or more distinct semantic groups (types, constants, logic, etc.)'
34
+ then: 'Order declarations by role and add section divider comments between groups'
35
+ avoid: 'Flat interleaving of unrelated declarations without visual separation'
@@ -19,6 +19,7 @@
19
19
  ## Backend TS Library Constraints
20
20
 
21
21
  - Do not use moment/dayjs.
22
+ - Do not parse date strings with `new Date(string)`. It applies implicit local timezone coercion and silently shifts dates.
22
23
  - Do not use jsonwebtoken.
23
24
  - Do not handle Express req/res directly in NestJS handlers.
24
25
  - Do not import lodash as a full bundle.
@@ -29,6 +30,7 @@
29
30
 
30
31
  - Use class-validator and class-transformer DTO validation.
31
32
  - Use jose for JWT sign/verify and JWKS workflows.
33
+ - Use date-fns for date manipulation; import functions individually (e.g. `import { parseISO, format } from 'date-fns'`).
32
34
  - Use pino via nestjs-pino for structured logs.
33
35
  - Use rxjs operators in interceptors, guards, and event streams.
34
36
  - Use Vitest with @nestjs/testing and supertest.
@@ -40,4 +42,5 @@
40
42
  - When auth or roles depend on handler metadata, use guards.
41
43
  - When response transformation or timing is needed, use interceptors.
42
44
  - When JWT auth is needed, use jose.
45
+ - When parsing an ISO date string, use `parseISO()` from date-fns; avoid `new Date(string)`.
43
46
  - When structured logging is needed, use pino via nestjs-pino.
@@ -27,6 +27,7 @@
27
27
  ## Web Frontend Library Constraints
28
28
 
29
29
  - Do not use moment.js or dayjs.
30
+ - Do not parse date strings with `new Date(string)`. It applies implicit local timezone coercion and silently shifts dates.
30
31
  - Do not use react-icons.
31
32
  - Do not use axios in browser code.
32
33
  - Do not build conditional className strings manually.
@@ -36,6 +37,7 @@
36
37
  ## Web Frontend Library Guidelines
37
38
 
38
39
  - Keep styling on Tailwind and design tokens.
40
+ - Use date-fns for date formatting and manipulation; import functions individually (e.g. `import { parseISO, format } from 'date-fns'`).
39
41
  - Use next-intl for i18n and next-themes for theme switching.
40
42
  - Render Recharts only inside client components.
41
43
  - Mount one Sonner toaster at the app root.
@@ -48,4 +50,5 @@
48
50
  - When page data is needed for first render, fetch in server components.
49
51
  - When internal form mutation is needed, use server actions.
50
52
  - When form validation is needed, use zod with react-hook-form.
53
+ - When parsing an ISO date string, use `parseISO()` from date-fns; avoid `new Date(string)`.
51
54
  - When client UI state is needed, use a zustand slice.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-ops-cli",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "CLI for ai-ops scaffolding — manage AI tool rules and presets",
5
5
  "license": "MIT",
6
6
  "repository": {