Skip to content

Commit f58672c

Browse files
committed
Remove locale-compare; misc cleanup and dependency bumps
- Replace locale-compare with native Intl.Collator in sort_object.ts and build_json.ts - Switch bun:path and bun:util imports to node:path and node:util - Bump @types/bun, eslint, globals, typescript-eslint - Add JSDoc to simplify() and sortObject() - Tighten sortObject return type, type the sorted object - Streamline reflect and suggest prompt files
1 parent 8c7f940 commit f58672c

13 files changed

Lines changed: 121 additions & 189 deletions

.github/prompts/commit.prompt.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
description: Stage and commit all changes in this repo
2+
description: Stage, commit, and push all changes in this repo
3+
argument-hint: commit detail to include, for example: `(closes ​#123)`
34
---
45

56
You are performing a git commit for this repo. Do the following steps in order:
@@ -16,4 +17,9 @@ You are performing a git commit for this repo. Do the following steps in order:
1617
git commit -F /tmp/commitmsg.txt
1718
rm /tmp/commitmsg.txt
1819
```
20+
- If a commit detail argument was provided (e.g. `closes #123`), include it on its own line after the first line (subject), separated by a blank line:
21+
```
22+
printf '%s\n' 'First line' '' 'closes #123' > /tmp/commitmsg.txt
23+
```
1924
5. Run `git push` to push commits up to the origin
25+

.github/prompts/reflect.prompt.md

Lines changed: 12 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,20 @@
11
---
22
description: Reflect on recent work and bring all project documentation up to date
3+
argument-hint: additional optional context
34
---
45

5-
You are doing a documentation update pass. Recent code changes may have left docs, guides, and inline comments out of date. Your job is to find and fix those gaps — not to write new documentation for its own sake.
6+
Update all project documentation to match the current state of the code. Fix gaps, stale content, spelling mistakes, and anything unclear. Make all edits — do not just list findings. Do not commit; the user will review first.
67

7-
**Do not commit.** Make all edits and stop. The user will review before committing.
8+
## Steps
89

9-
## How to approach this
10+
1. Read `AGENTS.md` to understand the project structure.
11+
2. Review the current chat session history — primary source of context for what changed.
12+
3. Run `git log --oneline -20` to confirm what was actually landed.
13+
4. Search the codebase as needed to verify current state.
1014

11-
First, get oriented:
12-
1. Review the current chat session history — this is your primary source of context for what was discussed, decided, and changed
13-
2. Run `git log --oneline -20` to see recent commits and confirm what was actually landed
14-
3. Use `#codebase` to survey the current state of the project
15+
## What to update
1516

16-
Then work through each documentation layer below.
17-
18-
---
19-
20-
## Documentation layers to check
21-
22-
### SCRATCHPAD.md (if present)
23-
A working-memory file for agents (gitignored). Update it with:
24-
- Any new quirks, gotchas, or lessons learned from recent work
25-
- Any known issues or follow-up tasks worth remembering
26-
- Remove anything that is now resolved or stale
27-
28-
### AGENTS.md (if present)
29-
Agent context file. Check that:
30-
- The described project structure still matches reality
31-
- Any tool, script, or workflow guidance is still accurate
32-
- Nothing important from recent work is missing
33-
34-
### README.md
35-
The public face of the project. Check that:
36-
- The feature list / description still reflects what the project does
37-
- Setup and usage instructions still work as written
38-
- Any referenced scripts, commands, or file paths still exist and are correct
39-
- Version numbers or compatibility notes aren't stale
40-
41-
### CONTRIBUTING.md (if present)
42-
Check that:
43-
- Development setup instructions are still accurate
44-
- Any described workflow (build steps, naming conventions, PR process) reflects current practice
45-
46-
### Other markdown files (CHANGELOG.md, RELEASE.md, etc.)
47-
- CHANGELOG: verify the most recent entry matches the current `package.json` version (or equivalent). Flag if they're out of sync — but do not generate a new changelog entry here; that's for `/release`.
48-
- RELEASE.md or similar: check that documented release steps match current tooling
49-
50-
### Prompt files (`.github/prompts/*.prompt.md`, `.instructions.md`, etc.)
51-
Check that:
52-
- Referenced file paths, script names, and commands still exist
53-
- Any example version numbers or outputs are not misleading
54-
- Steps are still in the right order
55-
56-
### Inline code documentation
57-
Look for comments in source files that reference something that has since changed:
58-
- Outdated file paths or module names
59-
- Comments describing behavior that has been refactored
60-
- TODO/FIXME comments that have been resolved by recent work (remove or update them)
61-
62-
---
63-
64-
## How to respond
65-
66-
For each layer, report one of:
67-
-**Up to date** — nothing to do
68-
- 🟡 **Updated** — briefly describe what you changed
69-
- 💡 **Flag for user** — something needs a human decision (e.g. a CHANGELOG version mismatch, a structural README question)
70-
71-
Keep it brief. One line per finding is enough.
72-
Make all edits directly — don't ask for permission on small fixes.
17+
- Inline documentation (JSDoc, comments)
18+
- Markdown files (`README`, design docs, contributing guides)
19+
- Agent instructions (`AGENTS.md`, `copilot-instructions`, etc.)
20+
- Working memory (`.scratchpad/*`)

.github/prompts/suggest.prompt.md

