@everydaydevopsio/ballast 3.0.4 → 3.2.0

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.
Files changed (45) hide show
  1. package/README.md +35 -10
  2. package/agents/cicd/templates/codex-header.md +7 -0
  3. package/agents/linting/templates/codex-header.md +7 -0
  4. package/agents/local-dev/content-badges.md +83 -0
  5. package/agents/local-dev/content-env.md +189 -0
  6. package/agents/local-dev/content-license.md +94 -0
  7. package/agents/local-dev/content-mcp.md +64 -0
  8. package/agents/local-dev/templates/claude-header-badges.md +5 -0
  9. package/agents/local-dev/templates/claude-header-license.md +5 -0
  10. package/agents/local-dev/templates/claude-header-mcp.md +5 -0
  11. package/agents/local-dev/templates/claude-header.md +1 -1
  12. package/agents/local-dev/templates/codex-header-badges.md +7 -0
  13. package/agents/local-dev/templates/codex-header-license.md +7 -0
  14. package/agents/local-dev/templates/codex-header-mcp.md +7 -0
  15. package/agents/local-dev/templates/codex-header.md +7 -0
  16. package/agents/local-dev/templates/cursor-frontmatter-badges.yaml +8 -0
  17. package/agents/local-dev/templates/cursor-frontmatter-env.yaml +11 -0
  18. package/agents/local-dev/templates/cursor-frontmatter-license.yaml +10 -0
  19. package/agents/local-dev/templates/cursor-frontmatter-mcp.yaml +10 -0
  20. package/agents/local-dev/templates/opencode-frontmatter-badges.yaml +16 -0
  21. package/agents/local-dev/templates/opencode-frontmatter-license.yaml +16 -0
  22. package/agents/local-dev/templates/opencode-frontmatter-mcp.yaml +16 -0
  23. package/agents/logging/content.md +423 -0
  24. package/agents/logging/templates/claude-header.md +5 -0
  25. package/agents/logging/templates/codex-header.md +7 -0
  26. package/agents/logging/templates/cursor-frontmatter.yaml +11 -0
  27. package/agents/logging/templates/opencode-frontmatter.yaml +22 -0
  28. package/agents/observability/templates/codex-header.md +7 -0
  29. package/dist/agents.d.ts +1 -1
  30. package/dist/agents.d.ts.map +1 -1
  31. package/dist/agents.js +2 -1
  32. package/dist/agents.js.map +1 -1
  33. package/dist/build.d.ts +27 -11
  34. package/dist/build.d.ts.map +1 -1
  35. package/dist/build.js +162 -26
  36. package/dist/build.js.map +1 -1
  37. package/dist/cli.js +1 -1
  38. package/dist/config.d.ts +1 -1
  39. package/dist/config.d.ts.map +1 -1
  40. package/dist/install.d.ts +7 -0
  41. package/dist/install.d.ts.map +1 -1
  42. package/dist/install.js +58 -16
  43. package/dist/install.js.map +1 -1
  44. package/package.json +13 -10
  45. package/agents/local-dev/content.md +0 -17
package/README.md CHANGED
@@ -1,17 +1,37 @@
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
 
9
- | Agent | Description |
10
- | ----------------- | ------------------------------------------------------------------------ |
11
- | **linting** | ESLint, Prettier, Husky, lint-staged, GitHub Actions (full instructions) |
12
- | **local-dev** | Local dev environment setup, DX, documentation (placeholder outline) |
13
- | **cicd** | CI/CD pipelines, quality gates, deployment (placeholder outline) |
14
- | **observability** | Logging, tracing, metrics, SLOs (placeholder outline) |
28
+ | Agent | Description |
29
+ | ----------------- | ------------------------------------------------------------------------------------------------ |
30
+ | **linting** | ESLint, Prettier, Husky, lint-staged, GitHub Actions (full instructions) |
31
+ | **local-dev** | Local dev environment (nvm, Docker, env), license setup (MIT default), MCP (optional) |
32
+ | **cicd** | CI/CD pipelines, quality gates, deployment (placeholder outline) |
33
+ | **observability** | Logging, tracing, metrics, SLOs (placeholder outline) |
34
+ | **logging** | Pino + Fluentd (Node/Next.js API), pino-browser to /api/logs, window.onerror, unhandledrejection |
15
35
 
16
36
  ## Using the agents
17
37
 
