@everydaydevopsio/ballast 3.2.1 → 4.0.5

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 (99) hide show
  1. package/agents/go/linting/content.md +13 -0
  2. package/agents/go/linting/templates/claude-header.md +5 -0
  3. package/agents/go/linting/templates/codex-header.md +5 -0
  4. package/agents/go/linting/templates/cursor-frontmatter.yaml +7 -0
  5. package/agents/go/linting/templates/opencode-frontmatter.yaml +17 -0
  6. package/agents/go/logging/content.md +8 -0
  7. package/agents/go/logging/templates/claude-header.md +5 -0
  8. package/agents/go/logging/templates/codex-header.md +5 -0
  9. package/agents/go/logging/templates/cursor-frontmatter.yaml +6 -0
  10. package/agents/go/logging/templates/opencode-frontmatter.yaml +17 -0
  11. package/agents/go/testing/content.md +13 -0
  12. package/agents/go/testing/templates/claude-header.md +5 -0
  13. package/agents/go/testing/templates/codex-header.md +5 -0
  14. package/agents/go/testing/templates/cursor-frontmatter.yaml +6 -0
  15. package/agents/go/testing/templates/opencode-frontmatter.yaml +17 -0
  16. package/agents/python/linting/content.md +21 -0
  17. package/agents/python/linting/templates/claude-header.md +5 -0
  18. package/agents/python/linting/templates/codex-header.md +5 -0
  19. package/agents/python/linting/templates/cursor-frontmatter.yaml +8 -0
  20. package/agents/python/linting/templates/opencode-frontmatter.yaml +17 -0
  21. package/agents/python/logging/content.md +9 -0
  22. package/agents/python/logging/templates/claude-header.md +5 -0
  23. package/agents/python/logging/templates/codex-header.md +5 -0
  24. package/agents/python/logging/templates/cursor-frontmatter.yaml +6 -0
  25. package/agents/python/logging/templates/opencode-frontmatter.yaml +17 -0
  26. package/agents/python/testing/content.md +13 -0
  27. package/agents/python/testing/templates/claude-header.md +5 -0
  28. package/agents/python/testing/templates/codex-header.md +5 -0
  29. package/agents/python/testing/templates/cursor-frontmatter.yaml +8 -0
  30. package/agents/python/testing/templates/opencode-frontmatter.yaml +17 -0
  31. package/agents/{linting → typescript/linting}/content.md +4 -11
  32. package/dist/agents.d.ts +9 -5
  33. package/dist/agents.d.ts.map +1 -1
  34. package/dist/agents.js +42 -17
  35. package/dist/agents.js.map +1 -1
  36. package/dist/build.d.ts +11 -10
  37. package/dist/build.d.ts.map +1 -1
  38. package/dist/build.js +32 -31
  39. package/dist/build.js.map +1 -1
  40. package/dist/cli.d.ts +1 -0
  41. package/dist/cli.d.ts.map +1 -1
  42. package/dist/cli.js +18 -2
  43. package/dist/cli.js.map +1 -1
  44. package/dist/config.d.ts +7 -6
  45. package/dist/config.d.ts.map +1 -1
  46. package/dist/config.js +29 -11
  47. package/dist/config.js.map +1 -1
  48. package/dist/install.d.ts +5 -1
  49. package/dist/install.d.ts.map +1 -1
  50. package/dist/install.js +37 -19
  51. package/dist/install.js.map +1 -1
  52. package/package.json +16 -13
  53. package/LICENSE +0 -21
  54. package/README.md +0 -176
  55. /package/agents/{cicd → common/cicd}/content.md +0 -0
  56. /package/agents/{cicd → common/cicd}/templates/claude-header.md +0 -0
  57. /package/agents/{cicd → common/cicd}/templates/codex-header.md +0 -0
  58. /package/agents/{cicd → common/cicd}/templates/cursor-frontmatter.yaml +0 -0
  59. /package/agents/{cicd → common/cicd}/templates/opencode-frontmatter.yaml +0 -0
  60. /package/agents/{local-dev → common/local-dev}/content-badges.md +0 -0
  61. /package/agents/{local-dev → common/local-dev}/content-env.md +0 -0
  62. /package/agents/{local-dev → common/local-dev}/content-license.md +0 -0
  63. /package/agents/{local-dev → common/local-dev}/content-mcp.md +0 -0
  64. /package/agents/{local-dev → common/local-dev}/templates/claude-header-badges.md +0 -0
  65. /package/agents/{local-dev → common/local-dev}/templates/claude-header-license.md +0 -0
  66. /package/agents/{local-dev → common/local-dev}/templates/claude-header-mcp.md +0 -0
  67. /package/agents/{local-dev → common/local-dev}/templates/claude-header.md +0 -0
  68. /package/agents/{local-dev → common/local-dev}/templates/codex-header-badges.md +0 -0
  69. /package/agents/{local-dev → common/local-dev}/templates/codex-header-license.md +0 -0
  70. /package/agents/{local-dev → common/local-dev}/templates/codex-header-mcp.md +0 -0
  71. /package/agents/{local-dev → common/local-dev}/templates/codex-header.md +0 -0
  72. /package/agents/{local-dev → common/local-dev}/templates/cursor-frontmatter-badges.yaml +0 -0
  73. /package/agents/{local-dev → common/local-dev}/templates/cursor-frontmatter-env.yaml +0 -0
  74. /package/agents/{local-dev → common/local-dev}/templates/cursor-frontmatter-license.yaml +0 -0
  75. /package/agents/{local-dev → common/local-dev}/templates/cursor-frontmatter-mcp.yaml +0 -0
  76. /package/agents/{local-dev → common/local-dev}/templates/cursor-frontmatter.yaml +0 -0
  77. /package/agents/{local-dev → common/local-dev}/templates/opencode-frontmatter-badges.yaml +0 -0
  78. /package/agents/{local-dev → common/local-dev}/templates/opencode-frontmatter-license.yaml +0 -0
  79. /package/agents/{local-dev → common/local-dev}/templates/opencode-frontmatter-mcp.yaml +0 -0
  80. /package/agents/{local-dev → common/local-dev}/templates/opencode-frontmatter.yaml +0 -0
  81. /package/agents/{observability → common/observability}/content.md +0 -0
  82. /package/agents/{observability → common/observability}/templates/claude-header.md +0 -0
  83. /package/agents/{observability → common/observability}/templates/codex-header.md +0 -0
  84. /package/agents/{observability → common/observability}/templates/cursor-frontmatter.yaml +0 -0
  85. /package/agents/{observability → common/observability}/templates/opencode-frontmatter.yaml +0 -0
  86. /package/agents/{linting → typescript/linting}/templates/claude-header.md +0 -0
  87. /package/agents/{linting → typescript/linting}/templates/codex-header.md +0 -0
  88. /package/agents/{linting → typescript/linting}/templates/cursor-frontmatter.yaml +0 -0
  89. /package/agents/{linting → typescript/linting}/templates/opencode-frontmatter.yaml +0 -0
  90. /package/agents/{logging → typescript/logging}/content.md +0 -0
  91. /package/agents/{logging → typescript/logging}/templates/claude-header.md +0 -0
  92. /package/agents/{logging → typescript/logging}/templates/codex-header.md +0 -0
  93. /package/agents/{logging → typescript/logging}/templates/cursor-frontmatter.yaml +0 -0
  94. /package/agents/{logging → typescript/logging}/templates/opencode-frontmatter.yaml +0 -0
  95. /package/agents/{testing → typescript/testing}/content.md +0 -0
  96. /package/agents/{testing → typescript/testing}/templates/claude-header.md +0 -0
  97. /package/agents/{testing → typescript/testing}/templates/codex-header.md +0 -0
  98. /package/agents/{testing → typescript/testing}/templates/cursor-frontmatter.yaml +0 -0
  99. /package/agents/{testing → typescript/testing}/templates/opencode-frontmatter.yaml +0 -0
