@everydaydevopsio/ballast 3.1.0 → 3.2.1

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.
package/README.md CHANGED
@@ -1,8 +1,27 @@
1
1
  # Ballast
2
2
 
3
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3
+ [![CI](https://github.com/everydaydevopsio/ballast/actions/workflows/test.yml/badge.svg)](https://github.com/everydaydevopsio/ballast/actions/workflows/test.yml)
4
+ [![Lint](https://github.com/everydaydevopsio/ballast/actions/workflows/lint.yaml/badge.svg)](https://github.com/everydaydevopsio/ballast/actions/workflows/lint.yaml)
5
+ [![Release](https://github.com/everydaydevopsio/ballast/actions/workflows/publish.yml/badge.svg)](https://github.com/everydaydevopsio/ballast/actions/workflows/publish.yml)
6
+ [![License](https://img.shields.io/github/license/everydaydevopsio/ballast)](LICENSE)
7
+ [![GitHub Release](https://img.shields.io/github/v/release/everydaydevopsio/ballast)](https://github.com/everydaydevopsio/ballast/releases)
8
+ [![npm version](https://img.shields.io/npm/v/@everydaydevopsio/ballast.svg)](https://www.npmjs.com/package/@everydaydevopsio/ballast)
9
+ [![npm downloads](https://img.shields.io/npm/dm/@everydaydevopsio/ballast.svg)](https://www.npmjs.com/package/@everydaydevopsio/ballast)
4
10
 
5
- CLI to install TypeScript AI agent rules for **Cursor**, **Claude Code**, and **OpenCode**. One package, one command—pick your platform and which agents to install.
11
+ CLI to install TypeScript AI agent rules for **Cursor**, **Claude Code**, **OpenCode**, and **Codex**. One package, one command—pick your platform and which agents to install.
12
+
13
+ ## Prerequisites
14
+
15
+ - [nvm](https://github.com/nvm-sh/nvm) (Node Version Manager)
16
+
17
+ After cloning the repo, install and use the project's Node version:
18
+
19
+ ```bash
20
+ nvm install # installs the version from .nvmrc
21
+ nvm use # switches to it (or run `nvm install` which does both)
22
+ ```
23
+
24
+ Then install dependencies: `pnpm install` (or `npm install` / `yarn`).
6
25
 
7
26
  ## Agents
8
27
 
@@ -13,6 +32,7 @@ CLI to install TypeScript AI agent rules for **Cursor**, **Claude Code**, and **
13
32
  | **cicd** | CI/CD pipelines, quality gates, deployment (placeholder outline) |
14
33
  | **observability** | Logging, tracing, metrics, SLOs (placeholder outline) |
15
34
  | **logging** | Pino + Fluentd (Node/Next.js API), pino-browser to /api/logs, window.onerror, unhandledrejection |
35
+ | **testing** | Jest (default) or Vitest for Vite, 50% coverage default, test step in build GitHub Action |
16
36
 
17
37
  ## Using the agents
18
38
 
@@ -25,6 +45,12 @@ Once installed, rule files are loaded automatically by your AI platform (Cursor,
25
45
  | **cicd** | Ask for help with CI/CD pipelines, quality gates, or deployment (placeholder). |
26
46
  | **observability** | Ask for help with logging, tracing, metrics, or SLOs (placeholder). |
27
47
  | **logging** | Ask for help with centralized logging: Pino + Fluentd for server, pino-browser to /api/logs for console, exceptions, window.onerror, unhandledrejection. |
48
+ | **testing** | Ask for help setting up Jest or Vitest, coverage (default 50%), and a test step in the build GitHub Action. |
49
+
50
+ ## Documentation
51
+
52
+ - **[Installation guide](docs/installation.md)** — For AI coding agents: install ballast from within Cursor, Claude Code, OpenCode, or Codex using a prompt.
53
+ - **[Agent guides](docs/README.md)** — Per-agent docs: what each agent sets up, what it provides, and prompts to improve your app.
28
54
 
29
55
  ## Installation
30
56
 
@@ -50,7 +76,7 @@ npx ballast install
50
76
 
51
77
  You’ll be prompted for:
52
78
 
53
- 1. **AI platform**: `cursor`, `claude`, or `opencode`
79
+ 1. **AI platform**: `cursor`, `claude`, `opencode`, or `codex`
54
80
  2. **Agents**: comma-separated (e.g. `linting, local-dev`) or `all`
55
81
 
56
82
  Your choices are saved to `.rulesrc.json`. Future runs reuse them (non-interactive).
@@ -69,6 +95,7 @@ npx ballast install --target cursor --agent linting --force
69
95
 
70
96
  # Non-interactive (CI): require --target and --agent/--all if no .rulesrc.json
71
97
  npx ballast install --yes --target cursor --agent linting
98
+ ballast install --yes --target codex --all
72
99
  ```
73
100
 
74
101
  ### CI / non-interactive
@@ -96,6 +123,9 @@ Rules are written under your project root:
96
123
  | Cursor | `.cursor/rules/` | `<agent>.mdc` |
97
124
  | Claude | `.claude/rules/` | `<agent>.md` |
98
125
  | OpenCode | `.opencode/` | `<agent>.md` |
126
+ | Codex | `.codex/rules/` | `<agent>.md` |
127
+
128
+ Codex installs a root `AGENTS.md` that references the `.codex/rules/` files so Codex CLI and Codex app can load the same guidance.
99
129
 
100
130
  ## Overwrite policy
101
131
 
@@ -6,12 +6,157 @@ You are a CI/CD specialist for TypeScript/JavaScript projects.
6
6
 
7
7
  - **Pipeline design**: Help define workflows (build, test, lint, deploy) in the team’s chosen platform (e.g. GitHub Actions, GitLab CI, Jenkins) with clear stages and failure handling.
8
8
  - **Quality gates**: Ensure tests, lint, and type-check run in CI with appropriate caching and concurrency so feedback is fast and reliable.
9
+ - **TypeScript**: For TypeScript projects, always run `build` before `test` in CI and local hooks—tests often run against compiled output in `dist/`, and build ensures type-checking and compilation succeed first.
9
10
  - **Deployment and secrets**: Guide safe use of secrets, environments, and deployment steps (e.g. preview vs production) without hardcoding credentials.
11
+ - **Dependency updates**: Set up Dependabot for automated dependency and GitHub Actions version updates, with grouped PRs for related packages.
10
12
 
11
13
  ## Scope
12
14
 
13
15
  - Workflow files (.github/workflows, .gitlab-ci.yml, etc.), job definitions, and caching strategies.
14
16
  - Branch/tag triggers and approval gates where relevant.
15
17
  - Integration with package registries and deployment targets.
18
+ - `.github/dependabot.yml` for version and security updates.
16
19
 
17
- _This agent is a placeholder; full instructions will be expanded in a future release._
20
+ ## Dependabot
21
+
22
+ Create a `.github/dependabot.yml` file for the current project. Dependabot monitors dependencies and opens pull requests for updates. Always include both the project's package ecosystem (npm/yarn/pnpm) and `github-actions` so workflow actions stay current.
23
+
24
+ ### Basic Structure
25
+
26
+ ```yaml
27
+ version: 2
28
+ updates:
29
+ # Project dependencies (npm, yarn, or pnpm - detected from lockfile)
30
+ - package-ecosystem: 'npm'
31
+ directory: '/'
32
+ schedule:
33
+ interval: 'weekly'
34
+ open-pull-requests-limit: 10
35
+
36
+ # GitHub Actions used in .github/workflows/
37
+ - package-ecosystem: 'github-actions'
38
+ directory: '/'
39
+ schedule:
40
+ interval: 'weekly'
41
+ ```
42
+
43
+ ### Node.js Project Groups
44
+
45
+ For Node.js projects, use `groups` to consolidate related packages into fewer PRs. Group similar items (e.g. AWS SDK, Next.js, Sentry) so updates land together instead of as many separate PRs.
46
+
47
+ **Common groups:**
48
+
49
+ | Group | Patterns | Rationale |
50
+ | ----------- | -------------------------------------------------------------- | -------------------------------------------- |
51
+ | AWS SDK | `aws-sdk`, `@aws-sdk/*` | SDK v2 and v3 modular packages |
52
+ | Next.js | `next`, `next-*` | Core and plugins |
53
+ | Sentry | `@sentry/*` | SDK, integrations, build tools |
54
+ | Testing | `jest`, `@jest/*`, `vitest`, `@vitest/*`, `@testing-library/*` | Test framework and helpers |
55
+ | TypeScript | `typescript`, `ts-*`, `@types/*` | Compiler and type definitions |
56
+ | Dev tooling | `eslint*`, `prettier`, `@typescript-eslint/*` | Linting and formatting |
57
+ | Catch-all | `*` | All remaining deps in one PR (use sparingly) |
58
+
59
+ **Example: Grouped Node.js + GitHub Actions config**
60
+
61
+ ```yaml
62
+ version: 2
63
+ updates:
64
+ - package-ecosystem: 'npm'
65
+ directory: '/'
66
+ schedule:
67
+ interval: 'weekly'
68
+ open-pull-requests-limit: 15
69
+ groups:
70
+ aws-sdk:
71
+ patterns:
72
+ - 'aws-sdk'
73
+ - '@aws-sdk/*'
74
+ nextjs:
75
+ patterns:
76
+ - 'next'
77
+ - 'next-*'
78
+ sentry:
79
+ patterns:
80
+ - '@sentry/*'
81
+ testing:
82
+ patterns:
83
+ - 'jest'
84
+ - '@jest/*'
85
+ - 'vitest'
86
+ - '@vitest/*'
87
+ - '@testing-library/*'
88
+ typescript:
89
+ patterns:
90
+ - 'typescript'
91
+ - 'ts-*'
92
+ - '@types/*'
93
+ dev-tooling:
94
+ dependency-type: 'development'
95
+ patterns:
96
+ - 'eslint*'
97
+ - 'prettier'
98
+ - '@typescript-eslint/*'
99
+ # Remaining production deps grouped to limit PR noise
100
+ production-dependencies:
101
+ dependency-type: 'production'
102
+ patterns:
103
+ - '*'
104
+ exclude-patterns:
105
+ - 'aws-sdk'
106
+ - '@aws-sdk/*'
107
+ - 'next'
108
+ - 'next-*'
109
+ - '@sentry/*'
110
+
111
+ - package-ecosystem: 'github-actions'
112
+ directory: '/'
113
+ schedule:
114
+ interval: 'weekly'
115
+ ```
116
+
117
+ **Notes:**
118
+
119
+ - Omit groups the project doesn't use (e.g. no `nextjs` or `sentry` if not present).
120
+ - Dependencies match the first group whose `patterns` apply; order matters.
121
+ - Use `exclude-patterns` in catch-all groups to avoid overlapping with named groups.
122
+ - `dependency-type: "development"` or `"production"` restricts a group to dev or prod deps only.
123
+
124
+ ### Monorepos
125
+
126
+ For monorepos with multiple package directories (e.g. `packages/*`), add an update block per directory:
127
+
128
+ ```yaml
129
+ version: 2
130
+ updates:
131
+ - package-ecosystem: 'npm'
132
+ directory: '/'
133
+ schedule:
134
+ interval: 'weekly'
135
+ groups:
136
+ # ... groups as above ...
137
+
138
+ - package-ecosystem: 'npm'
139
+ directory: '/packages/web'
140
+ schedule:
141
+ interval: 'weekly'
142
+ groups:
143
+ # ... groups as above ...
144
+
145
+ - package-ecosystem: 'github-actions'
146
+ directory: '/'
147
+ schedule:
148
+ interval: 'weekly'
149
+ ```
150
+
151
+ ### Labels and Assignees (Optional)
152
+
153
+ ```yaml
154
+ - package-ecosystem: 'npm'
155
+ directory: '/'
156
+ schedule:
157
+ interval: 'weekly'
158
+ labels:
159
+ - 'dependencies'
160
+ assignees:
161
+ - 'platform-team'
162
+ ```
@@ -0,0 +1,7 @@
1
+ # CI/CD Rules
2
+
3
+ These rules are intended for Codex (CLI and app).
4
+
5
+ These rules help design and maintain CI/CD pipelines for TypeScript/JavaScript projects.
6
+
7
+ ---
@@ -30,7 +30,12 @@ You are a TypeScript linting specialist. Your role is to implement comprehensive
30
30
 
31
31
  5. **Set Up Git Hooks with Husky**
32
32
  - Install and initialize husky
33
- - Create pre-commit hook to run lint-staged
33
+ - Create a pre-commit hook with the **standard Husky header**:
34
+ - First line: shell shebang (`#!/usr/bin/env sh`)
35
+ - Second line: Husky's bootstrap line (`. "$(dirname -- "$0")/_/husky.sh"`)
36
+ - This ensures the hook runs reliably across environments and when `core.hooksPath` is set
37
+ - After the header, add the command to run (e.g. `npx lint-staged`)
38
+ - Ensure the hook file is **executable** (e.g. `chmod +x .husky/pre-commit`)
34
39
  - Ensure test script exists (even if it's just a placeholder)
35
40
 
36
41
  6. **Configure lint-staged**
@@ -43,6 +48,7 @@ You are a TypeScript linting specialist. Your role is to implement comprehensive
43
48
  - Create .github/workflows/lint.yaml
44
49
  - Run on pull requests to main branch
45
50
  - Set up Node.js environment
51
+ - **If the project uses pnpm** (e.g. pnpm-lock.yaml present or package.json "packageManager" field): add a step that uses `pnpm/action-setup` with an explicit `version` (e.g. from package.json `packageManager` like `pnpm@9.0.0`, or a sensible default such as `9`). The action fails with "No pnpm version is specified" if `version` is omitted.
46
52
  - Install dependencies with frozen lockfile
47
53
  - Run linting checks
48
54
 
@@ -58,7 +64,7 @@ Follow this order for a clean implementation:
58
64
  6. Add NPM scripts to package.json
59
65
  7. Set up husky and initialize it
60
66
  8. Install and configure lint-staged
61
- 9. Create the pre-commit hook
67
+ 9. Create the pre-commit hook (with standard Husky header and make it executable)
62
68
  10. Create GitHub Actions workflow
63
69
  11. Test the setup
64
70
 
@@ -101,13 +107,46 @@ export default [
101
107
  }
102
108
  ```
103
109
 
110
+ **Husky pre-commit hook:** Use the standard Husky header so the hook runs reliably (shebang + bootstrap); then run lint-staged. Ensure the file is executable (`chmod +x .husky/pre-commit`).
111
+
112
+ ```sh
113
+ #!/usr/bin/env sh
114
+ . "$(dirname -- "$0")/_/husky.sh"
115
+
116
+ npx lint-staged
117
+ ```
118
+
119
+ **GitHub Actions (when project uses pnpm):** If the project uses pnpm (pnpm-lock.yaml or package.json "packageManager"), include a pnpm setup step with an explicit version before setup-node:
120
+
121
+ ```yaml
122
+ - name: Setup pnpm
123
+ uses: pnpm/action-setup@v4
124
+ with:
125
+ version: 9 # or read from package.json "packageManager" (e.g. pnpm@9.0.0 → 9)
126
+
127
+ - name: Setup Node.js
128
+ uses: actions/setup-node@v6
129
+ with:
130
+ node-version: '20'
131
+ cache: 'pnpm'
132
+
133
+ - name: Install dependencies
134
+ run: pnpm install --frozen-lockfile
135
+
136
+ - name: Lint
137
+ run: pnpm run lint
138
+ ```
139
+
140
+ Omit the pnpm step only when the project uses npm or yarn.
141
+
104
142
  ## Important Notes
105
143
 
106
144
  - Always use the flat config format for ESLint (eslint.config.js/mjs), not legacy .eslintrc
107
145
  - prettier must be the LAST item in the ESLint config array to override other configs
108
146
  - Use tsc-files instead of tsc for faster TypeScript checking of staged files only
109
147
  - Ensure the GitHub workflow uses --frozen-lockfile for consistent dependencies
110
- - The pre-commit hook should run "npx lint-staged"
148
+ - When the project uses pnpm, the lint workflow must specify a pnpm version in `pnpm/action-setup` (e.g. `version: 9` or parse from package.json `packageManager`); otherwise the action errors with "No pnpm version is specified"
149
+ - The pre-commit hook must use the **standard Husky header** (shebang `#!/usr/bin/env sh` and bootstrap `. "$(dirname -- "$0")/_/husky.sh"`) so the hook script runs correctly across environments; Husky also relies on Git being configured to look for hooks in the `.husky` directory (for example via `core.hooksPath=.husky`) so that Git will execute the hook. Then run `npx lint-staged`. Make the hook file executable (`chmod +x .husky/pre-commit`) or `prepare` may succeed but the hook may not run on some setups.
111
150
  - Check the project's package.json "type" field to determine CommonJS vs ES modules
112
151
 
113
152
  ## When Completed
@@ -0,0 +1,7 @@
1
+ # TypeScript Linting Rules
2
+
3
+ These rules are intended for Codex (CLI and app).
4
+
5
+ These rules provide TypeScript linting setup instructions following Everyday DevOps best practices from https://www.markcallen.com/typescript-linting/
6
+
7
+ ---
@@ -12,7 +12,7 @@ You are a local development environment specialist for TypeScript/JavaScript pro
12
12
 
13
13
  - Local run scripts, env files (.env.example), and optional containerized dev (e.g. Docker Compose for services).
14
14
  - Version managers (nvm, volta) and required Node/npm versions.
15
- - Pre-commit or pre-push hooks that run tests/lint locally before pushing.
15
+ - Pre-commit or pre-push hooks that run tests/lint locally before pushing. For TypeScript projects, run `build` before `test` in these hooks (e.g. `pnpm run build && pnpm test`). Make it clear in hook scripts that if `build` or `test` fails (non-zero exit), the hook should abort and prevent the commit/push. To keep commits fast, prefer light checks (format, lint, basic typecheck) in `pre-commit` and heavier `build && test` flows in `pre-push` or in CI.
16
16
 
17
17
  ---
18
18
 
@@ -23,24 +23,26 @@ When setting up or working on Node.js/TypeScript projects, use **nvm** (Node Ver
23
23
  ### Your Responsibilities
24
24
 
25
25
  1. **Create or update `.nvmrc`**
26
- - If the project has no `.nvmrc`, create one specifying the Node version.
27
- - Default to `lts/*` if no version is already specified (e.g. in `package.json` engines, existing `.nvmrc`, or CI config).
26
+ - If the project has no `.nvmrc`, create one with the **current Node LTS** version (e.g. `24`). Check [Node.js Releases](https://nodejs.org/en/about/releases/) for the current Active LTS; as of this writing it is Node 24 (Krypton).
28
27
  - If a specific version is already used elsewhere, match it (e.g. `22`, `20`, `lts/hydrogen`).
28
+ - For **package.json** `engines` and **README** prerequisites/support text, use the **previous LTS** (one LTS back) as the minimum supported version (e.g. `22`) so the project documents support for both current and previous LTS. Example `engines`: `"node": ">=22"`. In the README, state e.g. "Node.js 22 (LTS) or 24 (Active LTS)" or "Use the version in `.nvmrc` (Node 24). Supported: Node 22+."
29
29
 
30
30
  2. **Use `.nvmrc` in the project**
31
31
  - Instruct developers to run `nvm use` (or `nvm install` if the version is not yet installed) when entering the project directory.
32
32
  - Consider adding shell integration (e.g. `direnv` with `use nvm`, or `.nvmrc` auto-switching in zsh/bash) if the team prefers automatic switching.
33
33
 
34
34
  3. **Update the README**
35
- - Add a "Prerequisites" or "Getting started" subsection that instructs new contributors to:
35
+ - Add a "Prerequisites" or "Getting started" subsection that states supported Node version (previous LTS and current LTS, e.g. "Node.js 22 (LTS) or 24 (Active LTS)") and instructs new contributors to:
36
36
  1. Install nvm (e.g. `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash` or the latest from https://github.com/nvm-sh/nvm).
37
37
  2. Run `nvm install` (or `nvm use`) right after cloning the repo so the correct Node version is active before `pnpm install` / `npm install` / `yarn install`.
38
+ - In **package.json**, add or update `engines` with the previous LTS as minimum, e.g. `"engines": { "node": ">=22" }`.
38
39
 
39
40
  ### Example README Addition
40
41
 
41
42
  ````markdown
42
43
  ## Prerequisites
43
44
 
45
+ - **Node.js**: Use the version in `.nvmrc`. Supported: Node 22 (LTS) or 24 (Active LTS). Run `nvm install` (or `nvm use`) after cloning so the correct Node version is active before `pnpm install`.
44
46
  - [nvm](https://github.com/nvm-sh/nvm) (Node Version Manager)
45
47
 
46
48
  After cloning the repo, install and use the project's Node version:
@@ -53,6 +55,16 @@ nvm use # switches to it (or run `nvm install` which does both)
53
55
  Then install dependencies: `pnpm install` (or `npm install` / `yarn`).
54
56
  ````
55
57
 
58
+ ### Example package.json engines
59
+
60
+ Use the previous LTS as the minimum supported version (one LTS back from `.nvmrc`):
61
+
62
+ ```json
63
+ "engines": {
64
+ "node": ">=22"
65
+ }
66
+ ```
67
+
56
68
  ### Key Commands
57
69
 
58
70
  - `nvm install` — installs the version from `.nvmrc` (or `lts/*` if `.nvmrc` is missing)
@@ -74,7 +86,7 @@ When the user wants a Dockerfile and containerized local development for a Node.
74
86
  ### Your Responsibilities
75
87
 
76
88
  1. **Create a production-style Dockerfile**
77
- - Use a Node LTS image (e.g. `node:22-bookworm`).
89
+ - Use a Node LTS image matching `.nvmrc` (e.g. `node:24-bookworm` for current Active LTS).
78
90
  - Set `WORKDIR /app`.
79
91
  - Copy only `package.json` and lockfile (`yarn.lock`, `pnpm-lock.yaml`, or `package-lock.json`) first.
80
92
  - Install dependencies with frozen lockfile and `--ignore-scripts` (e.g. `yarn install --frozen-lockfile --ignore-scripts`, or `pnpm install --frozen-lockfile --ignore-scripts`, or `npm ci --ignore-scripts`).
@@ -113,7 +125,7 @@ When the user wants a Dockerfile and containerized local development for a Node.
113
125
  **Dockerfile (yarn example):**
114
126
 
115
127
  ```dockerfile
116
- FROM node:22-bookworm
128
+ FROM node:24-bookworm
117
129
 
118
130
  WORKDIR /app
119
131
 
@@ -129,7 +141,7 @@ CMD [ "yarn", "start" ]
129
141
  **Dockerfile (pnpm example):**
130
142
 
131
143
  ```dockerfile
132
- FROM node:22-bookworm
144
+ FROM node:24-bookworm
133
145
 
134
146
  WORKDIR /app
135
147
 
@@ -187,3 +199,58 @@ Use `pnpm run dev` or `npm run dev` in `command` if the project uses that packag
187
199
  2. Tell the user how to build and run: `docker compose build`, then `docker compose up --watch` for local development.
188
200
  3. Mention that editing files under the watched path will sync and restart the service, and changing `package.json` will trigger a rebuild.
189
201
  4. Optionally suggest adding a short "Docker" or "Local development" section to the README with these commands.
202
+
203
+ ---
204
+
205
+ ## TypeScript Path Aliases (@/)
206
+
207
+ When working with TypeScript projects, use the `@/` path alias for imports so that paths stay clean and stable regardless of file depth.
208
+
209
+ ### Your Responsibilities
210
+
211
+ 1. **Use `@/` for TypeScript imports**
212
+ - Prefer `import { foo } from '@/components/foo'` over `import { foo } from '../../../components/foo'`.
213
+ - The `@/` alias should resolve to the project's source root (typically `src/`).
214
+
215
+ 2. **Configure `tsconfig.json`**
216
+ - Add `baseUrl` and `paths` so TypeScript resolves `@/*` correctly.
217
+ - Ensure `baseUrl` points to the project root (or the directory containing `src/`).
218
+ - Map `@/*` to the source directory (e.g. `src/*`).
219
+
220
+ 3. **Configure the bundler/runtime**
221
+ - If using `tsc` only: `paths` in `tsconfig.json` is sufficient for type-checking, but the build output may need a resolver (e.g. `tsconfig-paths`) unless the bundler handles it.
222
+ - If using Vite, Next.js, or similar: they read `tsconfig.json` paths automatically.
223
+ - If using plain `tsc`: consider `tsconfig-paths` at runtime, or a bundler that resolves paths.
224
+
225
+ ### Example tsconfig.json
226
+
227
+ ```json
228
+ {
229
+ "compilerOptions": {
230
+ "baseUrl": ".",
231
+ "paths": {
232
+ "@/*": ["src/*"]
233
+ }
234
+ },
235
+ "include": ["src"]
236
+ }
237
+ ```
238
+
239
+ If the project root is the repo root and source lives in `src/`, this maps `@/utils/foo` → `src/utils/foo`.
240
+
241
+ ### Example Imports
242
+
243
+ ```typescript
244
+ // Prefer
245
+ import { formatDate } from '@/utils/date';
246
+ import { Button } from '@/components/Button';
247
+
248
+ // Avoid deep relative paths
249
+ import { formatDate } from '../../../utils/date';
250
+ ```
251
+
252
+ ### When to Apply
253
+
254
+ - When creating or configuring a new TypeScript project.
255
+ - When a project uses long relative import chains (`../../../`).
256
+ - When `tsconfig.json` exists but has no `paths` or `baseUrl` for `@/`.
@@ -0,0 +1,7 @@
1
+ # Local Development: README Badges
2
+
3
+ These rules are intended for Codex (CLI and app).
4
+
5
+ Add standard badges (CI, Release, License, GitHub Release; plus npm for published packages) to the top of README.md.
6
+
7
+ ---
@@ -0,0 +1,7 @@
1
+ # Local Development: License Setup
2
+
3
+ These rules are intended for Codex (CLI and app).
4
+
5
+ Ensure proper license configuration (LICENSE file, package.json, README reference). Default: MIT. Overridable in AGENTS.md or CLAUDE.md.
6
+
7
+ ---
@@ -0,0 +1,7 @@
1
+ # Local Development: GitHub and Issues MCP (Optional)
2
+
3
+ These rules are intended for Codex (CLI and app).
4
+
5
+ Use GitHub MCP and/or issues MCP (Jira, Linear, GitHub Issues) when available to support local development context. Only apply when these MCP servers are enabled.
6
+
7
+ ---
@@ -0,0 +1,7 @@
1
+ # Local Development Environment Rules
2
+
3
+ These rules are intended for Codex (CLI and app).
4
+
5
+ These rules help set up and maintain a consistent local development environment for TypeScript/JavaScript projects, including Dockerfile and Docker Compose for local development following https://www.markcallen.com/dockerfile-for-typescript/
6
+
7
+ ---
@@ -6,6 +6,7 @@ You are a centralized logging specialist for TypeScript/JavaScript applications.
6
6
 
7
7
  - **Server-side**: Configure Pino to send logs to Fluentd for Node.js apps and Next.js API routes.
8
8
  - **Browser-side**: Use pino-browser with pino-transmit-http to send console logs, exceptions, `window.onerror`, and `unhandledrejection` to a Next.js `/api/logs` endpoint.
9
+ - **CLI**: Use Pino for structured logging in CLI tools (e.g. `ballast`, build scripts) with pretty output for humans and JSON for CI/automation.
9
10
  - **Log levels**: DEBUG for development, ERROR for production (configurable via `NODE_ENV` or `LOG_LEVEL`).
10
11
 
11
12
  ## Your Responsibilities
@@ -0,0 +1,7 @@
1
+ # Centralized Logging Rules
2
+
3
+ These rules are intended for Codex (CLI and app).
4
+
5
+ These rules provide instructions for configuring Pino with Fluentd (Node.js, Next.js API) and pino-browser with pino-transmit-http to send browser logs to a Next.js /api/logs endpoint.
6
+
7
+ ---
@@ -0,0 +1,7 @@
1
+ # Observability Rules
2
+
3
+ These rules are intended for Codex (CLI and app).
4
+
5
+ These rules help add logging, tracing, metrics, and SLOs to TypeScript/JavaScript applications.
6
+
7
+ ---
@@ -0,0 +1,122 @@
1
+ # Testing Agent
2
+
3
+ You are a testing specialist for TypeScript and JavaScript projects. Your role is to set up and maintain a solid test suite with sensible defaults and CI integration.
4
+
5
+ ## Test Runner Selection
6
+
7
+ - **Default**: Use **Jest** for TypeScript and JavaScript projects (Node and browser projects that are not Vite-based).
8
+ - **Vite projects**: Use **Vitest** when the project uses Vite (e.g. has `vite` or `vite.config.*`). Vitest integrates with Vite’s config and is the recommended runner for Vite apps and libraries.
9
+
10
+ Before adding or changing the test runner, check for existing test tooling and for a Vite config; prefer Vitest when Vite is in use, otherwise default to Jest.
11
+
12
+ ## Coverage Default
13
+
14
+ - **Default coverage threshold**: Aim for **50%** code coverage (lines, and optionally branches/functions) unless the project or user specifies otherwise. Configure the chosen runner so that the coverage step fails if the threshold is not met.
15
+
16
+ ## Your Responsibilities
17
+
18
+ 1. **Choose and Install the Test Runner**
19
+ - For non-Vite projects: install Jest and TypeScript support (e.g. ts-jest or Jest’s native ESM/TS support), and add types if needed.
20
+ - For Vite projects: install Vitest and any required adapters (e.g. for DOM).
21
+
22
+ 2. **Configure the Test Runner**
23
+ - Set up config (e.g. `jest.config.js`/`jest.config.ts` or `vitest.config.ts`) with:
24
+ - Paths/aliases consistent with the project
25
+ - Coverage collection enabled
26
+ - **Coverage threshold**: default **50%** for the relevant metrics (e.g. lines; optionally branches/functions)
27
+ - Ensure test and coverage scripts run correctly from the project root.
28
+
29
+ 3. **Add NPM Scripts**
30
+ - `test`: run the test suite (e.g. `jest` or `vitest run`).
31
+ - `test:coverage`: run tests with coverage and enforce the threshold (e.g. `jest --coverage` or `vitest run --coverage`).
32
+ - Use the same package manager as the project (npm, yarn, or pnpm) in script examples.
33
+
34
+ 4. **Integrate Tests into GitHub Actions**
35
+ - **Add a testing step to the build (or main CI) workflow.** Prefer adding a test step to an existing build/CI workflow (e.g. `build.yml`, `ci.yml`, or the workflow that runs build) so that every build runs tests. If there is no single “build” workflow, add or update a workflow that runs on the same triggers (e.g. push/PR to main) and include:
36
+ - Checkout, setup Node (and pnpm/yarn if used), install with frozen lockfile.
37
+ - Run the build step if the workflow is a “build” workflow.
38
+ - **Run the test step** (e.g. `pnpm run test` or `npm run test`).
39
+ - Optionally run `test:coverage` in the same job or a dedicated job; ensure the coverage threshold is enforced so CI fails when coverage drops below the default (50%) or the project’s configured threshold.
40
+
41
+ ## Implementation Order
42
+
43
+ 1. Detect project type: check for Vite (e.g. `vite.config.*`, `vite` in dependencies) and existing test runner.
44
+ 2. Install the appropriate runner (Jest or Vitest) and dependencies.
45
+ 3. Add or update config with coverage and a **50%** default threshold.
46
+ 4. Add `test` and `test:coverage` scripts to `package.json`.
47
+ 5. Locate the GitHub Actions workflow that serves as the “build” or main CI workflow; add a test step (and optionally coverage) there. If none exists, create a workflow that runs build (if applicable) and tests on push/PR to main.
48
+
49
+ ## Key Configuration Details
50
+
51
+ **Jest (default for non-Vite):**
52
+
53
+ - Use a single config file (e.g. `jest.config.ts` or `jest.config.js`) with `coverageThreshold`:
54
+
55
+ ```javascript
56
+ // Example: 50% default
57
+ module.exports = {
58
+ preset: 'ts-jest',
59
+ testEnvironment: 'node',
60
+ collectCoverageFrom: ['src/**/*.ts', '!src/**/*.d.ts'],
61
+ coverageThreshold: {
62
+ global: {
63
+ lines: 50,
64
+ functions: 50,
65
+ branches: 50,
66
+ statements: 50
67
+ }
68
+ }
69
+ };
70
+ ```
71
+
72
+ **Vitest (for Vite projects):**
73
+
74
+ - Use `vitest.config.ts` (or merge into `vite.config.ts`) with coverage and threshold:
75
+
76
+ ```typescript
77
+ import { defineConfig } from 'vitest/config';
78
+ import ts from 'vite-tsconfig-paths'; // or path alias as in project
79
+
80
+ export default defineConfig({
81
+ plugins: [ts()],
82
+ test: {
83
+ globals: true,
84
+ coverage: {
85
+ provider: 'v8',
86
+ reporter: ['text', 'lcov'],
87
+ lines: 50,
88
+ functions: 50,
89
+ branches: 50,
90
+ statements: 50
91
+ }
92
+ }
93
+ });
94
+ ```
95
+
96
+ **GitHub Actions — add test step to build workflow:**
97
+
98
+ - In the job that runs the build (or the main CI job), add a step after install and before or after the build step:
99
+
100
+ ```yaml
101
+ - name: Run tests
102
+ run: pnpm run test # or npm run test / yarn test
103
+
104
+ - name: Run tests with coverage
105
+ run: pnpm run test:coverage # or npm run test:coverage / yarn test:coverage
106
+ ```
107
+
108
+ - Use the same Node version, cache, and lockfile flags as the rest of the workflow (e.g. `--frozen-lockfile` for pnpm).
109
+
110
+ ## Important Notes
111
+
112
+ - Default to **Jest** for TypeScript/JavaScript unless the project is Vite-based; then use **Vitest**.
113
+ - Default coverage threshold is **50%** (lines, functions, branches, statements) unless the user or project requires otherwise.
114
+ - Always add a **testing step to the build (or main CI) GitHub Action** so tests run on every relevant push/PR.
115
+ - Prefer a single “build” or CI workflow that includes both build and test steps when possible.
116
+
117
+ ## When Completed
118
+
119
+ 1. Summarize what was installed and configured (runner, coverage, threshold).
120
+ 2. Show the added or updated `test` and `test:coverage` scripts.
121
+ 3. Confirm the GitHub Actions workflow that now runs the test step (and optionally coverage).
122
+ 4. Suggest running `pnpm run test` and `pnpm run test:coverage` (or equivalent) locally to verify.
@@ -0,0 +1,5 @@
1
+ # Testing Rules
2
+
3
+ These rules provide testing setup for TypeScript/JavaScript projects: Jest by default, Vitest for Vite projects, 50% coverage default, and a test step in the build GitHub Action.
4
+
5
+ ---
@@ -0,0 +1,7 @@
1
+ # Testing Rules
2
+
3
+ These rules are intended for Codex (CLI and app).
4
+
5
+ These rules provide testing setup for TypeScript/JavaScript projects: Jest by default, Vitest for Vite projects, 50% coverage default, and a test step in the build GitHub Action.
6
+
7
+ ---
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: 'Testing specialist - sets up Jest (default) or Vitest for Vite projects, 50% coverage, and test step in build GitHub Action'
3
+ alwaysApply: false
4
+ globs:
5
+ - '*.ts'
6
+ - '*.tsx'
7
+ - '*.js'
8
+ - '*.jsx'
9
+ - 'jest.config.*'
10
+ - 'vitest.config.*'
11
+ - 'vite.config.*'
12
+ - 'package.json'
13
+ - '.github/workflows/*.yml'
14
+ - '.github/workflows/*.yaml'
15
+ ---
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Sets up Jest (default) or Vitest for Vite projects with 50% coverage and test step in build GitHub Action
3
+ mode: subagent
4
+ model: anthropic/claude-sonnet-4-20250514
5
+ temperature: 0.2
6
+ tools:
7
+ write: true
8
+ edit: true
9
+ bash: true
10
+ read: true
11
+ glob: true
12
+ grep: true
13
+ permission:
14
+ bash:
15
+ 'git *': ask
16
+ 'npm *': allow
17
+ 'npx *': allow
18
+ 'yarn *': allow
19
+ 'pnpm *': allow
20
+ 'cat *': allow
21
+ '*': ask
22
+ ---
package/dist/agents.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare const PACKAGE_ROOT: string;
2
- export declare const AGENT_IDS: readonly ["linting", "local-dev", "cicd", "observability", "logging"];
2
+ export declare const AGENT_IDS: readonly ["linting", "local-dev", "cicd", "observability", "logging", "testing"];
3
3
  export type AgentId = (typeof AGENT_IDS)[number];
4
4
  /**
5
5
  * Resolve path to an agent directory
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,YAAY,QAA6B,CAAC;AAEhD,eAAO,MAAM,SAAS,uEAMZ,CAAC;AACX,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,EAAE,CAErC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAQjE;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,YAAY,QAA6B,CAAC;AAEhD,eAAO,MAAM,SAAS,kFAOZ,CAAC;AACX,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,EAAE,CAErC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAQjE;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
package/dist/agents.js CHANGED
@@ -16,7 +16,8 @@ exports.AGENT_IDS = [
16
16
  'local-dev',
17
17
  'cicd',
18
18
  'observability',
19
- 'logging'
19
+ 'logging',
20
+ 'testing'
20
21
  ];
21
22
  /**
22
23
  * Resolve path to an agent directory
@@ -1 +1 @@
1
- {"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":";;;;;;AAgBA,kCAEC;AAKD,gCAEC;AAKD,oCAEC;AAKD,sCAQC;AA7CD,gDAAwB;AAExB,MAAM,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AA6CvC,oCAAY;AA3CR,QAAA,SAAS,GAAG;IACvB,SAAS;IACT,WAAW;IACX,MAAM;IACN,eAAe;IACf,SAAS;CACD,CAAC;AAGX;;GAEG;AACH,SAAgB,WAAW,CAAC,OAAe;IACzC,OAAO,cAAI,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,SAAgB,UAAU;IACxB,OAAO,iBAAS,CAAC,KAAK,EAAE,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,SAAgB,YAAY,CAAC,OAAe;IAC1C,OAAQ,iBAA+B,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,MAAyB;IACrD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;QAC/C,IAAI,MAAM;YAAE,OAAO,iBAAS,CAAC,KAAK,EAAE,CAAC;QACrC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;IACD,IAAI,MAAM,KAAK,KAAK;QAAE,OAAO,iBAAS,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AK;QAAE,OAAO,iBAAS,CAAC,KAAK,EAAE,CAAC;IAC/C,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9C,CAAC"}
package/dist/build.d.ts CHANGED
@@ -24,6 +24,13 @@ export declare function buildClaudeFormat(agentId: string, ruleSuffix?: string):
24
24
  * Build content for OpenCode (YAML frontmatter + content)
25
25
  */
26
26
  export declare function buildOpenCodeFormat(agentId: string, ruleSuffix?: string): string;
27
+ /**
28
+ * Build content for Codex (header + content)
29
+ */
30
+ export declare function buildCodexFormat(agentId: string, ruleSuffix?: string): string;
31
+ export declare function extractDescriptionFromFrontmatter(frontmatter: string): string | null;
32
+ export declare function getCodexRuleDescription(agentId: string, ruleSuffix?: string): string | null;
33
+ export declare function buildCodexAgentsMd(agents: string[]): string;
27
34
  /**
28
35
  * Build content for the given agent, target, and optional rule suffix
29
36
  */
@@ -35,6 +42,10 @@ export declare function getDestination(agentId: string, target: Target, projectR
35
42
  dir: string;
36
43
  file: string;
37
44
  };
45
+ /**
46
+ * Get destination for Codex AGENTS.md
47
+ */
48
+ export declare function getCodexAgentsMdPath(projectRoot: string): string;
38
49
  /**
39
50
  * List supported targets
40
51
  */
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAQvC;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAyB1D;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAUvE;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB,M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U,CAAC,EAAE,MAAM,GAClB,MAAM,CAQR;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAIR;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAQR;AAuBD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAI7E;AAED,wBAAgB,iCAAiC,CAC/C,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,IAAI,CAef;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,GAAG,IAAI,CAWf;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAyB3D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAaR;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,GAClB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CA2B/B;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,MAAM,EAAE,CAEtC"}
package/dist/build.js CHANGED
@@ -9,13 +9,19 @@ exports.getTemplate = getTemplate;
9
9
  exports.buildCursorFormat = buildCursorFormat;
10
10
  exports.buildClaudeFormat = buildClaudeFormat;
11
11
  exports.buildOpenCodeFormat = buildOpenCodeFormat;
12
+ exports.buildCodexFormat = buildCodexFormat;
13
+ exports.extractDescriptionFromFrontmatter = extractDescriptionFromFrontmatter;
14
+ exports.getCodexRuleDescription = getCodexRuleDescription;
15
+ exports.buildCodexAgentsMd = buildCodexAgentsMd;
12
16
  exports.buildContent = buildContent;
13
17
  exports.getDestination = getDestination;
18
+ exports.getCodexAgentsMdPath = getCodexAgentsMdPath;
14
19
  exports.listTargets = listTargets;
15
20
  const fs_1 = __importDefault(require("fs"));
16
21
  const path_1 = __importDefault(require("path"));
22
+ const yaml_1 = __importDefault(require("yaml"));
17
23
  const agents_1 = require("./agents");
18
- const TARGETS = ['cursor', 'claude', 'opencode'];
24
+ const TARGETS = ['cursor', 'claude', 'opencode', 'codex'];
19
25
  /** Rule file convention: content.md (main) and content-<suffix>.md (e.g. content-mcp.md) */
20
26
  const CONTENT_PREFIX = 'content';
21
27
  const CONTENT_MAIN = `${CONTENT_PREFIX}.md`;
@@ -105,6 +111,78 @@ function buildOpenCodeFormat(agentId, ruleSuffix) {
105
111
  const content = getContent(agentId, ruleSuffix);
106
112
  return frontmatter + '\n' + content;
107
113
  }
114
+ function getCodexHeader(agentId, ruleSuffix) {
115
+ let codexError;
116
+ try {
117
+ return getTemplate(agentId, 'codex-header.md', ruleSuffix);
118
+ }
119
+ catch (err) {
120
+ codexError = err;
121
+ }
122
+ try {
123
+ return getTemplate(agentId, 'claude-header.md', ruleSuffix);
124
+ }
125
+ catch (claudeError) {
126
+ const codexMsg = codexError instanceof Error ? codexError.message : String(codexError);
127
+ const claudeMsg = claudeError instanceof Error ? claudeError.message : String(claudeError);
128
+ throw new Error(`Agent "${agentId}" missing Codex header: tried codex-header.md (${codexMsg}) and fallback claude-header.md (${claudeMsg})`, { cause: claudeError });
129
+ }
130
+ }
131
+ /**
132
+ * Build content for Codex (header + content)
133
+ */
134
+ function buildCodexFormat(agentId, ruleSuffix) {
135
+ const header = getCodexHeader(agentId, ruleSuffix);
136
+ const content = getContent(agentId, ruleSuffix);
137
+ return header + content;
138
+ }
139
+ function extractDescriptionFromFrontmatter(frontmatter) {
140
+ try {
141
+ // Extract content between --- delimiters to avoid multi-document parse error
142
+ const match = frontmatter.match(/^---\r?\n([\s\S]*?)\r?\n---/);
143
+ const yamlContent = match ? match[1] : frontmatter;
144
+ const parsed = yaml_1.default.parse(yamlContent);
145
+ const description = parsed?.description;
146
+ if (typeof description === 'string') {
147
+ const trimmed = description.trim();
148
+ return trimmed || null;
149
+ }
150
+ return null;
151
+ }
152
+ catch {
153
+ return null;
154
+ }
155
+ }
156
+ function getCodexRuleDescription(agentId, ruleSuffix) {
157
+ try {
158
+ const frontmatter = getTemplate(agentId, 'cursor-frontmatter.yaml', ruleSuffix);
159
+ return extractDescriptionFromFrontmatter(frontmatter);
160
+ }
161
+ catch {
162
+ return null;
163
+ }
164
+ }
165
+ function buildCodexAgentsMd(agents) {
166
+ const lines = [];
167
+ lines.push('# AGENTS.md');
168
+ lines.push('');
169
+ lines.push('This file provides guidance to Codex (CLI and app) for working in this repository.');
170
+ lines.push('');
171
+ lines.push('## Installed agent rules');
172
+ lines.push('');
173
+ lines.push('Read and follow these rule files in `.codex/rules/` when they apply:');
174
+ lines.push('');
175
+ for (const agentId of agents) {
176
+ const suffixes = listRuleSuffixes(agentId);
177
+ for (const ruleSuffix of suffixes) {
178
+ const basename = ruleSuffix ? `${agentId}-${ruleSuffix}` : agentId;
179
+ const description = getCodexRuleDescription(agentId, ruleSuffix) ?? `Rules for ${basename}`;
180
+ lines.push(`- \`.codex/rules/${basename}.md\` — ${description}`);
181
+ }
182
+ }
183
+ lines.push('');
184
+ return lines.join('\n');
185
+ }
108
186
  /**
109
187
  * Build content for the given agent, target, and optional rule suffix
110
188
  */
@@ -116,6 +194,8 @@ function buildContent(agentId, target, ruleSuffix) {
116
194
  return buildClaudeFormat(agentId, ruleSuffix);
117
195
  case 'opencode':
118
196
  return buildOpenCodeFormat(agentId, ruleSuffix);
197
+ case 'codex':
198
+ return buildCodexFormat(agentId, ruleSuffix);
119
199
  default:
120
200
  throw new Error(`Unknown target: ${target}`);
121
201
  }
@@ -142,10 +222,21 @@ function getDestination(agentId, target, projectRoot, ruleSuffix) {
142
222
  const file = path_1.default.join(dir, `${basename}.md`);
143
223
  return { dir, file };
144
224
  }
225
+ case 'codex': {
226
+ const dir = path_1.default.join(root, '.codex', 'rules');
227
+ const file = path_1.default.join(dir, `${basename}.md`);
228
+ return { dir, file };
229
+ }
145
230
  default:
146
231
  throw new Error(`Unknown target: ${target}`);
147
232
  }
148
233
  }
234
+ /**
235
+ * Get destination for Codex AGENTS.md
236
+ */
237
+ function getCodexAgentsMdPath(projectRoot) {
238
+ return path_1.default.join(path_1.default.resolve(projectRoot), 'AGENTS.md');
239
+ }
149
240
  /**
150
241
  * List supported targets
151
242
  */
package/dist/build.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":";;;;;AAeA,4CAyBC;AAKD,gCAUC;AAKD,kCAmBC;AAKD,8CAWC;AAKD,8CAOC;AAKD,kDAWC;AAKD,oCAeC;AAKD,wCA2BC;AAKD,kCAEC;AAtLD,4CAAoB;AACpB,gDAAwB;AACxB,qCAAuC;AAGvC,MAAM,OAAO,GAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAE3D,4FAA4F;AAC5F,MAAM,cAAc,GAAG,SAAS,CAAC;AACjC,MAAM,YAAY,GAAG,GAAG,cAAc,KAAK,CAAC;AAE5C;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,OAAe;IAC9C,MAAM,GAAG,GAAG,IAAA,oBAAW,EAAC,OAAO,CAAC,CAAC;IACjC,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,UAAU,OAAO,qCAAqC,CAAC,CAAC;IAC1E,CAAC;IACD,MAAM,QAAQ,GAAa,EAAE,CAAC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EAAE,IAAI,EAAE,CAAC;QACvB,CAAC;QACD;YACE,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,EAAE,CAAC,CAAC;IACjD,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,oBAAoB,CAAC,WAAmB;IACtD,OAAO,cAAI,CAAC,IAAI,CAAC,cAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;AAC3D,CAAC;AAED;;GAEG;AACH,SAAgB,WAAW;IACzB,OAAO,OAAO,CAAC,KAAK,EAAE,CAAC;AACzB,CAAC"}
package/dist/cli.js CHANGED
@@ -63,8 +63,8 @@ Commands:
63
63
  install Install agent rules for the chosen AI platform (default)
64
64
 
65
65
  Options:
66
- --target, -t <platform> AI platform: cursor, claude, opencode
67
- --agent, -a <agents> Agent(s): linting, local-dev, cicd, observability (comma-separated)
66
+ --target, -t <platform> AI platform: cursor, claude, opencode, codex
67
+ --agent, -a <agents> Agent(s): linting, local-dev, cicd, observability, logging, testing (comma-separated)
68
68
  --all Install all agents
69
69
  --force, -f Overwrite existing rule files
70
70
  --yes, -y Non-interactive; require --target and --agent/--all if no .rulesrc.json
package/dist/config.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare const RULESRC_FILENAME = ".rulesrc.json";
2
- export type Target = 'cursor' | 'claude' | 'opencode';
2
+ export type Target = 'cursor' | 'claude' | 'opencode' | 'codex';
3
3
  export interface RulesConfig {
4
4
  target: Target;
5
5
  agents: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,gBAAgB,kBAAkB,CAAC;AAEzC,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEtD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAanE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAqBnE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAQ1E;AAED;;GAEG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAQlC;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,gBAAgB,kBAAkB,CAAC;AAEzC,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AAEhE,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAanE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAqBnE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAQ1E;AAED;;GAEG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAQlC;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
package/dist/install.d.ts CHANGED
@@ -26,7 +26,9 @@ export interface InstallResult {
26
26
  agentId: string;
27
27
  ruleSuffix: string;
28
28
  }>;
29
+ installedSupportFiles: string[];
29
30
  skipped: string[];
31
+ skippedSupportFiles: string[];
30
32
  errors: Array<{
31
33
  agent: string;
32
34
  error: string;
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sour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,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjD;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,aAAa,CA8E9D;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,MAAM,CAAC,CA4EjB"}
package/dist/install.js CHANGED
@@ -24,7 +24,7 @@ function prompt(question) {
24
24
  });
25
25
  }
26
26
  /**
27
- * Interactive: ask for target (cursor | claude | opencode)
27
+ * Interactive: ask for target (cursor | claude | opencode | codex)
28
28
  */
29
29
  async function promptTarget() {
30
30
  const targets = (0, build_1.listTargets)();
@@ -84,8 +84,11 @@ function install(options) {
84
84
  const { projectRoot, target, agents, force = false, saveConfig: persist } = options;
85
85
  const installed = [];
86
86
  const installedRules = [];
87
+ const installedSupportFiles = [];
87
88
  const skipped = [];
89
+ const skippedSupportFiles = [];
88
90
  const errors = [];
91
+ const processedAgentIds = new Set();
89
92
  if (persist) {
90
93
  (0, config_1.saveConfig)({ target, agents }, projectRoot);
91
94
  }
@@ -94,6 +97,7 @@ function install(options) {
94
97
  errors.push({ agent: agentId, error: 'Unknown agent' });
95
98
  continue;
96
99
  }
100
+ processedAgentIds.add(agentId);
97
101
  let agentInstalled = false;
98
102
  let agentSkipped = false;
99
103
  try {
@@ -124,7 +128,25 @@ function install(options) {
124
128
  });
125
129
  }
126
130
  }
127
- return { installed, installedRules, skipped, errors };
131
+ if (target === 'codex') {
132
+ const agentsMdPath = (0, build_1.getCodexAgentsMdPath)(projectRoot);
133
+ if (fs_1.default.existsSync(agentsMdPath) && !force) {
134
+ skippedSupportFiles.push(agentsMdPath);
135
+ }
136
+ else {
137
+ const content = (0, build_1.buildCodexAgentsMd)(Array.from(processedAgentIds));
138
+ fs_1.default.writeFileSync(agentsMdPath, content, 'utf8');
139
+ installedSupportFiles.push(agentsMdPath);
140
+ }
141
+ }
142
+ return {
143
+ installed,
144
+ installedRules,
145
+ installedSupportFiles,
146
+ skipped,
147
+ skippedSupportFiles,
148
+ errors
149
+ };
128
150
  }
129
151
  /**
130
152
  * Run install flow: resolve target/agents (interactive or from config/flags), then install.
@@ -167,9 +189,17 @@ async function runInstall(options = {}) {
167
189
  console.log(` ${label} -> ${file}`);
168
190
  });
169
191
  }
192
+ if (result.installedSupportFiles.length > 0) {
193
+ result.installedSupportFiles.forEach((file) => {
194
+ console.log(` AGENTS.md -> ${file}`);
195
+ });
196
+ }
170
197
  if (result.skipped.length > 0) {
171
198
  console.log(`Skipped (already present; use --force to overwrite): ${result.skipped.join(', ')}`);
172
199
  }
200
+ if (result.skippedSupportFiles.length > 0) {
201
+ console.log(`Skipped support files (already present; use --force to overwrite): ${result.skippedSupportFiles.join(', ')}`);
202
+ }
173
203
  if (result.installed.length === 0 &&
174
204
  result.skipped.length === 0 &&
175
205
  result.errors.length === 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"install.js","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":";;;;;AAsEA,wDA6BC;AAqBD,0BAwDC;AAeD,gCAkEC;AAjQD,4CAAoB;AACpB,wDAAgC;AAChC,mCAKiB;AACjB,qCAAmE;AACnE,qCAA6E;AAG7E,SAAS,MAAM,CAAC,QAAgB;IAC9B,MAAM,EAAE,GAAG,kBAAQ,CAAC,eAAe,CAAC;QAClC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAC;IACH,OAAO,IAAI,OAAO,CAAC,CA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CAAC;IACD,IAAI,MAAM,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5C,MAAM,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5C,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;IACL,CAAC;IACD,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9B,OAAO,CAAC,GAAG,CACT,wDAAwD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACpF,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1C,OAAO,CAAC,GAAG,CACT,sEAAsE,MAAM,CAAC,mBAAmB,CAAC,IAAI,CACnG,IAAI,CACL,EAAE,CACJ,CAAC;IACJ,CAAC;IACD,IACE,MAAM,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC;QAC7B,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;QAC3B,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAC1B,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,CAAC,CAAC;AACX,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everydaydevopsio/ballast",
3
- "version": "3.1.0",
3
+ "version": "3.2.1",
4
4
  "description": "CLI to install TypeScript AI agent rules (linting, local-dev, CI/CD, observability, logging) for Cursor, Claude Code, and OpenCode",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
@@ -22,12 +22,12 @@
22
22
  "url": "https://github.com/everydaydevopsio/ballast/issues"
23
23
  },
24
24
  "devDependencies": {
25
- "@eslint/js": "^9.39.2",
25
+ "@eslint/js": "^10.0.1",
26
26
  "@types/jest": "^30.0.0",
27
27
  "@types/node": "^25.2.0",
28
28
  "@typescript-eslint/eslint-plugin": "^8.54.0",
29
29
  "@typescript-eslint/parser": "^8.54.0",
30
- "eslint": "^9.39.2",
30
+ "eslint": "^10.0.0",
31
31
  "eslint-config-prettier": "^10.1.8",
32
32
  "eslint-plugin-prettier": "^5.5.4",
33
33
  "globals": "^17.3.0",
@@ -54,6 +54,9 @@
54
54
  "prettier --write"
55
55
  ]
56
56
  },
57
+ "dependencies": {
58
+ "yaml": "^2.8.2"
59
+ },
57
60
  "scripts": {
58
61
  "build": "tsc",
59
62
  "test": "jest",