@@ -20,9 +40,10 @@ Once installed, rule files are loaded automatically by your AI platform (Cursor,
20
40
  | Agent | How to use it |
21
41
  | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
22
42
  | **linting** | In any session: _"Help me set up linting for this project"_ or _"Fix lint errors per the linting rules."_ The agent will add ESLint, Prettier, Husky, lint-staged, and CI workflows. |
23
- | **local-dev** | Ask for help with local dev environment, DX, or documentation (placeholder). |
43
+ | **local-dev** | Ask for help with local dev environment, license setup (LICENSE, package.json, README), or optional MCP integration. |
24
44
  | **cicd** | Ask for help with CI/CD pipelines, quality gates, or deployment (placeholder). |
25
45
  | **observability** | Ask for help with logging, tracing, metrics, or SLOs (placeholder). |
46
+ | **logging** | Ask for help with centralized logging: Pino + Fluentd for server, pino-browser to /api/logs for console, exceptions, window.onerror, unhandledrejection. |
26
47
 
27
48
  ## Installation
28
49
 
@@ -48,7 +69,7 @@ npx ballast install
48
69
 
49
70
  You’ll be prompted for:
50
71
 
51
- 1. **AI platform**: `cursor`, `claude`, or `opencode`
72
+ 1. **AI platform**: `cursor`, `claude`, `opencode`, or `codex`
52
73
  2. **Agents**: comma-separated (e.g. `linting, local-dev`) or `all`
53
74
 
54
75
  Your choices are saved to `.rulesrc.json`. Future runs reuse them (non-interactive).
@@ -67,6 +88,7 @@ npx ballast install --target cursor --agent linting --force
67
88
 
68
89
  # Non-interactive (CI): require --target and --agent/--all if no .rulesrc.json
69
90
  npx ballast install --yes --target cursor --agent linting
91
+ ballast install --yes --target codex --all
70
92
  ```
71
93
 
72
94
  ### CI / non-interactive
@@ -94,6 +116,9 @@ Rules are written under your project root:
94
116
  | Cursor | `.cursor/rules/` | `<agent>.mdc` |
95
117
  | Claude | `.claude/rules/` | `<agent>.md` |
96
118
  | OpenCode | `.opencode/` | `<agent>.md` |
119
+ | Codex | `.codex/rules/` | `<agent>.md` |
120
+
121
+ Codex installs a root `AGENTS.md` that references the `.codex/rules/` files so Codex CLI and Codex app can load the same guidance.
97
122
 
98
123
  ## Overwrite policy
99
124
 
@@ -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
+ ---
@@ -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
+ ---
@@ -0,0 +1,83 @@
1
+ # README Badges
2
+
3
+ When setting up or improving project documentation, add standard badges near the top of `README.md` to provide quick visibility into CI status, releases, license, and (for npm packages) npm registry info.
4
+
5
+ ## Your Responsibilities
6
+
7
+ 1. **Add badges at the top of README.md**
8
+ - Place badges immediately after the main title (or project description), before the first heading.
9
+ - Use one line of badges, separated by spaces, for a compact layout.
10
+ - Replace `OWNER/REPO` with the actual GitHub org/user and repository name (e.g. `markcallen/cache-cleaner`).
11
+ - Replace `PACKAGE_NAME` with the npm package name from `package.json` when adding npm badges.
12
+
13
+ 2. **Include standard badges**
14
+ - **CI** — links to the CI workflow (e.g. `ci.yml` or `lint.yml`).
15
+ - **Release** — links to the release/publish workflow (e.g. `release.yml` or `publish.yml`).
16
+ - **License** — links to the `LICENSE` file.
17
+ - **GitHub Release** — links to the releases page.
18
+
19
+ 3. **For npm packages**
20
+ - If the project has a `package.json` with `name` and is published to npm, add npm badges:
21
+ - **npm version** — shows the latest published version.
22
+ - **npm downloads** — shows weekly or monthly download count (optional but recommended).
23
+
24
+ ## Badge Markdown Examples
25
+
26
+ ### GitHub Actions (CI and Release)
27
+
28
+ Use the workflow filename that exists in `.github/workflows/` (e.g. `ci.yml`, `release.yml`, `publish.yml`):
29
+
30
+ ```markdown
31
+ [![CI](https://github.com/OWNER/REPO/actions/workflows/ci.yml/badge.svg)](https://github.com/OWNER/REPO/actions/workflows/ci.yml)
32
+ [![Release](https://github.com/OWNER/REPO/actions/workflows/release.yml/badge.svg)](https://github.com/OWNER/REPO/actions/workflows/release.yml)
33
+ ```
34
+
35
+ If the workflow is named `publish.yml` instead of `release.yml`, use:
36
+
37
+ ```markdown
38
+ [![Release](https://github.com/OWNER/REPO/actions/workflows/publish.yml/badge.svg)](https://github.com/OWNER/REPO/actions/workflows/publish.yml)
39
+ ```
40
+
41
+ ### License and GitHub Release
42
+
43
+ ```markdown
44
+ [![License](https://img.shields.io/github/license/OWNER/REPO)](LICENSE)
45
+ [![GitHub Release](https://img.shields.io/github/v/release/OWNER/REPO)](https://github.com/OWNER/REPO/releases)
46
+ ```
47
+
48
+ ### npm (for published packages)
49
+
50
+ ```markdown
51
+ [![npm version](https://img.shields.io/npm/v/PACKAGE_NAME.svg)](https://www.npmjs.com/package/PACKAGE_NAME)
52
+ [![npm downloads](https://img.shields.io/npm/dm/PACKAGE_NAME.svg)](https://www.npmjs.com/package/PACKAGE_NAME)
53
+ ```
54
+
55
+ ## Complete Example (GitHub + npm)
56
+
57
+ ```markdown
58
+ # Project Name
59
+
60
+ [![CI](https://github.com/markcallen/cache-cleaner/actions/workflows/ci.yml/badge.svg)](https://github.com/markcallen/cache-cleaner/actions/workflows/ci.yml)
61
+ [![Release](https://github.com/markcallen/cache-cleaner/actions/workflows/release.yml/badge.svg)](https://github.com/markcallen/cache-cleaner/actions/workflows/release.yml)
62
+ [![License](https://img.shields.io/github/license/markcallen/cache-cleaner)](LICENSE)
63
+ [![GitHub Release](https://img.shields.io/github/v/release/markcallen/cache-cleaner)](https://github.com/markcallen/cache-cleaner/releases)
64
+ [![npm version](https://img.shields.io/npm/v/cache-cleaner.svg)](https://www.npmjs.com/package/cache-cleaner)
65
+ [![npm downloads](https://img.shields.io/npm/dm/cache-cleaner.svg)](https://www.npmjs.com/package/cache-cleaner)
66
+
67
+ Project description...
68
+ ```
69
+
70
+ ## Implementation Order
71
+
72
+ 1. Determine the GitHub `OWNER/REPO` (from git remote, package.json repository field, or user input).
73
+ 2. List workflows in `.github/workflows/` to identify CI and release workflow filenames.
74
+ 3. Check `package.json` for `name` and whether the package is published to npm (optional: check npm registry).
75
+ 4. Add badges at the top of `README.md`, after the title and before the first `##` heading.
76
+ 5. Use the correct workflow filenames; do not assume `ci.yml` or `release.yml` if different names exist.
77
+
78
+ ## When to Apply
79
+
80
+ - When creating a new project with a README.
81
+ - When a README lacks badges at the top.
82
+ - When adding CI or release workflows and the README does not yet link to them.
83
+ - When publishing an npm package and the README does not show npm badges.
@@ -0,0 +1,189 @@
1
+ # Local Development Environment Agent
2
+
3
+ You are a local development environment specialist for TypeScript/JavaScript projects.
4
+
5
+ ## Goals
6
+
7
+ - **Reproducible environments**: Help set up and document local dev setup (Node version, env vars, Docker Compose, dev scripts) so anyone can run the project with minimal friction.
8
+ - **Developer experience**: Recommend and configure tooling (debugging, hot reload, env validation) and conventions (branch naming, commit hooks) that keep local dev fast and consistent.
9
+ - **Documentation**: Keep README and runbooks (e.g. "Getting started", "Troubleshooting") in sync with the actual setup so new contributors can self-serve.
10
+
11
+ ## Scope
12
+
13
+ - Local run scripts, env files (.env.example), and optional containerized dev (e.g. Docker Compose for services).
14
+ - Version managers (nvm, volta) and required Node/npm versions.
15
+ - Pre-commit or pre-push hooks that run tests/lint locally before pushing.
16
+
17
+ ---
18
+
19
+ ## Node Version Management (nvm)
20
+
21
+ When setting up or working on Node.js/TypeScript projects, use **nvm** (Node Version Manager) to ensure consistent Node versions across developers and environments.
22
+
23
+ ### Your Responsibilities
24
+
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).
28
+ - If a specific version is already used elsewhere, match it (e.g. `22`, `20`, `lts/hydrogen`).
29
+
30
+ 2. **Use `.nvmrc` in the project**
31
+ - Instruct developers to run `nvm use` (or `nvm install` if the version is not yet installed) when entering the project directory.
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
+
34
+ 3. **Update the README**
35
+ - Add a "Prerequisites" or "Getting started" subsection that instructs new contributors to:
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
+ 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
+
39
+ ### Example README Addition
40
+
41
+ ````markdown
42
+ ## Prerequisites
43
+
44
+ - [nvm](https://github.com/nvm-sh/nvm) (Node Version Manager)
45
+
46
+ After cloning the repo, install and use the project's Node version:
47
+
48
+ ```bash
49
+ nvm install # installs the version from .nvmrc
50
+ nvm use # switches to it (or run `nvm install` which does both)
51
+ ```
52
+
53
+ Then install dependencies: `pnpm install` (or `npm install` / `yarn`).
54
+ ````
55
+
56
+ ### Key Commands
57
+
58
+ - `nvm install` — installs the version from `.nvmrc` (or `lts/*` if `.nvmrc` is missing)
59
+ - `nvm use` — switches the current shell to the version in `.nvmrc`
60
+ - `nvm install lts/*` — installs the current LTS version
61
+
62
+ ### When to Apply
63
+
64
+ - When creating a new Node/TypeScript project.
65
+ - When a project lacks `.nvmrc` or README setup instructions.
66
+ - When the README does not mention nvm or Node version setup after cloning.
67
+
68
+ ---
69
+
70
+ ## Dockerfile for Local Development (Node.js / TypeScript)
71
+
72
+ When the user wants a Dockerfile and containerized local development for a Node.js or TypeScript app, follow the Everyday DevOps approach from https://www.markcallen.com/dockerfile-for-typescript/
73
+
74
+ ### Your Responsibilities
75
+
76
+ 1. **Create a production-style Dockerfile**
77
+ - Use a Node LTS image (e.g. `node:22-bookworm`).
78
+ - Set `WORKDIR /app`.
79
+ - Copy only `package.json` and lockfile (`yarn.lock`, `pnpm-lock.yaml`, or `package-lock.json`) first.
80
+ - 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`).
81
+ - Copy the rest of the application.
82
+ - Run the build script (e.g. `yarn build` / `pnpm run build`).
83
+ - Set `CMD` to start the app (e.g. `node dist/index.js` or `npm start`).
84
+
85
+ 2. **Add a .dockerignore**
86
+ - Exclude: `node_modules`, `dist`, `.env`, `.vscode`, `*.log`, `.git`, and other non-build artifacts so the Docker build context stays small.
87
+
88
+ 3. **Create docker-compose.yml for local development**
89
+ - Use `build: .` for the app service.
90
+ - For CLI apps, set `tty: true` so the container doesn't exit immediately.
91
+ - Use Compose's `develop.watch` so code changes are reflected without full rebuilds:
92
+ - `action: sync+restart` for source directories (e.g. `src/`) so edits sync in and the process restarts.
93
+ - `action: rebuild` for `package.json` (and lockfile) so dependency changes trigger an image rebuild.
94
+ - Set `command` to the dev script (e.g. `yarn dev`, `pnpm run dev`, or `tsx src/index.ts`) so the app runs with watch/hot reload inside the container.
95
+
96
+ 4. **Ensure package.json scripts**
97
+ - `build`: compile/bundle (e.g. `rimraf ./dist && tsc`, or project equivalent).
98
+ - `start`: run the built app (e.g. `node dist/index.js`).
99
+ - `dev`: run for local development with watch (e.g. `tsx src/index.ts` or `ts-node-dev`, etc.).
100
+
101
+ ### Implementation Order
102
+
103
+ 1. Check for existing Dockerfile and docker-compose files; do not overwrite without user confirmation (or `--force`-style intent).
104
+ 2. Identify package manager (yarn, pnpm, npm) and lockfile name.
105
+ 3. Create `.dockerignore` with appropriate exclusions.
106
+ 4. Create `Dockerfile` with multi-stage or single-stage build as above.
107
+ 5. Create or update `docker-compose.yml` with `develop.watch` and dev `command`.
108
+ 6. Verify `package.json` has `build`, `start`, and `dev` scripts; suggest additions if missing.
109
+ 7. Document in README: how to `docker compose build`, `docker compose up --watch`, and optional production `docker build` / `docker run`.
110
+
111
+ ### Key Snippets
112
+
113
+ **Dockerfile (yarn example):**
114
+
115
+ ```dockerfile
116
+ FROM node:22-bookworm
117
+
118
+ WORKDIR /app
119
+
120
+ COPY package.json yarn.lock ./
121
+ RUN yarn install --frozen-lockfile --ignore-scripts
122
+
123
+ COPY . .
124
+ RUN yarn build
125
+
126
+ CMD [ "yarn", "start" ]
127
+ ```
128
+
129
+ **Dockerfile (pnpm example):**
130
+
131
+ ```dockerfile
132
+ FROM node:22-bookworm
133
+
134
+ WORKDIR /app
135
+
136
+ RUN corepack enable && corepack prepare pnpm@latest --activate
137
+ COPY package.json pnpm-lock.yaml ./
138
+ RUN pnpm install --frozen-lockfile --ignore-scripts
139
+
140
+ COPY . .
141
+ RUN pnpm run build
142
+
143
+ CMD [ "pnpm", "start" ]
144
+ ```
145
+
146
+ **.dockerignore:**
147
+
148
+ ```
149
+ node_modules
150
+ dist
151
+ .env
152
+ .vscode
153
+ *.log
154
+ .git
155
+ ```
156
+
157
+ **docker-compose.yml (with watch):**
158
+
159
+ ```yaml
160
+ services:
161
+ app:
162
+ build: .
163
+ tty: true # omit or set false for long-running servers (e.g. Express)
164
+ develop:
165
+ watch:
166
+ - action: sync+restart
167
+ path: src/
168
+ target: /app/src
169
+ - action: rebuild
170
+ path: package.json
171
+ command: yarn dev
172
+ ```
173
+
174
+ Use `pnpm run dev` or `npm run dev` in `command` if the project uses that package manager. Adjust `path`/`target` if the app uses a different layout (e.g. `app/` instead of `src/`).
175
+
176
+ ### Important Notes
177
+
178
+ - Keep the Docker build context small: always use a `.dockerignore` and copy dependency manifests before copying the full tree.
179
+ - Use `--frozen-lockfile` (yarn/pnpm) or `npm ci` so production and CI builds are reproducible.
180
+ - For local dev, `develop.watch` with `sync+restart` on source dirs avoids full image rebuilds on every code change; reserve `rebuild` for dependency/manifest changes.
181
+ - For web apps (e.g. Express), you may omit `tty: true` and expose a port with `ports: ["3000:3000"]` (or the app's port).
182
+ - If the project has no `dev` script, suggest adding one (e.g. using `tsx`, `ts-node-dev`, or `node --watch`) so `docker compose up --watch` is useful.
183
+
184
+ ### When Completed
185
+
186
+ 1. Summarize what was created or updated (Dockerfile, .dockerignore, docker-compose.yml, and any script changes).
187
+ 2. Tell the user how to build and run: `docker compose build`, then `docker compose up --watch` for local development.
188
+ 3. Mention that editing files under the watched path will sync and restart the service, and changing `package.json` will trigger a rebuild.
189
+ 4. Optionally suggest adding a short "Docker" or "Local development" section to the README with these commands.
@@ -0,0 +1,94 @@
1
+ # License Setup for Projects
2
+
3
+ When setting up or working on projects, ensure proper license configuration for legal clarity and reuse.
4
+
5
+ ## Default Behavior
6
+
7
+ **If no license is specified**, use the **MIT License**. Projects can override this in `AGENTS.md` or `CLAUDE.md` (see Configuration below).
8
+
9
+ ## Your Responsibilities
10
+
11
+ 1. **Create or update `LICENSE`**
12
+ - If the project has no `LICENSE` file, create one.
13
+ - Use the license specified in project docs (`AGENTS.md`, `CLAUDE.md`) if present; otherwise use MIT.
14
+ - For MIT, include the standard MIT License text with the current year and copyright holder (e.g. from `package.json` author or a placeholder).
15
+
16
+ 2. **Update `package.json`**
17
+ - Ensure the `license` field is set (e.g. `"license": "MIT"`).
18
+ - If `package.json` exists but has no `license` field, add it.
19
+ - Use [SPDX identifiers](https://spdx.org/licenses/) (e.g. `MIT`, `Apache-2.0`, `ISC`).
20
+
21
+ 3. **Reference LICENSE in README**
22
+ - Add a "License" section at the end of `README.md` that references the `LICENSE` file.
23
+ - Example: `MIT License - see [LICENSE](LICENSE) file for details.`
24
+
25
+ ## MIT License Template
26
+
27
+ ```
28
+ MIT License
29
+
30
+ Copyright (c) <YEAR> <COPYRIGHT HOLDER>
31
+
32
+ Permission is hereby granted, free of charge, to any person obtaining a copy
33
+ of this software and associated documentation files (the "Software"), to deal
34
+ in the Software without restriction, including without limitation the rights
35
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36
+ copies of the Software, and to permit persons to whom the Software is
37
+ furnished to do so, subject to the following conditions:
38
+
39
+ The above copyright notice and this permission notice shall be included in all
40
+ copies or substantial portions of the Software.
41
+
42
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
48
+ SOFTWARE.
49
+ ```
50
+
51
+ Replace `<YEAR>` with the current year and `<COPYRIGHT HOLDER>` with the author/org (e.g. from `package.json` author).
52
+
53
+ ## Example README Addition
54
+
55
+ ```markdown
56
+ ## License
57
+
58
+ MIT License - see [LICENSE](LICENSE) file for details.
59
+ ```
60
+
61
+ ## Example package.json Addition
62
+
63
+ ```json
64
+ {
65
+ "license": "MIT"
66
+ }
67
+ ```
68
+
69
+ ## Configuration: Override Default License
70
+
71
+ Projects may specify a non-MIT license in `AGENTS.md` or `CLAUDE.md`:
72
+
73
+ ```markdown
74
+ ## License
75
+
76
+ Default license for this project: Apache-2.0 (or ISC, BSD-3-Clause, etc.)
77
+ ```
78
+
79
+ When such a section exists, use the specified license instead of MIT. If both files define a license, prefer `AGENTS.md` (it is agent-facing and typically more authoritative for automation).
80
+
81
+ ## Implementation Order
82
+
83
+ 1. Check `AGENTS.md` and `CLAUDE.md` for a license override.
84
+ 2. If none, use MIT.
85
+ 3. Check if `LICENSE` exists; if not, create it with the chosen license text.
86
+ 4. Check `package.json` for the `license` field; add or update if missing.
87
+ 5. Check `README.md` for a License section at the end; add one if missing, referencing `[LICENSE](LICENSE)`.
88
+
89
+ ## When to Apply
90
+
91
+ - When creating a new project.
92
+ - When a project lacks a `LICENSE` file.
93
+ - When `package.json` has no `license` field.
94
+ - When `README.md` does not reference the LICENSE file at the end.
@@ -0,0 +1,64 @@
1
+ # Optional: GitHub and Issues MCP Servers
2
+
3
+ When the user has **GitHub MCP** and/or **issues MCP** (Jira, Linear, or GitHub Issues) servers enabled, use them to support local development workflow and context.
4
+
5
+ ## When to Use This Rule
6
+
7
+ - The user asks for a summary of open work (PRs, issues, Jira/Linear items).
8
+ - The user wants to correlate code changes with tickets or PRs.
9
+ - The user is starting work and needs context from assigned or in-progress items.
10
+
11
+ ## GitHub MCP
12
+
13
+ If the **GitHub MCP** server is available:
14
+
15
+ - **Pull requests**: List or summarize open PRs for the current repo (or org). Help the user triage, review, or land PRs.
16
+ - **Repos and orgs**: Use repo/org context when the user asks about “my PRs” or “our open PRs.”
17
+ - **Branches and commits**: When relevant to local dev, use GitHub MCP to check branch status, CI status, or linked issues.
18
+
19
+ Do not assume the server is present; only use it when it is configured and the user’s request fits (e.g. “summarize my PRs”, “what’s open in this repo?”).
20
+
21
+ ## Issues MCP (Jira / Linear / GitHub Issues)
22
+
23
+ If an **issues MCP** server is available (Jira, Linear, or GitHub Issues):
24
+
25
+ - **Assigned work**: When the user asks “what am I working on?” or “my issues”, use the issues MCP to list items assigned to them (and optionally filter by board, team, or project).
26
+ - **Sprint / cycle / milestone**: For Jira (board/sprint) or Linear (team/cycle), summarize current sprint or cycle work when the user asks.
27
+ - **Correlation with code**: When the user mentions a ticket ID (e.g. `PROJ-123`, Linear issue key), use the issues MCP to fetch details and relate them to branches or PRs if helpful.
28
+
29
+ Configuration (e.g. which board, team, or filters) is typically stored in project docs (e.g. `CLAUDE.md`, `AGENTS.md`) or a config file (e.g. `work_summary` YAML). Prefer not to overwrite that config; use it to scope queries.
30
+
31
+ ## Scope
32
+
33
+ - **Optional**: This rule applies only when the corresponding MCP servers are enabled. Do not prompt the user to install MCPs; only use them when already available.
34
+ - **Local-dev focus**: Use these MCPs to support _local development_ context (what to work on next, PR/issue context while coding), not as a general “work summary” agent. Defer to project-specific docs for full work-summary or reporting behavior.
35
+ - **Documentation**: If you add or change how MCPs are used, suggest updating README or runbooks (e.g. “Getting started”, “Troubleshooting”) so others know which MCPs are expected for this project.
36
+
37
+ ## Configuration Reference
38
+
39
+ Projects may document MCP usage in a structure like:
40
+
41
+ ```yaml
42
+ work_summary:
43
+ mcp_tools:
44
+ github: github
45
+ jira: jira # optional
46
+ linear: linear # optional
47
+ sources:
48
+ pull_requests: true
49
+ github_issues:
50
+ enabled: false
51
+ scope: { mode: repos, orgs: [], repos: [] }
52
+ filters: { assigned_to_me: true, labels: [] }
53
+ jira:
54
+ enabled: false
55
+ board: ''
56
+ only_assigned_to_me: true
57
+ linear:
58
+ enabled: false
59
+ team: ''
60
+ view: cycle
61
+ only_assigned_to_me: true
62
+ ```
63
+
64
+ Respect such configuration when querying; use it to scope lists (e.g. “assigned to me”, specific board/team) rather than inventing defaults.
@@ -0,0 +1,5 @@
1
+ # Local Development: README Badges
2
+
3
+ Add standard badges (CI, Release, License, GitHub Release; plus npm for published packages) to the top of README.md.
4
+
5
+ ---
@@ -0,0 +1,5 @@
1
+ # Local Development: License Setup
2
+
3
+ Ensure proper license configuration (LICENSE file, package.json, README reference). Default: MIT. Overridable in AGENTS.md or CLAUDE.md.
4
+
5
+ ---
@@ -0,0 +1,5 @@
1
+ # Local Development: GitHub and Issues MCP (Optional)
2
+
3
+ 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.
4
+
5
+ ---
@@ -1,5 +1,5 @@
1
1
  # Local Development Environment Rules
2
2
 
3
- These rules help set up and maintain a consistent local development environment for TypeScript/JavaScript projects.
3
+ 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/
4
4
 
5
5
  ---
@@ -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
+ ---
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: 'Add standard badges (CI, Release, License, GitHub Release, npm) to the top of README.md'
3
+ alwaysApply: false
4
+ globs:
5
+ - 'README*'
6
+ - '.github/workflows/*.yml'
7
+ - 'package.json'
8
+ ---
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: 'Local development environment specialist - reproducible dev setup, DX, and documentation'
3
+ alwaysApply: false
4
+ globs:
5
+ - 'package.json'
6
+ - 'README*'
7
+ - '.nvmrc'
8
+ - '.env*'
9
+ - 'docker-compose*.yml'
10
+ - 'Dockerfile*'
11
+ ---
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: 'License setup - ensure LICENSE file, package.json license field, and README reference (default MIT; overridable in AGENTS.md/CLAUDE.md)'
3
+ alwaysApply: false
4
+ globs:
5
+ - 'LICENSE'
6
+ - 'package.json'
7
+ - 'README*'
8
+ - '**/AGENTS.md'
9
+ - '**/CLAUDE.md'
10
+ ---
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: 'Optional: use GitHub MCP and issues MCP (Jira/Linear/GitHub) for local-dev context'
3
+ alwaysApply: false
4
+ globs:
5
+ - 'package.json'
6
+ - 'README*'
7
+ - '.env*'
8
+ - '**/CLAUDE.md'
9
+ - '**/AGENTS.md'
10
+ ---
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: Add standard badges (CI, Release, License, GitHub Release, npm) to the top of README.md
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
+ '*': ask
16
+ ---