@everydaydevopsio/ballast 3.0.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.
- package/LICENSE +21 -0
- package/README.md +133 -0
- package/agents/cicd/content.md +17 -0
- package/agents/cicd/templates/claude-header.md +5 -0
- package/agents/cicd/templates/cursor-frontmatter.yaml +9 -0
- package/agents/cicd/templates/opencode-frontmatter.yaml +21 -0
- package/agents/linting/content.md +121 -0
- package/agents/linting/templates/claude-header.md +5 -0
- package/agents/linting/templates/cursor-frontmatter.yaml +12 -0
- package/agents/linting/templates/opencode-frontmatter.yaml +21 -0
- package/agents/local-dev/content.md +17 -0
- package/agents/local-dev/templates/claude-header.md +5 -0
- package/agents/local-dev/templates/cursor-frontmatter.yaml +10 -0
- package/agents/local-dev/templates/opencode-frontmatter.yaml +21 -0
- package/agents/observability/content.md +17 -0
- package/agents/observability/templates/claude-header.md +5 -0
- package/agents/observability/templates/cursor-frontmatter.yaml +9 -0
- package/agents/observability/templates/opencode-frontmatter.yaml +21 -0
- package/bin/ballast.js +3 -0
- package/dist/agents.d.ts +21 -0
- package/dist/agents.d.ts.map +1 -0
- package/dist/agents.js +52 -0
- package/dist/agents.js.map +1 -0
- package/dist/build.d.ts +37 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/build.js +110 -0
- package/dist/build.js.map +1 -0
- package/dist/cli.d.ts +14 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +118 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +24 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +73 -0
- package/dist/config.js.map +1 -0
- package/dist/install.d.ts +47 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +168 -0
- package/dist/install.js.map +1 -0
- package/package.json +66 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Mark C Allen (@markcallen)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Ballast
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
|
|
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.
|
|
6
|
+
|
|
7
|
+
## Agents
|
|
8
|
+
|
|
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) |
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
Install as a dev dependency in your project:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install -D @everydaydevopsio/ballast
|
|
22
|
+
# or
|
|
23
|
+
pnpm add -D @everydaydevopsio/ballast
|
|
24
|
+
# or
|
|
25
|
+
yarn add -D @everydaydevopsio/ballast
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
### Interactive (recommended first time)
|
|
31
|
+
|
|
32
|
+
From your project root:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx ballast install
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
You’ll be prompted for:
|
|
39
|
+
|
|
40
|
+
1. **AI platform**: `cursor`, `claude`, or `opencode`
|
|
41
|
+
2. **Agents**: comma-separated (e.g. `linting, local-dev`) or `all`
|
|
42
|
+
|
|
43
|
+
Your choices are saved to `.rulesrc.json`. Future runs reuse them (non-interactive).
|
|
44
|
+
|
|
45
|
+
### With options
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Install linting agent for Cursor
|
|
49
|
+
npx ballast install --target cursor --agent linting
|
|
50
|
+
|
|
51
|
+
# Install all agents for Claude
|
|
52
|
+
npx ballast install --target claude --all
|
|
53
|
+
|
|
54
|
+
# Overwrite existing rule files
|
|
55
|
+
npx ballast install --target cursor --agent linting --force
|
|
56
|
+
|
|
57
|
+
# Non-interactive (CI): require --target and --agent/--all if no .rulesrc.json
|
|
58
|
+
npx ballast install --yes --target cursor --agent linting
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### CI / non-interactive
|
|
62
|
+
|
|
63
|
+
In CI (or with `--yes`), if `.rulesrc.json` is not present you **must** pass `--target` and either `--agent` or `--all`:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
ballast install --yes --target cursor --agent linting
|
|
67
|
+
ballast install --yes --target opencode --all
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Help and version
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npx ballast --help
|
|
74
|
+
npx ballast --version
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Install locations
|
|
78
|
+
|
|
79
|
+
Rules are written under your project root:
|
|
80
|
+
|
|
81
|
+
| Platform | Path | File pattern |
|
|
82
|
+
| -------- | ---------------- | ------------- |
|
|
83
|
+
| Cursor | `.cursor/rules/` | `<agent>.mdc` |
|
|
84
|
+
| Claude | `.claude/rules/` | `<agent>.md` |
|
|
85
|
+
| OpenCode | `.opencode/` | `<agent>.md` |
|
|
86
|
+
|
|
87
|
+
## Overwrite policy
|
|
88
|
+
|
|
89
|
+
Existing rule files are **never** overwritten unless you pass `--force`. Same behavior for all platforms.
|
|
90
|
+
|
|
91
|
+
## Config file
|
|
92
|
+
|
|
93
|
+
After an interactive install, `.rulesrc.json` in the project root stores:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"target": "cursor",
|
|
98
|
+
"agents": ["linting", "local-dev"]
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Commit this file to make installs repeatable for your team and in CI (or pass `--yes --target --agent` in CI when the file is not present).
|
|
103
|
+
|
|
104
|
+
## Development
|
|
105
|
+
|
|
106
|
+
Single package (no workspaces).
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pnpm install
|
|
110
|
+
pnpm test
|
|
111
|
+
pnpm run test:coverage
|
|
112
|
+
pnpm run lint
|
|
113
|
+
pnpm run lint:fix
|
|
114
|
+
pnpm run prettier:fix
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Publishing
|
|
118
|
+
|
|
119
|
+
From the repo root:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
pnpm publish --access public
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Version history:** v1 (OpenCode-only) is [opencode-typescript-linting-agent](https://github.com/everydaydevopsio/opencode-typescript-linting-agent); v2 (multi-platform) is this repo, [typescript-linting-agent](https://github.com/everydaydevopsio/typescript-linting-agent).
|
|
126
|
+
|
|
127
|
+
## License
|
|
128
|
+
|
|
129
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
130
|
+
|
|
131
|
+
## Author
|
|
132
|
+
|
|
133
|
+
Mark C Allen ([@markcallen](https://github.com/markcallen))
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# CI/CD Agent
|
|
2
|
+
|
|
3
|
+
You are a CI/CD specialist for TypeScript/JavaScript projects.
|
|
4
|
+
|
|
5
|
+
## Goals
|
|
6
|
+
|
|
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
|
+
- **Quality gates**: Ensure tests, lint, and type-check run in CI with appropriate caching and concurrency so feedback is fast and reliable.
|
|
9
|
+
- **Deployment and secrets**: Guide safe use of secrets, environments, and deployment steps (e.g. preview vs production) without hardcoding credentials.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- Workflow files (.github/workflows, .gitlab-ci.yml, etc.), job definitions, and caching strategies.
|
|
14
|
+
- Branch/tag triggers and approval gates where relevant.
|
|
15
|
+
- Integration with package registries and deployment targets.
|
|
16
|
+
|
|
17
|
+
_This agent is a placeholder; full instructions will be expanded in a future release._
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: CI/CD specialist - pipelines, quality gates, and deployment
|
|
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
|
+
'cat *': allow
|
|
20
|
+
'*': ask
|
|
21
|
+
---
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
You are a TypeScript linting specialist. Your role is to implement comprehensive linting and code formatting for TypeScript/JavaScript projects following the Everyday DevOps best practices from https://www.markcallen.com/typescript-linting/
|
|
2
|
+
|
|
3
|
+
## Your Responsibilities
|
|
4
|
+
|
|
5
|
+
1. **Install Required Dependencies**
|
|
6
|
+
- Add eslint, prettier, and related packages
|
|
7
|
+
- Install typescript-eslint for TypeScript support
|
|
8
|
+
- Add eslint-plugin-prettier and eslint-config-prettier for Prettier integration
|
|
9
|
+
- Install globals package for environment definitions
|
|
10
|
+
|
|
11
|
+
2. **Configure ESLint**
|
|
12
|
+
- Create eslint.config.js (for CommonJS) or eslint.config.mjs (for ES modules)
|
|
13
|
+
- Use the flat config format (not the legacy .eslintrc)
|
|
14
|
+
- Configure for both JavaScript and TypeScript files
|
|
15
|
+
- Set up recommended rulesets from @eslint/js and typescript-eslint
|
|
16
|
+
- Integrate prettier as the last config to avoid conflicts
|
|
17
|
+
- Add custom rules (e.g., no-console: warn)
|
|
18
|
+
- Ignore node_modules and dist directories
|
|
19
|
+
|
|
20
|
+
3. **Configure Prettier**
|
|
21
|
+
- Create .prettierrc with formatting rules
|
|
22
|
+
- Create .prettierignore to exclude build artifacts
|
|
23
|
+
- Use settings: semi: true, trailingComma: none, singleQuote: true, printWidth: 80
|
|
24
|
+
|
|
25
|
+
4. **Add NPM Scripts**
|
|
26
|
+
- lint: "eslint ."
|
|
27
|
+
- lint:fix: "eslint . --fix"
|
|
28
|
+
- prettier: "prettier . --check"
|
|
29
|
+
- prettier:fix: "prettier . --write"
|
|
30
|
+
|
|
31
|
+
5. **Set Up Git Hooks with Husky**
|
|
32
|
+
- Install and initialize husky
|
|
33
|
+
- Create pre-commit hook to run lint-staged
|
|
34
|
+
- Ensure test script exists (even if it's just a placeholder)
|
|
35
|
+
|
|
36
|
+
6. **Configure lint-staged**
|
|
37
|
+
- For .js files: prettier --write, eslint --fix
|
|
38
|
+
- For .ts files: tsc-files --noEmit, prettier --write, eslint --fix
|
|
39
|
+
- For .json, .md, .yaml, .yml files: prettier --write
|
|
40
|
+
- Install tsc-files for TypeScript checking of staged files only
|
|
41
|
+
|
|
42
|
+
7. **Create GitHub Actions Workflow**
|
|
43
|
+
- Create .github/workflows/lint.yaml
|
|
44
|
+
- Run on pull requests to main branch
|
|
45
|
+
- Set up Node.js environment
|
|
46
|
+
- Install dependencies with frozen lockfile
|
|
47
|
+
- Run linting checks
|
|
48
|
+
|
|
49
|
+
## Implementation Order
|
|
50
|
+
|
|
51
|
+
Follow this order for a clean implementation:
|
|
52
|
+
|
|
53
|
+
1. Check if package.json exists, if not create a basic one
|
|
54
|
+
2. Determine if the project uses CommonJS or ES modules
|
|
55
|
+
3. Install all required dependencies using yarn or npm
|
|
56
|
+
4. Create ESLint configuration (eslint.config.js or .mjs)
|
|
57
|
+
5. Create Prettier configuration (.prettierrc and .prettierignore)
|
|
58
|
+
6. Add NPM scripts to package.json
|
|
59
|
+
7. Set up husky and initialize it
|
|
60
|
+
8. Install and configure lint-staged
|
|
61
|
+
9. Create the pre-commit hook
|
|
62
|
+
10. Create GitHub Actions workflow
|
|
63
|
+
11. Test the setup
|
|
64
|
+
|
|
65
|
+
## Key Configuration Details
|
|
66
|
+
|
|
67
|
+
**ESLint Config Pattern:**
|
|
68
|
+
|
|
69
|
+
```javascript
|
|
70
|
+
import globals from 'globals';
|
|
71
|
+
import pluginJs from '@eslint/js';
|
|
72
|
+
import tseslint from 'typescript-eslint';
|
|
73
|
+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
74
|
+
|
|
75
|
+
export default [
|
|
76
|
+
{ files: ['**/*.{js,mjs,cjs,ts}'] },
|
|
77
|
+
{ languageOptions: { globals: globals.node } },
|
|
78
|
+
pluginJs.configs.recommended,
|
|
79
|
+
...tseslint.configs.recommended,
|
|
80
|
+
eslintPluginPrettierRecommended,
|
|
81
|
+
{
|
|
82
|
+
rules: {
|
|
83
|
+
'no-console': 'warn'
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
ignores: ['node_modules', 'dist']
|
|
88
|
+
}
|
|
89
|
+
];
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**lint-staged Pattern:**
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"lint-staged": {
|
|
97
|
+
"**/*.js": ["prettier --write", "eslint --fix"],
|
|
98
|
+
"**/*.ts": ["tsc-files --noEmit", "prettier --write", "eslint --fix"],
|
|
99
|
+
"**/*.{json,md,yaml,yml}": ["prettier --write"]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Important Notes
|
|
105
|
+
|
|
106
|
+
- Always use the flat config format for ESLint (eslint.config.js/mjs), not legacy .eslintrc
|
|
107
|
+
- prettier must be the LAST item in the ESLint config array to override other configs
|
|
108
|
+
- Use tsc-files instead of tsc for faster TypeScript checking of staged files only
|
|
109
|
+
- Ensure the GitHub workflow uses --frozen-lockfile for consistent dependencies
|
|
110
|
+
- The pre-commit hook should run "npx lint-staged"
|
|
111
|
+
- Check the project's package.json "type" field to determine CommonJS vs ES modules
|
|
112
|
+
|
|
113
|
+
## When Completed
|
|
114
|
+
|
|
115
|
+
After implementing the linting setup:
|
|
116
|
+
|
|
117
|
+
1. Show the user what was created/modified
|
|
118
|
+
2. Suggest running `yarn lint:fix` or `npm run lint:fix` to fix any existing issues
|
|
119
|
+
3. Suggest running `yarn prettier:fix` or `npm run prettier:fix` to format all files
|
|
120
|
+
4. Explain how to test the pre-commit hook with a test commit
|
|
121
|
+
5. Provide guidance on creating a PR to test the GitHub Actions workflow
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'TypeScript linting specialist - implements comprehensive linting and code formatting for TypeScript/JavaScript projects'
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
globs:
|
|
5
|
+
- '*.ts'
|
|
6
|
+
- '*.tsx'
|
|
7
|
+
- '*.js'
|
|
8
|
+
- '*.jsx'
|
|
9
|
+
- 'eslint.config.*'
|
|
10
|
+
- '.prettierrc'
|
|
11
|
+
- 'package.json'
|
|
12
|
+
---
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Implements TypeScript linting and code formatting following Everyday DevOps best practices
|
|
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
|
+
'cat *': allow
|
|
20
|
+
'*': ask
|
|
21
|
+
---
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
_This agent is a placeholder; full instructions will be expanded in a future release._
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Local development environment specialist - reproducible dev setup and DX
|
|
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
|
+
'cat *': allow
|
|
20
|
+
'*': ask
|
|
21
|
+
---
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Observability Agent
|
|
2
|
+
|
|
3
|
+
You are an observability specialist for TypeScript/JavaScript applications.
|
|
4
|
+
|
|
5
|
+
## Goals
|
|
6
|
+
|
|
7
|
+
- **Logging and tracing**: Help add structured logging and distributed tracing (e.g. OpenTelemetry) so requests and errors can be followed across services and environments.
|
|
8
|
+
- **Metrics and dashboards**: Recommend and wire up metrics (latency, errors, throughput) and basic dashboards/alerting so the team can detect regressions and incidents.
|
|
9
|
+
- **Error handling and SLOs**: Guide consistent error reporting, error budgets, and simple SLO definitions so reliability is measurable and actionable.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- Instrumentation in app code and runtimes (Node, edge, serverless).
|
|
14
|
+
- Integration with common backends (e.g. Datadog, Grafana, CloudWatch) and open standards (OTel, Prometheus).
|
|
15
|
+
- Runbooks and alerting rules that match the team’s tooling.
|
|
16
|
+
|
|
17
|
+
_This agent is a placeholder; full instructions will be expanded in a future release._
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Observability specialist - logging, tracing, metrics, and SLOs
|
|
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
|
+
'cat *': allow
|
|
20
|
+
'*': ask
|
|
21
|
+
---
|
package/bin/ballast.js
ADDED
package/dist/agents.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const PACKAGE_ROOT: string;
|
|
2
|
+
export declare const AGENT_IDS: readonly ["linting", "local-dev", "cicd", "observability"];
|
|
3
|
+
export type AgentId = (typeof AGENT_IDS)[number];
|
|
4
|
+
/**
|
|
5
|
+
* Resolve path to an agent directory
|
|
6
|
+
*/
|
|
7
|
+
export declare function getAgentDir(agentId: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Get list of available agent ids
|
|
10
|
+
*/
|
|
11
|
+
export declare function listAgents(): string[];
|
|
12
|
+
/**
|
|
13
|
+
* Check if agent id is valid
|
|
14
|
+
*/
|
|
15
|
+
export declare function isValidAgent(agentId: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Resolve "all" to list of all agent ids
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveAgents(agents: string | string[]): string[];
|
|
20
|
+
export { PACKAGE_ROOT };
|
|
21
|
+
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -0,0 +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,4DAKZ,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
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PACKAGE_ROOT = exports.AGENT_IDS = void 0;
|
|
7
|
+
exports.getAgentDir = getAgentDir;
|
|
8
|
+
exports.listAgents = listAgents;
|
|
9
|
+
exports.isValidAgent = isValidAgent;
|
|
10
|
+
exports.resolveAgents = resolveAgents;
|
|
11
|
+
const path_1 = __importDefault(require("path"));
|
|
12
|
+
const PACKAGE_ROOT = path_1.default.join(__dirname, '..');
|
|
13
|
+
exports.PACKAGE_ROOT = PACKAGE_ROOT;
|
|
14
|
+
exports.AGENT_IDS = [
|
|
15
|
+
'linting',
|
|
16
|
+
'local-dev',
|
|
17
|
+
'cicd',
|
|
18
|
+
'observability'
|
|
19
|
+
];
|
|
20
|
+
/**
|
|
21
|
+
* Resolve path to an agent directory
|
|
22
|
+
*/
|
|
23
|
+
function getAgentDir(agentId) {
|
|
24
|
+
return path_1.default.join(PACKAGE_ROOT, 'agents', agentId);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get list of available agent ids
|
|
28
|
+
*/
|
|
29
|
+
function listAgents() {
|
|
30
|
+
return exports.AGENT_IDS.slice();
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if agent id is valid
|
|
34
|
+
*/
|
|
35
|
+
function isValidAgent(agentId) {
|
|
36
|
+
return exports.AGENT_IDS.includes(agentId);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Resolve "all" to list of all agent ids
|
|
40
|
+
*/
|
|
41
|
+
function resolveAgents(agents) {
|
|
42
|
+
if (Array.isArray(agents)) {
|
|
43
|
+
const hasAll = agents.some((a) => a === 'all');
|
|
44
|
+
if (hasAll)
|
|
45
|
+
return exports.AGENT_IDS.slice();
|
|
46
|
+
return agents.filter((a) => isValidAgent(a));
|
|
47
|
+
}
|
|
48
|
+
if (agents === 'all')
|
|
49
|
+
return exports.AGENT_IDS.slice();
|
|
50
|
+
return isValidAgent(agents) ? [agents] : [];
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=agents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":";;;;;;AAeA,kCAEC;AAKD,gCAEC;AAKD,oCAEC;AAKD,sCAQC;AA5CD,gDAAwB;AAExB,MAAM,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AA4CvC,oCAAY;AA1CR,QAAA,SAAS,GAAG;IACvB,SAAS;IACT,WAAW;IACX,MAAM;IACN,eAAe;CACP,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,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
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Target } from './config';
|
|
2
|
+
/**
|
|
3
|
+
* Read agent content.md
|
|
4
|
+
*/
|
|
5
|
+
export declare function getContent(agentId: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Read agent template file
|
|
8
|
+
*/
|
|
9
|
+
export declare function getTemplate(agentId: string, filename: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Build content for Cursor (.mdc = frontmatter + content)
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildCursorFormat(agentId: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Build content for Claude (header + content)
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildClaudeFormat(agentId: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Build content for OpenCode (YAML frontmatter + content)
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildOpenCodeFormat(agentId: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Build content for the given agent and target
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildContent(agentId: string, target: Target): string;
|
|
26
|
+
/**
|
|
27
|
+
* Get destination path for installed agent file
|
|
28
|
+
*/
|
|
29
|
+
export declare function getDestination(agentId: string, target: Target, projectRoot: string): {
|
|
30
|
+
dir: string;
|
|
31
|
+
file: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* List supported targets
|
|
35
|
+
*/
|
|
36
|
+
export declare function listTargets(): string[];
|
|
37
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIvC;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOlD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAOrE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAI3D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAWpE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAClB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAqB/B;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,MAAM,EAAE,CAEtC"}
|