@dougefresh/ci 0.1.11

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 (54) hide show
  1. package/.checkov.yml +7 -0
  2. package/.env.example +61 -0
  3. package/.gitattributes +3 -0
  4. package/.github/actions/install-yq/action.yaml +80 -0
  5. package/.github/actions/install-yq/scripts/unixish.sh +112 -0
  6. package/.github/actions/install-yq/scripts/windowsish.ps1 +99 -0
  7. package/.github/actions/rust-config/action.yml +34 -0
  8. package/.github/actions/rust-init/action.yml +75 -0
  9. package/.github/ci-configs/dummy.yml +24 -0
  10. package/.github/ci-configs/rust/ai.yml +65 -0
  11. package/.github/ci-configs/rust-default.yml +115 -0
  12. package/.github/ci-configs/test/01.yml +9 -0
  13. package/.github/copilot-instructions.md +118 -0
  14. package/.github/dependabot.yml +26 -0
  15. package/.github/prompts/create-release-notes.prompt.md +29 -0
  16. package/.github/prompts/unit-test.prompt.md +77 -0
  17. package/.github/rust-ci.ts +5 -0
  18. package/.github/workflows/action-ci.yml +39 -0
  19. package/.github/workflows/action-review.yml +14 -0
  20. package/.github/workflows/dummy-release.yml +32 -0
  21. package/.github/workflows/dummy-test.yml +16 -0
  22. package/.github/workflows/pages.yml +59 -0
  23. package/.github/workflows/pr-review.yml +93 -0
  24. package/.github/workflows/release.yml +41 -0
  25. package/.github/workflows/rust-release.yml +133 -0
  26. package/.github/workflows/rust.yml +247 -0
  27. package/.node-version +1 -0
  28. package/AGENTS.md +13 -0
  29. package/Cargo.toml +6 -0
  30. package/LICENSE +21 -0
  31. package/README.md +58 -0
  32. package/action.yml +32 -0
  33. package/biome.jsonc +108 -0
  34. package/bun.lock +22 -0
  35. package/dist/ai.d.ts +11 -0
  36. package/dist/ai.d.ts.map +1 -0
  37. package/dist/ai.js +52 -0
  38. package/dist/ai.js.map +1 -0
  39. package/dist/index.d.ts +106 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +212 -0
  42. package/dist/index.js.map +1 -0
  43. package/docs/SUMMARY.md +3 -0
  44. package/docs/book.toml +49 -0
  45. package/docs/index.md +32 -0
  46. package/package.json +30 -0
  47. package/pre-commit +2 -0
  48. package/scripts/bump-version.ts +16 -0
  49. package/scripts/generate-rust.ts +9 -0
  50. package/src/ai.ts +61 -0
  51. package/src/index.ts +287 -0
  52. package/src/lib.rs +8 -0
  53. package/src/main.rs +11 -0
  54. package/tsconfig.json +25 -0