@@ -0,0 +1,13 @@
1
+ You are a Go linting specialist. Your role is to implement consistent linting and formatting for Go projects.
2
+
3
+ ## Your Responsibilities
4
+
5
+ 1. Enforce formatting with `gofmt`.
6
+ 2. Configure `golangci-lint` with sane defaults.
7
+ 3. Add CI lint checks.
8
+ 4. Keep lint rules strict enough to prevent regressions while avoiding excessive noise.
9
+
10
+ ## Commands
11
+
12
+ - `gofmt -w .`
13
+ - `golangci-lint run`
@@ -0,0 +1,5 @@
1
+ # Go Linting Rules
2
+
3
+ These rules provide Go Linting Rules guidance for projects in this repository.
4
+
5
+ ---
@@ -0,0 +1,5 @@
1
+ # Go Linting Rules
2
+
3
+ These rules provide Go Linting Rules guidance for projects in this repository.
4
+
5
+ ---
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: 'Go linting specialist for gofmt and golangci-lint setup'
3
+ alwaysApply: false
4
+ globs:
5
+ - '*.go'
6
+ - '.golangci.yml'
7
+ ---
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Go linting specialist for gofmt and golangci-lint setup
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
+ '*': ask
17
+ ---
@@ -0,0 +1,8 @@
1
+ You are a Go logging specialist. Your role is to establish structured and maintainable application logging.
2
+
3
+ ## Your Responsibilities
4
+
5
+ 1. Prefer structured logging with `log/slog` (or `zerolog` where already adopted).
6
+ 2. Standardize fields for request IDs, user IDs, and operation names.
7
+ 3. Ensure error logs include actionable context.
8
+ 4. Avoid logging secrets and high-cardinality noise.
@@ -0,0 +1,5 @@
1
+ # Go Logging Rules
2
+
3
+ These rules provide Go Logging Rules guidance for projects in this repository.
4
+
5
+ ---
@@ -0,0 +1,5 @@
1
+ # Go Logging Rules
2
+
3
+ These rules provide Go Logging Rules guidance for projects in this repository.
4
+
5
+ ---
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: 'Go logging specialist for structured logging patterns'
3
+ alwaysApply: false
4
+ globs:
5
+ - '*.go'
6
+ ---
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Go logging specialist for structured logging patterns
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
+ '*': ask
17
+ ---
@@ -0,0 +1,13 @@
1
+ You are a Go testing specialist. Your role is to set up effective and maintainable tests.
2
+
3
+ ## Your Responsibilities
4
+
5
+ 1. Use `go test` as the baseline test runner.
6
+ 2. Add table-driven tests for core logic.
7
+ 3. Include coverage checks in CI.
8
+ 4. Keep tests deterministic and isolated.
9
+
10
+ ## Commands
11
+
12
+ - `go test ./...`
13
+ - `go test ./... -cover`
@@ -0,0 +1,5 @@
1
+ # Go Testing Rules
2
+
3
+ These rules provide Go Testing Rules guidance for projects in this repository.
4
+
5
+ ---
@@ -0,0 +1,5 @@
1
+ # Go Testing Rules
2
+
3
+ These rules provide Go Testing Rules guidance for projects in this repository.
4
+
5
+ ---
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: 'Go testing specialist for go test and coverage setup'
3
+ alwaysApply: false
4
+ globs:
5
+ - '*.go'
6
+ ---
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Go testing specialist for go test and coverage setup
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
+ '*': ask
17
+ ---
@@ -0,0 +1,21 @@
1
+ You are a Python linting specialist. Your role is to implement practical linting and formatting for Python projects.
2
+
3
+ ## Your Responsibilities
4
+
5
+ 1. Install and configure Ruff for linting and formatting.
6
+ 2. Install and configure Black when projects explicitly require it.
7
+ 3. Add mypy for static type checks when the codebase uses type hints.
8
+ 4. Add scripts/commands for lint, format, and typecheck.
9
+ 5. Ensure CI runs linting and type checks.
10
+
11
+ ## Baseline Tooling
12
+
13
+ - Ruff for linting and import sorting
14
+ - Black for formatting (optional if Ruff format is preferred)
15
+ - mypy for type checking
16
+
17
+ ## Commands
18
+
19
+ - `ruff check .`
20
+ - `ruff format .`
21
+ - `mypy .`
@@ -0,0 +1,5 @@
1
+ # Python Linting Rules
2
+
3
+ These rules provide Python Linting Rules guidance for projects in this repository.
4
+
5
+ ---
@@ -0,0 +1,5 @@
1
+ # Python Linting Rules
2
+
3
+ These rules provide Python Linting Rules guidance for projects in this repository.
4
+
5
+ ---
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: 'Python linting specialist for Ruff/Black/mypy setup'
3
+ alwaysApply: false
4
+ globs:
5
+ - '*.py'
6
+ - 'pyproject.toml'
7
+ - 'ruff.toml'
8
+ ---
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Python linting specialist for Ruff/Black/mypy setup
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
+ '*': ask
17
+ ---
@@ -0,0 +1,9 @@
1
+ You are a Python logging specialist. Your role is to establish structured, production-safe logging.
2
+
3
+ ## Your Responsibilities
4
+
5
+ 1. Use structured logging with `structlog` or the standard `logging` module with JSON formatters.
6
+ 2. Ensure log levels and handlers are environment-aware.
7
+ 3. Prevent sensitive data from being logged.
8
+ 4. Provide clear request and error context in logs.
9
+ 5. Ensure logs are ingestion-friendly for centralized observability stacks.
@@ -0,0 +1,5 @@
1
+ # Python Logging Rules
2
+
3
+ These rules provide Python Logging Rules guidance for projects in this repository.
4
+
5
+ ---
@@ -0,0 +1,5 @@
1
+ # Python Logging Rules
2
+
3
+ These rules provide Python Logging Rules guidance for projects in this repository.
4
+
5
+ ---
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: 'Python logging specialist for structured logging patterns'
3
+ alwaysApply: false
4
+ globs:
5
+ - '*.py'
6
+ ---
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Python logging specialist for structured logging patterns
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
+ '*': ask
17
+ ---
@@ -0,0 +1,13 @@
1
+ You are a Python testing specialist. Your role is to set up reliable automated testing.
2
+
3
+ ## Your Responsibilities
4
+
5
+ 1. Configure pytest with clear test discovery.
6
+ 2. Add coverage reporting via pytest-cov.
7
+ 3. Provide fast local test commands and CI test steps.
8
+ 4. Encourage deterministic unit tests and minimal flaky integration tests.
9
+
10
+ ## Commands
11
+
12
+ - `pytest`
13
+ - `pytest --cov=. --cov-report=term-missing`
@@ -0,0 +1,5 @@
1
+ # Python Testing Rules
2
+
3
+ These rules provide Python Testing Rules guidance for projects in this repository.
4
+
5
+ ---
@@ -0,0 +1,5 @@
1
+ # Python Testing Rules
2
+
3
+ These rules provide Python Testing Rules guidance for projects in this repository.
4
+
5
+ ---
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: 'Python testing specialist for pytest and coverage setup'
3
+ alwaysApply: false
4
+ globs:
5
+ - '*.py'
6
+ - 'pytest.ini'
7
+ - 'pyproject.toml'
8
+ ---
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Python testing specialist for pytest and coverage setup
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
+ '*': ask
17
+ ---
@@ -30,11 +30,7 @@ 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 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`)
33
+ - Create a pre-commit hook with the command to run (e.g. `npx lint-staged`). Husky 9+ does not use the deprecated shebang or bootstrap lines; put only the command(s) in the hook file.
38
34
  - Ensure the hook file is **executable** (e.g. `chmod +x .husky/pre-commit`)
39
35
  - Ensure test script exists (even if it's just a placeholder)
40
36
 
@@ -64,7 +60,7 @@ Follow this order for a clean implementation:
64
60
  6. Add NPM scripts to package.json
65
61
  7. Set up husky and initialize it
66
62
  8. Install and configure lint-staged
67
- 9. Create the pre-commit hook (with standard Husky header and make it executable)
63
+ 9. Create the pre-commit hook (command only, no deprecated header; make it executable)
68
64
  10. Create GitHub Actions workflow
69
65
  11. Test the setup
70
66
 
@@ -107,12 +103,9 @@ export default [
107
103
  }
108
104
  ```
