Skip to content

Commit 51fcd6d

Browse files
chore: willboosterify this repo
1 parent 3182a5a commit 51fcd6d

File tree

6 files changed

+437
-392
lines changed

6 files changed

+437
-392
lines changed

.cursor/rules/general.mdc

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,36 @@ alwaysApply: true
88

99
- Name: @exercode/problem-utils
1010
- Description: :100: A set of utilities for judging programs on Exercode (https://exercode.willbooster.com/).
11-
- Package Manager: yarn
11+
- Package Manager: yarn on zsh
1212

13-
## General Instructions
13+
## Development Workflow
1414

15-
- Do not write tests unless explicitly requested.
16-
- When fixing tests, gather debug information through logging and screenshots before modifying the code.
17-
- After making code changes, run `yarn check-all-for-ai` to execute all tests (note: this may take up to 30 minutes), or run `yarn check-for-ai` for type checking and linting only.
18-
- If you are confident your changes will not break any tests, you may use `check-for-ai`.
19-
- Once you have verified your changes, commit them to the non-main branch using the `--no-verify` option and push to the current branch.
20-
- Follow conventional commits, i.e., your commit message should start with `feat:`, `fix:`, etc.
21-
- Make sure to add a new line at the end of your commit message with: `Co-authored-by: WillBooster (Cursor) <agent@willbooster.com>`.
22-
- Always create new commits. Avoid using `--amend`.
15+
When changing code, complete these steps before responding to the user.
16+
17+
1. If the current branch is `main`, create a new branch.
18+
- Include unexpected changes since they are mine.
19+
2. Make code changes as needed.
20+
3. If possible, write e2e tests for your changes.
21+
4. Fix your changes until `yarn check-all-for-ai` (running all tests, taking 30 mins) or `yarn check-for-ai` (only type checking and linting) passes.
22+
- If you are confident your changes will not break any tests, you may use `check-for-ai`.
23+
5. Commit your changes to the current branch and push.
24+
- Follow conventional commits, i.e., your commit message should start with `feat:`, `fix:`, `test:`, etc.
25+
- Make sure to add a new line at the end of your commit message with: `Co-authored-by: WillBooster (Cursor) <agent@willbooster.com>`.
26+
- When pre-commit hooks prevent your changes, fix your code, then re-commit and re-push.
27+
6. Create a pull request using `gh`.
28+
- The pull request title should match your commit message.
29+
7. Repeat the following steps until the test workflow passes:
30+
1. Monitor the CI results using the following command until the test workflow completes (timeout should be 30 mins).
31+
- `while :; do gh run list -b "$(git branch --show-current)" --json status,conclusion | jq -e '.[] | select(.conclusion=="failure")' && exit 1; gh run list -b "$(git branch --show-current)" --json status | jq -e '.[] | select(.status=="completed" | not)' || exit 0; sleep 1m; done`
32+
2. If tests fail, identify the root causes by gathering debug information through logging and screenshots, then fix the code and/or tests.
33+
3. Fetch unresolved review comments from the pull request using the following command. Address them and then mark them as resolved.
34+
- `gh api graphql -f query="{ repository(owner: \"WillBooster\", name: \"exercode-problem-utils\") { pullRequest(number: $(gh pr view --json number -q .number)) { reviewThreads(first: 100) { nodes { isResolved comments(first: 100) { nodes { body author { login } path line } } } } } } }" | jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved | not)'`
35+
4. Commit your changes and push.
36+
5. Write `/gemini review` in the pull request.
2337

2438
## Coding Style
2539

2640
- Write comments that explain "why" rather than "what". Avoid explanations that can be understood from the code itself.
2741
- Use stderr for logging debug messages temporarily since stdout output is sometimes omitted.
2842
- When adding new functions or classes, define them below any functions or classes that call them to maintain clear call order.
2943
- Prefer `undefined` over `null` unless explicitly dealing with APIs or libraries that require `null`.
30-
- Always perform existence checks on array due to `noUncheckedIndexedAccess: true`.

AGENTS.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,36 @@
22

33
- Name: @exercode/problem-utils
44
- Description: :100: A set of utilities for judging programs on Exercode (https://exercode.willbooster.com/).
5-
- Package Manager: yarn
5+
- Package Manager: yarn on zsh
66

7-
## General Instructions
7+
## Development Workflow
88

9-
- Do not write tests unless explicitly requested.
10-
- When fixing tests, gather debug information through logging and screenshots before modifying the code.
11-
- After making code changes, run `yarn check-all-for-ai` to execute all tests (note: this may take up to 30 minutes), or run `yarn check-for-ai` for type checking and linting only.
12-
- If you are confident your changes will not break any tests, you may use `check-for-ai`.
13-
- Once you have verified your changes, commit them to the non-main branch using the `--no-verify` option and push to the current branch.
14-
- Follow conventional commits, i.e., your commit message should start with `feat:`, `fix:`, etc.
15-
- Make sure to add a new line at the end of your commit message with: `Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>`.
16-
- Always create new commits. Avoid using `--amend`.
9+
When changing code, complete these steps before responding to the user.
10+
11+
1. If the current branch is `main`, create a new branch.
12+
- Include unexpected changes since they are mine.
13+
2. Make code changes as needed.
14+
3. If possible, write e2e tests for your changes.
15+
4. Fix your changes until `yarn check-all-for-ai` (running all tests, taking 30 mins) or `yarn check-for-ai` (only type checking and linting) passes.
16+
- If you are confident your changes will not break any tests, you may use `check-for-ai`.
17+
5. Commit your changes to the current branch and push.
18+
- Follow conventional commits, i.e., your commit message should start with `feat:`, `fix:`, `test:`, etc.
19+
- Make sure to add a new line at the end of your commit message with: `Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>`.
20+
- When pre-commit hooks prevent your changes, fix your code, then re-commit and re-push.
21+
6. Create a pull request using `gh`.
22+
- The pull request title should match your commit message.
23+
7. Repeat the following steps until the test workflow passes:
24+
1. Monitor the CI results using the following command until the test workflow completes (timeout should be 30 mins).
25+
- `while :; do gh run list -b "$(git branch --show-current)" --json status,conclusion | jq -e '.[] | select(.conclusion=="failure")' && exit 1; gh run list -b "$(git branch --show-current)" --json status | jq -e '.[] | select(.status=="completed" | not)' || exit 0; sleep 1m; done`
26+
2. If tests fail, identify the root causes by gathering debug information through logging and screenshots, then fix the code and/or tests.
27+
3. Fetch unresolved review comments from the pull request using the following command. Address them and then mark them as resolved.
28+
- `gh api graphql -f query="{ repository(owner: \"WillBooster\", name: \"exercode-problem-utils\") { pullRequest(number: $(gh pr view --json number -q .number)) { reviewThreads(first: 100) { nodes { isResolved comments(first: 100) { nodes { body author { login } path line } } } } } } }" | jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved | not)'`
29+
4. Commit your changes and push.
30+
5. Write `/gemini review` in the pull request.
1731

1832
## Coding Style
1933

2034
- Write comments that explain "why" rather than "what". Avoid explanations that can be understood from the code itself.
2135
- Use stderr for logging debug messages temporarily since stdout output is sometimes omitted.
2236
- When adding new functions or classes, define them below any functions or classes that call them to maintain clear call order.
2337
- Prefer `undefined` over `null` unless explicitly dealing with APIs or libraries that require `null`.
24-
- Always perform existence checks on array due to `noUncheckedIndexedAccess: true`.

CLAUDE.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,36 @@
22

33
- Name: @exercode/problem-utils
44
- Description: :100: A set of utilities for judging programs on Exercode (https://exercode.willbooster.com/).
5-
- Package Manager: yarn
5+
- Package Manager: yarn on zsh
66

7-
## General Instructions
7+
## Development Workflow
88

9-
- Do not write tests unless explicitly requested.
10-
- When fixing tests, gather debug information through logging and screenshots before modifying the code.
11-
- After making code changes, run `yarn check-all-for-ai` to execute all tests (note: this may take up to 30 minutes), or run `yarn check-for-ai` for type checking and linting only.
12-
- If you are confident your changes will not break any tests, you may use `check-for-ai`.
13-
- Once you have verified your changes, commit them to the non-main branch using the `--no-verify` option and push to the current branch.
14-
- Follow conventional commits, i.e., your commit message should start with `feat:`, `fix:`, etc.
15-
- Make sure to add a new line at the end of your commit message with: `Co-authored-by: WillBooster (Claude Code) <agent@willbooster.com>`.
16-
- Always create new commits. Avoid using `--amend`.
9+
When changing code, complete these steps before responding to the user.
10+
11+
1. If the current branch is `main`, create a new branch.
12+
- Include unexpected changes since they are mine.
13+
2. Make code changes as needed.
14+
3. If possible, write e2e tests for your changes.
15+
4. Fix your changes until `yarn check-all-for-ai` (running all tests, taking 30 mins) or `yarn check-for-ai` (only type checking and linting) passes.
16+
- If you are confident your changes will not break any tests, you may use `check-for-ai`.
17+
5. Commit your changes to the current branch and push.
18+
- Follow conventional commits, i.e., your commit message should start with `feat:`, `fix:`, `test:`, etc.
19+
- Make sure to add a new line at the end of your commit message with: `Co-authored-by: WillBooster (Claude Code) <agent@willbooster.com>`.
20+
- When pre-commit hooks prevent your changes, fix your code, then re-commit and re-push.
21+
6. Create a pull request using `gh`.
22+
- The pull request title should match your commit message.
23+
7. Repeat the following steps until the test workflow passes:
24+
1. Monitor the CI results using the following command until the test workflow completes (timeout should be 30 mins).
25+
- `while :; do gh run list -b "$(git branch --show-current)" --json status,conclusion | jq -e '.[] | select(.conclusion=="failure")' && exit 1; gh run list -b "$(git branch --show-current)" --json status | jq -e '.[] | select(.status=="completed" | not)' || exit 0; sleep 1m; done`
26+
2. If tests fail, identify the root causes by gathering debug information through logging and screenshots, then fix the code and/or tests.
27+
3. Fetch unresolved review comments from the pull request using the following command. Address them and then mark them as resolved.
28+
- `gh api graphql -f query="{ repository(owner: \"WillBooster\", name: \"exercode-problem-utils\") { pullRequest(number: $(gh pr view --json number -q .number)) { reviewThreads(first: 100) { nodes { isResolved comments(first: 100) { nodes { body author { login } path line } } } } } } }" | jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved | not)'`
29+
4. Commit your changes and push.
30+
5. Write `/gemini review` in the pull request.
1731

1832
## Coding Style
1933

2034
- Write comments that explain "why" rather than "what". Avoid explanations that can be understood from the code itself.
2135
- Use stderr for logging debug messages temporarily since stdout output is sometimes omitted.
2236
- When adding new functions or classes, define them below any functions or classes that call them to maintain clear call order.
2337
- Prefer `undefined` over `null` unless explicitly dealing with APIs or libraries that require `null`.
24-
- Always perform existence checks on array due to `noUncheckedIndexedAccess: true`.

GEMINI.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,36 @@
22

33
- Name: @exercode/problem-utils
44
- Description: :100: A set of utilities for judging programs on Exercode (https://exercode.willbooster.com/).
5-
- Package Manager: yarn
5+
- Package Manager: yarn on zsh
66

7-
## General Instructions
7+
## Development Workflow
88

9-
- Do not write tests unless explicitly requested.
10-
- When fixing tests, gather debug information through logging and screenshots before modifying the code.
11-
- After making code changes, run `yarn check-all-for-ai` to execute all tests (note: this may take up to 30 minutes), or run `yarn check-for-ai` for type checking and linting only.
12-
- If you are confident your changes will not break any tests, you may use `check-for-ai`.
13-
- Once you have verified your changes, commit them to the non-main branch using the `--no-verify` option and push to the current branch.
14-
- Follow conventional commits, i.e., your commit message should start with `feat:`, `fix:`, etc.
15-
- Make sure to add a new line at the end of your commit message with: `Co-authored-by: WillBooster (Gemini CLI) <agent@willbooster.com>`.
16-
- Always create new commits. Avoid using `--amend`.
9+
When changing code, complete these steps before responding to the user.
10+
11+
1. If the current branch is `main`, create a new branch.
12+
- Include unexpected changes since they are mine.
13+
2. Make code changes as needed.
14+
3. If possible, write e2e tests for your changes.
15+
4. Fix your changes until `yarn check-all-for-ai` (running all tests, taking 30 mins) or `yarn check-for-ai` (only type checking and linting) passes.
16+
- If you are confident your changes will not break any tests, you may use `check-for-ai`.
17+
5. Commit your changes to the current branch and push.
18+
- Follow conventional commits, i.e., your commit message should start with `feat:`, `fix:`, `test:`, etc.
19+
- Make sure to add a new line at the end of your commit message with: `Co-authored-by: WillBooster (Gemini CLI) <agent@willbooster.com>`.
20+
- When pre-commit hooks prevent your changes, fix your code, then re-commit and re-push.
21+
6. Create a pull request using `gh`.
22+
- The pull request title should match your commit message.
23+
7. Repeat the following steps until the test workflow passes:
24+
1. Monitor the CI results using the following command until the test workflow completes (timeout should be 30 mins).
25+
- `while :; do gh run list -b "$(git branch --show-current)" --json status,conclusion | jq -e '.[] | select(.conclusion=="failure")' && exit 1; gh run list -b "$(git branch --show-current)" --json status | jq -e '.[] | select(.status=="completed" | not)' || exit 0; sleep 1m; done`
26+
2. If tests fail, identify the root causes by gathering debug information through logging and screenshots, then fix the code and/or tests.
27+
3. Fetch unresolved review comments from the pull request using the following command. Address them and then mark them as resolved.
28+
- `gh api graphql -f query="{ repository(owner: \"WillBooster\", name: \"exercode-problem-utils\") { pullRequest(number: $(gh pr view --json number -q .number)) { reviewThreads(first: 100) { nodes { isResolved comments(first: 100) { nodes { body author { login } path line } } } } } } }" | jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved | not)'`
29+
4. Commit your changes and push.
30+
5. Write `/gemini review` in the pull request.
1731

1832
## Coding Style
1933

2034
- Write comments that explain "why" rather than "what". Avoid explanations that can be understood from the code itself.
2135
- Use stderr for logging debug messages temporarily since stdout output is sometimes omitted.
2236
- When adding new functions or classes, define them below any functions or classes that call them to maintain clear call order.
2337
- Prefer `undefined` over `null` unless explicitly dealing with APIs or libraries that require `null`.
24-
- Always perform existence checks on array due to `noUncheckedIndexedAccess: true`.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"scripts": {
3333
"build": "build-ts lib --input src/index.ts src/presets/*.ts",
3434
"check-all-for-ai": "yarn check-for-ai && yarn test",
35-
"check-for-ai": "yarn install > /dev/null && yarn format > /dev/null 2> /dev/null || true && yarn lint-fix --quiet && yarn typecheck",
35+
"check-for-ai": "yarn install > /dev/null && yarn format > /dev/null 2> /dev/null || true && yarn typecheck && yarn lint-fix --quiet",
3636
"cleanup": "yarn format && yarn lint-fix",
3737
"format": "sort-package-json && yarn prettify",
3838
"postinstall": "husky || true",
@@ -63,7 +63,7 @@
6363
"build-ts": "17.0.11",
6464
"conventional-changelog-conventionalcommits": "9.1.0",
6565
"dotenv-cli": "11.0.0",
66-
"eslint": "9.39.1",
66+
"eslint": "9.39.2",
6767
"eslint-config-flat-gitignore": "2.1.0",
6868
"eslint-config-prettier": "10.1.8",
6969
"eslint-import-resolver-typescript": "4.4.4",
@@ -82,7 +82,7 @@
8282
"semantic-release": "25.0.2",
8383
"sort-package-json": "3.6.0",
8484
"typescript": "5.9.3",
85-
"typescript-eslint": "8.50.0",
85+
"typescript-eslint": "8.50.1",
8686
"vitest": "4.0.16"
8787
},
8888
"packageManager": "yarn@4.12.0",

0 commit comments

Comments
 (0)