Lines changed: 25 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,43 @@
11
---
2-
description: Review the codebase and suggest (then implement) concrete improvements
2+
description: Review the codebase and suggest improvements
3+
argument-hint: additional optional context
34
---
45

5-
You are doing an improvement review of this codebase. The goal is to find **concrete, actionable improvements** — not a wishlist. Think like an experienced senior engineer or architect who respects the existing style and doesn't over-engineer.
6+
Find concrete improvements and flag things worth tracking for future work. Respect the existing style; don't over-engineer. Report findings only — do not make edits. The user will choose which suggestions to implement.
67

7-
## What to read first
8+
## Steps
89

9-
Get a broad picture of the project before forming any opinions. Use `#codebase` to survey the whole workspace — pay particular attention to:
10-
- Package/dependency manifests (`package.json`, `Cargo.toml`, `pyproject.toml`, etc.)
11-
- Compiler/type-checker config (`tsconfig.json`, `mypy.ini`, etc.)
12-
- Runtime/bundler config (`bunfig.toml`, `vite.config.*`, etc.)
13-
- Build and tooling scripts
14-
- The README — how the project presents itself and what it's for
15-
16-
---
10+
1. Read `AGENTS.md` to understand the project structure.
11+
2. Survey the codebase, paying particular attention to:
12+
- Package/dependency manifests (`package.json`, etc.)
13+
- Compiler/type-checker config (`tsconfig.json`, etc.)
14+
- Runtime/bundler config (`bunfig.toml`, etc.)
15+
- Build and tooling scripts
16+
- `README` — how the project presents itself
1717

1818
## Categories to evaluate
1919

20-
For each category below, look for real issues and note them. Skip categories where things look fine — don't invent problems.
21-
22-
**Correctness / bugs**
23-
- Are there any scripts or config values that are plainly wrong? (e.g. calling `npm run` in a Bun-only project)
24-
- Any TypeScript errors or implicit `any` types?
25-
- Any typos in user-facing strings (error messages, log output)?
20+
Skip categories where things look fine. Don't invent problems.
2621

27-
**TypeScript quality**
28-
- Are types as precise as they should be? (e.g. `String[]` vs `string[]`, missing type annotations on parameters)
29-
- Are there untyped third-party modules that need a `.d.ts` declaration?
30-
- Are there `tsconfig.json` options enabled that don't apply to this project?
22+
**Correctness / Bugs** — wrong config values, broken scripts, typos in user-facing output
3123

32-
**Runtime / tooling overlap**
33-
- Does the project use Node.js APIs where a Bun-native equivalent exists and is simpler? (e.g. `node:fs` vs `Bun.file()`)
34-
- Are there npm/yarn artifacts in the scripts that should use `bun`?
35-
- Are there dependencies that Bun now handles natively (e.g. a test runner, a bundler)?
24+
**Code Quality** — outdated practices, duplicated logic, unnecessary indirection, misleading comments, obvious simplifications
3625

37-
**Dev experience**
38-
- Is there a fast linter+formatter that would be easy to add? (Biome is a good fit for Bun projects — one tool, zero config, very fast)
39-
- Are there missing or misleading `package.json` scripts?
40-
- Is the `.gitignore` / `.gitattributes` complete and correct?
26+
**Performance** — unnecessary looping, extra copies, redundant calls, known slow browser APIs
4127

42-
**Code clarity**
43-
- Are there comments that are outdated or misleading?
44-
- Are there any obvious simplifications (not refactors — just noise removal)?
28+
**TypeScript** — imprecise types, overuse of `any`/`unknown`, untyped third-party modules, irrelevant `tsconfig.json` options
4529

46-
---
30+
**Testing** — coverage gaps, tests that don't actually verify what they claim
4731

48-
## How to respond
32+
**Runtime / tooling**`node:*` APIs where Bun-native equivalents exist, `npm`/`yarn` artifacts in scripts, dependencies Bun now handles natively
4933

50-
1. **Group findings by category.** Within each category, distinguish between:
51-
- 🔴 Real issues (bugs, broken things) — implement the fix immediately
52-
- 🟡 Improvements (best practices, clarity) — implement unless non-trivial
53-
- 💡 Suggestions (optional tools, bigger changes) — describe but don't implement; let the user decide
34+
**Developer Experience** — missing or misleading `package.json` scripts, incomplete `.gitignore`/`.gitattributes`, missing docs or source comments
5435

55-
2. **Be direct and brief.** One sentence per finding is usually enough. Don't pad.
36+
**Architecture / Technical Debt** — signs that complexity is accumulating: growing god-objects, framework or library choices that are becoming a liability, inconsistent patterns across similar code, coupling that makes changes harder than they should be, conventions the project has outgrown
5637

57-
3. **Implement the 🔴 and 🟡 items** using file edits. Verify there are no new TypeScript errors afterward.
38+
## How to respond
5839

59-
4. **Do not over-engineer.** A bug fix doesn't need surrounding code cleaned up. A simple improvement doesn't need extra configurability. Only change what needs changing.
40+
Group findings by category. Number each suggestion sequentially across all categories (1, 2, 3…) so the user can refer to them by number. For each finding:
41+
- 🔥 Actionable issue (bug, broken) — should be fixed soon
42+
- 👉 Improvement (best practice, clarity) — worth doing
43+
- 💡 Suggestion (optional, bigger change) — idea to track for future work

0 commit comments

Comments
 (0)