package/dist/ai.js ADDED
@@ -0,0 +1,52 @@
1
+ export const PROMPT = `
2
+ Perform a comprehensive code review with the following focus areas:
3
+ Provide detailed feedback using inline comments for ONLY issues, no praise inline comments.
4
+ Use top-level comments for general observations or praise
5
+ Do not be shy, I am a big boy and can handle criticism gracefully. I welcome feedback and suggestions.
6
+
7
+
8
+ ## Rust tooling
9
+
10
+ You should have access to cargo cli. You can use this to verify the build yourself, or use it to run tests (or a specific test)
11
+ If you encounter an error running cargo, please comment on this PR. If you desire more rust tools, such as rust-analyzer, or any cargo plugin to help review then please notify on pull request
12
+
13
+
14
+ ## Permissions
15
+
16
+ If you are denied access to a tool, shell command, or github API resource (via gh cli) then notify the pull request author that you would like access to that tool.
17
+ As an example, we use CodeCov to our test coverage, if you like to have access to historical data, we can provide you with the CodeCov CLI tool and access.
18
+ In general, if you need something, just ask.
19
+
20
+
21
+ Review this PR against our team checklist:
22
+
23
+ ## Code Quality
24
+ - [ ] Code follows our style guide
25
+ - [ ] No commented-out code
26
+ - [ ] Meaningful variable names
27
+ - [ ] DRY principle followed
28
+
29
+ ## Testing
30
+ - [ ] Unit tests for new functions
31
+ - [ ] Integration tests for new endpoints
32
+ - [ ] Edge cases covered
33
+ - [ ] Test coverage > 80%
34
+
35
+ ## Documentation
36
+ - [ ] README updated if needed
37
+ - [ ] API docs updated
38
+ - [ ] Inline comments for complex logic
39
+ - [ ] CHANGELOG.md updated
40
+
41
+ ## Security
42
+ - [ ] No hardcoded credentials
43
+ - [ ] Input validation implemented
44
+ - [ ] Proper error handling
45
+ - [ ] No sensitive data in logs
46
+
47
+ For each item, check if it is satisfied and comment on any that need attention.
48
+ Post a summary comment with checklist results.
49
+
50
+
51
+ `;
52
+ //# sourceMappingURL=ai.js.map
package/dist/ai.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai.js","sourceRoot":"","sources":["../src/ai.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDrB,CAAC"}
@@ -0,0 +1,106 @@
1
+ import { type AiJob } from './ai.js';
2
+ export declare enum Arch {
3
+ ARM64 = "vars.RUNNER_ARM64",
4
+ AMD64 = "vars.RUNNER_AMD64",
5
+ WIN = "vars.RUNNER_WIN",
6
+ MAC = "vars.RUNNER_MAC"
7
+ }
8
+ interface Global {
9
+ packages: {
10
+ Linux?: string;
11
+ macOS?: string;
12
+ Windows?: string;
13
+ };
14
+ }
15
+ interface BaseJob {
16
+ if: boolean | string;
17
+ continueOnError: boolean | string;
18
+ run?: string;
19
+ }
20
+ interface Matrix {
21
+ os: Arch[];
22
+ toolchains: string[];
23
+ features: string[];
24
+ }
25
+ interface Fmt extends BaseJob {
26
+ }
27
+ interface SemVer extends BaseJob {
28
+ }
29
+ interface Hack extends BaseJob {
30
+ }
31
+ interface CargoSort extends BaseJob {
32
+ }
33
+ interface DocCheck extends BaseJob {
34
+ }
35
+ interface Dependencies extends BaseJob {
36
+ }
37
+ interface Extra extends BaseJob {
38
+ name: string;
39
+ matrix: Matrix;
40
+ }
41
+ interface Sanitizers {
42
+ enabled: boolean;
43
+ address: BaseJob;
44
+ leak: BaseJob;
45
+ thread: BaseJob;
46
+ }
47
+ interface Clippy extends BaseJob {
48
+ flags: string;
49
+ matrix: Matrix;
50
+ }
51
+ interface Coverage extends BaseJob {
52
+ matrix: Matrix;
53
+ }
54
+ interface RustJobs {
55
+ clippy: Clippy;
56
+ coverage: Coverage;
57
+ cargoSort: CargoSort;
58
+ dependencies: Dependencies;
59
+ docCheck: DocCheck;
60
+ fmt: Fmt;
61
+ hack: Hack;
62
+ sanitizers: Sanitizers;
63
+ semver: SemVer;
64
+ extra: Extra;
65
+ }
66
+ interface Release {
67
+ bin: boolean;
68
+ publish: boolean;
69
+ debian: boolean;
70
+ profile: string;
71
+ os: Arch[];
72
+ }
73
+ export declare const JobDefaults: RustJobs;
74
+ export declare class RustWorkflow {
75
+ private jobs;
76
+ private global;
77
+ private release;
78
+ private ai;
79
+ constructor();
80
+ linuxPackages(packages: string[]): this;
81
+ semver(enable: boolean): this;
82
+ extra(name: string, run: string): this;
83
+ withRelease(r: Release): this;
84
+ clippy(opts?: Partial<Clippy>): this;
85
+ disableSanitizers(): this;
86
+ disableAi(): this;
87
+ additionalPrompt(prompt: string): this;
88
+ build(): {
89
+ ai: AiJob;
90
+ release: {
91
+ bin: boolean;
92
+ publish: boolean;
93
+ debian: boolean;
94
+ profile: string;
95
+ matrix: {
96
+ os: Arch[];
97
+ target: string[];
98
+ };
99
+ };
100
+ global: Global;
101
+ jobs: RustJobs;
102
+ };
103
+ }
104
+ export declare function createRustWorkflow(): RustWorkflow;
105
+ export {};
106
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAU,MAAM,SAAS,CAAC;AAE7C,oBAAY,IAAI;IACd,KAAK,sBAAsB;IAC3B,KAAK,sBAAsB;IAC3B,GAAG,oBAAoB;IACvB,GAAG,oBAAoB;CACxB;AACD,UAAU,MAAM;IAEd,QAAQ,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,UAAU,OAAO;IACf,EAAE,EAAE,OAAO,GAAG,MAAM,CAAC;IACrB,eA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B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,IAAI,EAAE,CAAC;CACZ;AAED,eAAO,MAAM,WAAW,EAAE,QAyFzB,CAAC;AAEF,qBAAa,YAAY;IACvB,OAAO,CAAC,IAAI,CAAW;IACvB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,EAAE,CAAQ;;IAoClB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE;IAKhC,MAAM,CAAC,MAAM,EAAE,OAAO;IAKtB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAO/B,WAAW,CAAC,CAAC,EAAE,OAAO;IAKtB,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC;IAa7B,iBAAiB;IAKjB,SAAS;IAKT,gBAAgB,CAAC,MAAM,EAAE,MAAM;IAK/B,KAAK;;;;;;;;;;;;;;;CA0BN;AAED,wBAAgB,kBAAkB,IAAI,YAAY,CAEjD"}
package/dist/index.js ADDED
@@ -0,0 +1,212 @@
1
+ import { PROMPT } from './ai.js';
2
+ export var Arch;
3
+ (function (Arch) {
4
+ Arch["ARM64"] = "vars.RUNNER_ARM64";
5
+ Arch["AMD64"] = "vars.RUNNER_AMD64";
6
+ Arch["WIN"] = "vars.RUNNER_WIN";
7
+ Arch["MAC"] = "vars.RUNNER_MAC";
8
+ })(Arch || (Arch = {}));
9
+ export const JobDefaults = {
10
+ fmt: {
11
+ if: true,
12
+ continueOnError: false,
13
+ run: 'cargo +nightly fmt --check --all',
14
+ },
15
+ semver: {
16
+ if: true,
17
+ continueOnError: false,
18
+ },
19
+ hack: {
20
+ if: true,
21
+ continueOnError: false,
22
+ run: 'cargo hack --feature-powerset check',
23
+ },
24
+ docCheck: {
25
+ if: true,
26
+ continueOnError: false,
27
+ run: 'cargo +nightly docs-rs',
28
+ },
29
+ cargoSort: {
30
+ if: true,
31
+ continueOnError: false,
32
+ run: 'if [ -f ./scripts/cargo-sort.sh ]; then\n ./scripts/cargo-sort.sh\nelse\n cargo sort -c -g\nfi\n',
33
+ },
34
+ dependencies: {
35
+ if: true,
36
+ continueOnError: false,
37
+ run: 'cargo machete --with-metadata',
38
+ },
39
+ sanitizers: {
40
+ enabled: true,
41
+ address: {
42
+ if: true,
43
+ continueOnError: false,
44
+ run: 'cargo test --lib --tests --no-fail-fast --target x86_64-unknown-linux-gnu -- --no-capture',
45
+ },
46
+ leak: {
47
+ if: true,
48
+ continueOnError: false,
49
+ run: 'cargo test --target x86_64-unknown-linux-gnu -- --no-capture',
50
+ },
51
+ thread: {
52
+ if: false,
53
+ continueOnError: false,
54
+ run: 'cargo test --target x86_64-unknown-linux-gnu -- --test-threads=1',
55
+ },
56
+ },
57
+ coverage: {
58
+ if: true,
59
+ continueOnError: false,
60
+ matrix: {
61
+ os: [Arch.ARM64],
62
+ toolchains: ['stable'],
63
+ features: ['default'],
64
+ },
65
+ run: `
66
+ cmd="cargo llvm-cov \${LLVM_ARGS} --locked --lcov --output-path lcov-\${FEATURES}.info --no-fail-fast"
67
+ if [ "$FEATURES" == "default" ]; then
68
+ $cmd -- --no-capture $CARGO_ARGS
69
+ else
70
+ $cmd --features "$FEATURES" -- --no-capture $CARGO_ARGS
71
+ fi
72
+ `,
73
+ },
74
+ clippy: {
75
+ if: true,
76
+ continueOnError: false,
77
+ run: '',
78
+ flags: '',
79
+ matrix: {
80
+ os: [Arch.ARM64],
81
+ toolchains: ['stable'],
82
+ features: ['default'],
83
+ },
84
+ },
85
+ extra: {
86
+ if: false,
87
+ continueOnError: false,
88
+ run: '',
89
+ name: 'extra',
90
+ matrix: {
91
+ os: [Arch.ARM64],
92
+ toolchains: ['stable'],
93
+ features: ['default'],
94
+ },
95
+ },
96
+ };
97
+ export class RustWorkflow {
98
+ jobs;
99
+ global;
100
+ release;
101
+ ai;
102
+ constructor() {
103
+ this.jobs = {
104
+ fmt: JobDefaults.fmt,
105
+ docCheck: JobDefaults.docCheck,
106
+ semver: JobDefaults.semver,
107
+ dependencies: JobDefaults.dependencies,
108
+ hack: JobDefaults.hack,
109
+ cargoSort: JobDefaults.cargoSort,
110
+ sanitizers: JobDefaults.sanitizers,
111
+ clippy: JobDefaults.clippy,
112
+ coverage: JobDefaults.coverage,
113
+ extra: JobDefaults.extra,
114
+ };
115
+ this.global = { packages: {} };
116
+ this.release = {
117
+ publish: true,
118
+ bin: false,
119
+ debian: false,
120
+ profile: 'release',
121
+ os: [Arch.AMD64],
122
+ };
123
+ this.ai = {
124
+ prompt: PROMPT,
125
+ additional: '',
126
+ enabled: true,
127
+ track_progress: true,
128
+ allowed_bots: '*',
129
+ claude_args: ' --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(find),Bash(diff),Bash(jq),Bash(git),Bash(cargo),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"',
130
+ use_sticky_comment: false,
131
+ };
132
+ }
133
+ linuxPackages(packages) {
134
+ this.global.packages.Linux = packages.join(',');
135
+ return this;
136
+ }
137
+ semver(enable) {
138
+ this.jobs.semver.if = enable;
139
+ return this;
140
+ }
141
+ extra(name, run) {
142
+ this.jobs.extra.if = true;
143
+ this.jobs.extra.name = name;
144
+ this.jobs.extra.run = run;
145
+ return this;
146
+ }
147
+ withRelease(r) {
148
+ this.release = r;
149
+ return this;
150
+ }
151
+ clippy(opts) {
152
+ if (opts?.flags)
153
+ this.jobs.clippy.flags = opts.flags;
154
+ if (opts?.run)
155
+ this.jobs.clippy.run = opts.run;
156
+ if (opts?.if !== undefined)
157
+ this.jobs.clippy.if = opts.if;
158
+ if (opts?.continueOnError !== undefined)
159
+ this.jobs.clippy.continueOnError = opts.continueOnError;
160
+ if (opts?.matrix) {
161
+ if (opts.matrix.toolchains)
162
+ this.jobs.clippy.matrix.toolchains = opts.matrix.toolchains;
163
+ if (opts.matrix.features)
164
+ this.jobs.clippy.matrix.features = opts.matrix.features;
165
+ if (opts.matrix.os)
166
+ this.jobs.clippy.matrix.os = opts.matrix.os;
167
+ }
168
+ return this;
169
+ }
170
+ disableSanitizers() {
171
+ this.jobs.sanitizers.enabled = false;
172
+ return this;
173
+ }
174
+ disableAi() {
175
+ this.ai.enabled = false;
176
+ return this;
177
+ }
178
+ additionalPrompt(prompt) {
179
+ this.ai.additional = prompt;
180
+ return this;
181
+ }
182
+ build() {
183
+ // os:
184
+ // - target: aarch64-unknown-linux-gnu
185
+ // os: ubicloud-standard-8-arm
186
+ // - target: x86_64-unknown-linux-gnu
187
+ // os: ubicloud-standard-4
188
+ // - target: aarch64-apple-darwin
189
+ // os: macos-latest
190
+ // # - target: x86_64-pc-windows-msvc
191
+ // # os: windows-latest
192
+ return {
193
+ ai: this.ai,
194
+ release: {
195
+ bin: this.release.bin,
196
+ publish: this.release.publish,
197
+ debian: this.release.debian,
198
+ profile: this.release.profile,
199
+ matrix: {
200
+ os: [Arch.AMD64],
201
+ target: ['x86_64-unknown-linux-gnu'],
202
+ },
203
+ },
204
+ global: this.global,
205
+ jobs: this.jobs,
206
+ };
207
+ }
208
+ }
209
+ export function createRustWorkflow() {
210
+ return new RustWorkflow();
211
+ }
212
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,CAAN,IAAY,IAKX;AALD,WAAY,IAAI;IACd,mCAA2B,CAAA;IAC3B,mCAA2B,CAAA;IAC3B,+BAAuB,CAAA;IACvB,+BAAuB,CAAA;AACzB,CAAC,EALW,IAAI,KAAJ,IAAI,QAKf;AAoED,MAAM,CAAC,MAAM,WAAW,GAAa;IACnC,GAAG,EAAE;QACH,EAAE,EAAE,IAAI;QACR,eAAe,EAAE,KAAK;QACtB,GAAG,EAAE,kCAAkC;KACjC;IACR,MAAM,EAAE;QACN,EAAE,EAAE,IAAI;Q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,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;oBAChB,MAAM,EAAE,CAAC,0BAA0B,CAAC;iBACrC;aACF;YACD,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IACJ,CAAC;CACF;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,IAAI,YAAY,EAAE,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ # Summary
2
+
3
+ - [Introduction](index.md)
package/docs/book.toml ADDED
@@ -0,0 +1,49 @@
1
+ [book]
2
+ title = "Kiro Agent Generator"
3
+ authors = ["Doug Chimento"]
4
+ language = "en"
5
+ src = "src"
6
+
7
+ [build]
8
+ build-dir = "book"
9
+ create-missing = false
10
+ use-default-preprocessors = true
11
+
12
+ [output.html]
13
+ default-theme = "Rust"
14
+ preferred-dark-theme = "Ayu"
15
+ smart-punctuation = true
16
+ mathjax-support = true
17
+ #copy-fonts = true
18
+ no-section-label = false
19
+ git-repository-url = "https://github.com/carteraMesh/kiro-generator"
20
+ edit-url-template = "https://github.com/carteraMesh/kiro-generator/edit/main/docs/{path}"
21
+
22
+ [output.html.print]
23
+ enable = true
24
+
25
+ [output.html.fold]
26
+ enable = true
27
+ level = 1
28
+
29
+ [output.html.search]
30
+ enable = true
31
+ limit-results = 30
32
+ teaser-word-count = 30
33
+ use-boolean-and = true
34
+ boost-title = 2
35
+ boost-hierarchy = 1
36
+ boost-paragraph = 1
37
+ expand = true
38
+ heading-split-level = 3
39
+ copy-js = true
40
+
41
+ [preprocessor]
42
+ # [preprocessor.embedify]
43
+ # scroll-to-top.enable = true
44
+ # footer.enable = true
45
+ # footer.message = "Copyright © 2025 • Created with SOL by [dougEfresh](https://github.com/dougeEfresh)"
46
+
47
+ # announcement-banner.enable = false
48
+ # announcement-banner.id = "3.0.11"
49
+ # announcement-banner.message = "*New version [3.0.11](https://github.com/carteraMesh/kiro-generator/releases/tag/3.0.11)*"
package/docs/index.md ADDED
@@ -0,0 +1,32 @@
1
+ ## About
2
+
3
+ `kiro-generator` (kg) is a CLI tool for managing and generating [Kiro](https://kiro.dev/docs/) agent files.
4
+
5
+ ## Why?
6
+
7
+ Because managing config files via `JSON` is the second worse format. Obviously `YAML` files takes 1st prize
8
+
9
+ ## Prerequisites
10
+
11
+ - [kiro-cli](https://kiro.dev/cli/)
12
+ - A distaste for `JSON` config files
13
+
14
+ ## Features
15
+
16
+ ### Config Hierarchy
17
+
18
+ KG provides a hierarchical configuration system that allows you to define and override settings at different levels. The
19
+ schemas is mostly the same as `kiro-cli` JSON's format but defined as TOML, with a few added fields explained in
20
+ [usage](./usage.md)
21
+
22
+ ### Agent Declaration
23
+
24
+ By default Agents can be declared globally `~/.kiro/generators/kg.toml` or locally `.kiro/generators/kg.toml`. If both
25
+ are present, the local configuration takes precedence, however both configurations are merged together. You can use
26
+ `--local` argument to ignore global configuration.
27
+
28
+ ### Force Permissions
29
+
30
+ You can override toolsettings permissions. For example, you can have your `default` agent deny executing `git push`, but
31
+ override this for special use cases, see [inheritance](config/inheritance.md) and [usage](./usage.md) for more
32
+ information.
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@dougefresh/ci",
3
+ "description": "CI Mega Config github action",
4
+ "version": "0.1.11",
5
+ "author": "",
6
+ "type": "module",
7
+ "homepage": "https://github.com/dougefresh/ci",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/dougefresh/ci.git"
11
+ },
12
+ "keywords": ["actions"],
13
+ "exports": {
14
+ ".": "./dist/index.js"
15
+ },
16
+ "types": "./dist/index.d.ts",
17
+ "engines": {
18
+ "node": ">=24.0.0"
19
+ },
20
+ "scripts": {
21
+ "build": "tsc",
22
+ "prepublishOnly": "bun run build"
23
+ },
24
+ "license": "MIT",
25
+ "dependencies": {},
26
+ "devDependencies": {
27
+ "@types/bun": "^1.3.6",
28
+ "@types/node": "^24.10.1"
29
+ }
30
+ }
package/pre-commit ADDED
@@ -0,0 +1,2 @@
1
+ #!/bin/bash
2
+ echo
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env bun
2
+ import { readFileSync, writeFileSync } from 'fs';
3
+
4
+ const type = process.argv[2] || 'patch';
5
+ const pkg = JSON.parse(readFileSync('package.json', 'utf-8'));
6
+ const [major, minor, patch] = pkg.version.split('.').map(Number);
7
+
8
+ pkg.version =
9
+ type === 'major'
10
+ ? `${major + 1}.0.0`
11
+ : type === 'minor'
12
+ ? `${major}.${minor + 1}.0`
13
+ : `${major}.${minor}.${patch + 1}`;
14
+
15
+ writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
16
+ console.log(`Bumped to ${pkg.version}`);
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env bun
2
+ import { resolve } from 'path';
3
+ import { pathToFileURL } from 'url';
4
+
5
+ const configPath = resolve(process.cwd(), '.github/rust-ci.ts');
6
+ const userConfig = await import(pathToFileURL(configPath).href);
7
+ const config = userConfig.default();
8
+
9
+ console.log(JSON.stringify(config, null, 2));
package/src/ai.ts ADDED
@@ -0,0 +1,61 @@
1
+ export interface AiJob {
2
+ enabled: boolean;
3
+ allowed_bots: string;
4
+ claude_args: string;
5
+ use_sticky_comment: boolean;
6
+ track_progress: boolean;
7
+ prompt: string;
8
+ additional: string;
9
+ }
10
+
11
+ export const PROMPT = `
12
+ Perform a comprehensive code review with the following focus areas:
13
+ Provide detailed feedback using inline comments for ONLY issues, no praise inline comments.
14
+ Use top-level comments for general observations or praise
15
+ Do not be shy, I am a big boy and can handle criticism gracefully. I welcome feedback and suggestions.
16
+
17
+
18
+ ## Rust tooling
19
+
20
+ You should have access to cargo cli. You can use this to verify the build yourself, or use it to run tests (or a specific test)
21
+ If you encounter an error running cargo, please comment on this PR. If you desire more rust tools, such as rust-analyzer, or any cargo plugin to help review then please notify on pull request
22
+
23
+
24
+ ## Permissions
25
+
26
+ If you are denied access to a tool, shell command, or github API resource (via gh cli) then notify the pull request author that you would like access to that tool.
27
+ As an example, we use CodeCov to our test coverage, if you like to have access to historical data, we can provide you with the CodeCov CLI tool and access.
28
+ In general, if you need something, just ask.
29
+
30
+
31
+ Review this PR against our team checklist:
32
+
33
+ ## Code Quality
34
+ - [ ] Code follows our style guide
35
+ - [ ] No commented-out code
36
+ - [ ] Meaningful variable names
37
+ - [ ] DRY principle followed
38
+
39
+ ## Testing
40
+ - [ ] Unit tests for new functions
41
+ - [ ] Integration tests for new endpoints
42
+ - [ ] Edge cases covered
43
+ - [ ] Test coverage > 80%
44
+
45
+ ## Documentation
46
+ - [ ] README updated if needed
47
+ - [ ] API docs updated
48
+ - [ ] Inline comments for complex logic
49
+ - [ ] CHANGELOG.md updated
50
+
51
+ ## Security
52
+ - [ ] No hardcoded credentials
53
+ - [ ] Input validation implemented
54
+ - [ ] Proper error handling
55
+ - [ ] No sensitive data in logs
56
+
57
+ For each item, check if it is satisfied and comment on any that need attention.
58
+ Post a summary comment with checklist results.
59
+
60
+
61
+ `;