109
105
 
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`).
106
+ **Husky pre-commit hook (Husky 9+):** Put only the command in the hook file (no shebang or bootstrap lines; those are deprecated). Ensure the file is executable (`chmod +x .husky/pre-commit`).
111
107
 
112
108
  ```sh
113
- #!/usr/bin/env sh
114
- . "$(dirname -- "$0")/_/husky.sh"
115
-
116
109
  npx lint-staged
117
110
  ```
118
111
 
@@ -146,7 +139,7 @@ Omit the pnpm step only when the project uses npm or yarn.
146
139
  - Use tsc-files instead of tsc for faster TypeScript checking of staged files only
147
140
  - Ensure the GitHub workflow uses --frozen-lockfile for consistent dependencies
148
141
  - 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.
142
+ - The pre-commit hook must contain only the command(s) to run (e.g. `npx lint-staged`). Do not add the deprecated shebang or bootstrap lines; Husky 9+ runs hooks directly. Git must be configured to look for hooks in the `.husky` directory (e.g. `core.hooksPath=.husky`). Make the hook file executable (`chmod +x .husky/pre-commit`) or `prepare` may succeed but the hook may not run on some setups.
150
143
  - Check the project's package.json "type" field to determine CommonJS vs ES modules
151
144
 
152
145
  ## When Completed
package/dist/agents.d.ts CHANGED
@@ -1,21 +1,25 @@
1
1
  declare const PACKAGE_ROOT: string;
2
- export declare const AGENT_IDS: readonly ["linting", "local-dev", "cicd", "observability", "logging", "testing"];
2
+ export declare const LANGUAGES: readonly ["typescript", "python", "go"];
3
+ export type Language = (typeof LANGUAGES)[number];
4
+ export declare const COMMON_AGENT_IDS: readonly ["local-dev", "cicd", "observability"];
5
+ export declare const LANGUAGE_AGENT_IDS: readonly ["linting", "logging", "testing"];
6
+ export declare const AGENT_IDS: readonly ["local-dev", "cicd", "observability", "linting", "logging", "testing"];
3
7
  export type AgentId = (typeof AGENT_IDS)[number];
4
8
  /**
5
9
  * Resolve path to an agent directory
6
10
  */
7
- export declare function getAgentDir(agentId: string): string;
11
+ export declare function getAgentDir(agentId: string, language?: Language): string;
8
12
  /**
9
13
  * Get list of available agent ids
10
14
  */
11
- export declare function listAgents(): string[];
15
+ export declare function listAgents(_language?: Language): string[];
12
16
  /**
13
17
  * Check if agent id is valid
14
18
  */
15
- export declare function isValidAgent(agentId: string): boolean;
19
+ export declare function isValidAgent(agentId: string, _language?: Language): boolean;
16
20
  /**
17
21
  * Resolve "all" to list of all agent ids
18
22
  */
19
- export declare function resolveAgents(agents: string | string[]): string[];
23
+ export declare function resolveAgents(agents: string | string[], language?: Language): string[];
20
24
  export { PACKAGE_ROOT };
21
25
  //# sourceMappingURL=agents.d.ts.map
@@ -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,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"}
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,YAAY,QAAgC,CAAC;AAiCnD,eAAO,MAAM,SAAS,yCAA0C,CAAC;AACjE,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAElD,eAAO,MAAM,gBAAgB,iDAAkD,CAAC;AAChF,eAAO,MAAM,kBAAkB,4CAA6C,CAAC;AAC7E,eAAO,MAAM,SAAS,kFAAwD,CAAC;AAC/E,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD;;GAEG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,QAAuB,GAChC,MAAM,CAKR;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,SAAS,GAAE,QAAuB,GAAG,MAAM,EAAE,CAGvE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,QAAuB,GACjC,OAAO,CAGT;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EACzB,QAAQ,GAAE,QAAuB,GAChC,MAAM,EAAE,CAQV;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
package/dist/agents.js CHANGED
@@ -3,52 +3,77 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.PACKAGE_ROOT = exports.AGENT_IDS = void 0;
6
+ exports.PACKAGE_ROOT = exports.AGENT_IDS = exports.LANGUAGE_AGENT_IDS = exports.COMMON_AGENT_IDS = exports.LANGUAGES = void 0;
7
7
  exports.getAgentDir = getAgentDir;
8
8
  exports.listAgents = listAgents;
9
9
  exports.isValidAgent = isValidAgent;
10
10
  exports.resolveAgents = resolveAgents;
11
+ const fs_1 = __importDefault(require("fs"));
11
12
  const path_1 = __importDefault(require("path"));
12
- const PACKAGE_ROOT = path_1.default.join(__dirname, '..');
13
+ const PACKAGE_ROOT = path_1.default.resolve(__dirname, '..');
13
14
  exports.PACKAGE_ROOT = PACKAGE_ROOT;
14
- exports.AGENT_IDS = [
15
- 'linting',
16
- 'local-dev',
17
- 'cicd',
18
- 'observability',
19
- 'logging',
20
- 'testing'
21
- ];
15
+ function hasAgents(root) {
16
+ return fs_1.default.existsSync(path_1.default.join(root, 'agents', 'common'));
17
+ }
18
+ function resolveAgentsRoot() {
19
+ const repoRootOverride = process.env.BALLAST_REPO_ROOT;
20
+ if (repoRootOverride) {
21
+ const resolved = path_1.default.resolve(repoRootOverride);
22
+ if (!hasAgents(resolved)) {
23
+ throw new Error(`BALLAST_REPO_ROOT does not contain agents/: ${resolved}`);
24
+ }
25
+ return resolved;
26
+ }
27
+ if (hasAgents(PACKAGE_ROOT)) {
28
+ return PACKAGE_ROOT;
29
+ }
30
+ // Monorepo fallback for local development and tests.
31
+ const monorepoRoot = path_1.default.resolve(PACKAGE_ROOT, '..', '..');
32
+ if (hasAgents(monorepoRoot)) {
33
+ return monorepoRoot;
34
+ }
35
+ return PACKAGE_ROOT;
36
+ }
37
+ const AGENTS_ROOT = resolveAgentsRoot();
38
+ exports.LANGUAGES = ['typescript', 'python', 'go'];
39
+ exports.COMMON_AGENT_IDS = ['local-dev', 'cicd', 'observability'];
40
+ exports.LANGUAGE_AGENT_IDS = ['linting', 'logging', 'testing'];
41
+ exports.AGENT_IDS = [...exports.COMMON_AGENT_IDS, ...exports.LANGUAGE_AGENT_IDS];
22
42
  /**
23
43
  * Resolve path to an agent directory
24
44
  */
25
- function getAgentDir(agentId) {
26
- return path_1.default.join(PACKAGE_ROOT, 'agents', agentId);
45
+ function getAgentDir(agentId, language = 'typescript') {
46
+ if (exports.COMMON_AGENT_IDS.includes(agentId)) {
47
+ return path_1.default.join(AGENTS_ROOT, 'agents', 'common', agentId);
48
+ }
49
+ return path_1.default.join(AGENTS_ROOT, 'agents', language, agentId);
27
50
  }
28
51
  /**
29
52
  * Get list of available agent ids
30
53
  */
31
- function listAgents() {
54
+ function listAgents(_language = 'typescript') {
55
+ void _language;
32
56
  return exports.AGENT_IDS.slice();
33
57
  }
34
58
  /**
35
59
  * Check if agent id is valid
36
60
  */
37
- function isValidAgent(agentId) {
61
+ function isValidAgent(agentId, _language = 'typescript') {
62
+ void _language;
38
63
  return exports.AGENT_IDS.includes(agentId);
39
64
  }
40
65
  /**
41
66
  * Resolve "all" to list of all agent ids
42
67
  */
43
- function resolveAgents(agents) {
68
+ function resolveAgents(agents, language = 'typescript') {
44
69
  if (Array.isArray(agents)) {
45
70
  const hasAll = agents.some((a) => a === 'all');
46
71
  if (hasAll)
47
72
  return exports.AGENT_IDS.slice();
48
- return agents.filter((a) => isValidAgent(a));
73
+ return agents.filter((a) => isValidAgent(a, language));
49
74
  }
50
75
  if (agents === 'all')
51
76
  return exports.AGENT_IDS.slice();
52
- return isValidAgent(agents) ? [agents] : [];
77
+ return isValidAgent(agents, language) ? [agents] : [];
53
78
  }
54
79
  //# sourceMappingURL=agents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":";;;;;;AAiBA,kCAEC;AAKD,gCAEC;AAKD,oCAEC;AAKD,sCAQC;AA9CD,gDAAwB;AAExB,MAAM,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AA8CvC,oCAAY;AA5CR,QAAA,SAAS,GAAG;IACvB,SAAS;IACT,WAAW;IACX,MAAM;IACN,eAAe;IACf,SAAS;IACT,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;AAC5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3B,CAAC;AAED;;GAEG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,YAAsB,YAAY;IAElC,KAAK,SAAS,CAAC;IACf,OAAQ,iBAA+B,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAC3B,MAAyB,EACzB,WAAqB,YAAY;IAEjC,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,EAAE,QAAQ,CAAC,CAAC,CAAC;IACzD,CAAC;IACD,IAAI,MAAM,KAAK,KAAK;QAAE,OAAO,iBAAS,CAAC,KAAK,EAAE,CAAC;IAC/C,OAAO,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACxD,CAAC"}
package/dist/build.d.ts CHANGED
@@ -1,40 +1,41 @@
1
1
  import type { Target } from './config';
2
+ import type { Language } from './agents';
2
3
  /**
3
4
  * List rule suffixes for an agent. content.md → suffix ''; content-<suffix>.md → suffix.
4
5
  * At least one of content.md or content-*.md must exist.
5
6
  */
6
- export declare function listRuleSuffixes(agentId: string): string[];
7
+ export declare function listRuleSuffixes(agentId: string, language?: Language): string[];
7
8
  /**
8
9
  * Read agent content for a rule. ruleSuffix '' or undefined = content.md; else content-<suffix>.md.
9
10
  */
10
- export declare function getContent(agentId: string, ruleSuffix?: string): string;
11
+ export declare function getContent(agentId: string, ruleSuffix?: string, language?: Language): string;
11
12
  /**
12
13
  * Read agent template file. Tries rule-specific template first (e.g. cursor-frontmatter-mcp.yaml).
13
14
  */
14
- export declare function getTemplate(agentId: string, filename: string, ruleSuffix?: string): string;
15
+ export declare function getTemplate(agentId: string, filename: string, ruleSuffix?: string, language?: Language): string;
15
16
  /**
16
17
  * Build content for Cursor (.mdc = frontmatter + content)
17
18
  */
18
- export declare function buildCursorFormat(agentId: string, ruleSuffix?: string): string;
19
+ export declare function buildCursorFormat(agentId: string, ruleSuffix?: string, language?: Language): string;
19
20
  /**
20
21
  * Build content for Claude (header + content)
21
22
  */
22
- export declare function buildClaudeFormat(agentId: string, ruleSuffix?: string): string;
23
+ export declare function buildClaudeFormat(agentId: string, ruleSuffix?: string, language?: Language): string;
23
24
  /**
24
25
  * Build content for OpenCode (YAML frontmatter + content)
25
26
  */
26
- export declare function buildOpenCodeFormat(agentId: string, ruleSuffix?: string): string;
27
+ export declare function buildOpenCodeFormat(agentId: string, ruleSuffix?: string, language?: Language): string;
27
28
  /**
28
29
  * Build content for Codex (header + content)
29
30
  */
30
- export declare function buildCodexFormat(agentId: string, ruleSuffix?: string): string;
31
+ export declare function buildCodexFormat(agentId: string, ruleSuffix?: string, language?: Language): string;
31
32
  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;
33
+ export declare function getCodexRuleDescription(agentId: string, ruleSuffix?: string, language?: Language): string | null;
34
+ export declare function buildCodexAgentsMd(agents: string[], language?: Language): string;
34
35
  /**
35
36
  * Build content for the given agent, target, and optional rule suffix
36
37
  */
37
- export declare function buildContent(agentId: string, target: Target, ruleSuffix?: string): string;
38
+ export declare function buildContent(agentId: string, target: Target, ruleSuffix?: string, language?: Language): string;
38
39
  /**
39
40
  * Get destination path for installed agent file. ruleSuffix '' or undefined = main rule; else <agentId>-<suffix>.
40
41
  */
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.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