Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
72a05cc
Update TypeScript peer dependency to version 5.9.3 and modify tsconfi…
da1z Feb 26, 2026
dd5ebef
Add VSCode settings for code formatting and editor configurations
da1z Feb 27, 2026
8ce7091
Update Oxlint configuration, remove outdated files, and enhance CLI s…
da1z Mar 2, 2026
019f04a
Update handleResolve test to support asynchronous execution
da1z Mar 2, 2026
283364e
Add agent and cursor modules with structured output support
da1z Mar 2, 2026
c1f910c
Add @da1z/prompt dependency and enhance comment resolution logic
da1z Mar 2, 2026
c441604
Refactor comment resolution and enhance templates for clarity
da1z Mar 2, 2026
cdda792
Add file system module with readFile functionality
da1z Mar 7, 2026
65bade6
Update readFile method in FileSystem type to support synchronous and …
da1z Mar 7, 2026
9c06b4d
Add skills loading functionality with tests
da1z Mar 7, 2026
2839355
Update dependencies in package.json and bun.lock; add new configurati…
da1z Mar 12, 2026
e97789c
effectify config
da1z Mar 14, 2026
95557b8
Update Oxlint configuration to disable relative parent imports and en…
da1z Mar 14, 2026
9f6a1ff
Refactor handleInit to accept context and update config retrieval
da1z Mar 14, 2026
1024b32
Refactor agent functions to return Promises for asynchronous handling
da1z Mar 15, 2026
4fed8af
Add principles section to AGENTS.md for codebase guidance
da1z Mar 15, 2026
2e22c6b
Add CLI entry point and enhance main function for command handling
da1z Mar 15, 2026
270b116
Add parseGitRef function and corresponding tests
da1z Mar 15, 2026
160b2bd
Add glob utility functions for pattern matching
da1z Mar 15, 2026
cda5ac3
Update readFile method in FileSystem type to return a Promise<string>…
da1z Mar 15, 2026
26d560b
Refactor CLI structure by moving entry point to a new directory
da1z Mar 15, 2026
062c176
Refactor config schema and enhance configuration handling
da1z Mar 15, 2026
13c3633
Add Context type definition for improved dependency management
da1z Mar 15, 2026
4910242
Refactor handleInit function to use a more specific Context type
da1z Mar 15, 2026
b8d84a8
Add reporter functionality and integrate with review process
da1z Mar 15, 2026
5c6263f
Add review target type classification and corresponding tests
da1z Mar 16, 2026
6532598
Add createGitDiffFromFiles function and corresponding tests
da1z Mar 16, 2026
12939d6
Enhance Git and Reporter functionality for review process
da1z Mar 17, 2026
166a92d
Remove main, resolve, and associated test files to streamline the cod…
da1z Mar 17, 2026
2dff56f
Refactor review process and enhance reporter functionality
da1z Mar 21, 2026
44f90cf
Enhance console reporter to include summary of findings by severity
da1z Mar 21, 2026
9cd7cb8
Update agent configuration in handleReview to include model parameter
da1z Mar 21, 2026
97421d3
Update bishop.json to refine bot configuration and introduce review s…
da1z Mar 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 0 additions & 123 deletions .cursor/rules/ultracite.mdc

This file was deleted.

7 changes: 5 additions & 2 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
"eslint/max-statements": [
"error",
{
"max": 20
"max": 30
}
],
"eslint/func-style": ["error", "expression"]
"eslint/func-style": ["error", "expression"],
"typescript/consistent-type-definitions": ["error", "type"],
"import/no-relative-parent-imports": "off",
"eslint/func-names": [{ "generators": "never" }]
},
"overrides": [
{
Expand Down
58 changes: 58 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"emmet.showExpandedAbbreviation": "never",
"[javascript]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[json]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[html]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[vue]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[vue-html]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[handlebars]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[css]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[scss]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[less]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[graphql]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"editor.codeActionsOnSave": {
"source.fixAll.oxc": "explicit"
}
}
129 changes: 4 additions & 125 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,126 +1,5 @@
# Ultracite Code Standards
## Principles

This project uses **Ultracite**, a zero-config preset that enforces strict code quality standards through automated formatting and linting.

## Quick Reference

- **Format code**: `bun x ultracite fix`
- **Check for issues**: `bun x ultracite check`
- **Diagnose setup**: `bun x ultracite doctor`

Oxlint + Oxfmt (the underlying engine) provides robust linting and formatting. Most issues are automatically fixable.

---

## Core Principles

Write code that is **accessible, performant, type-safe, and maintainable**. Focus on clarity and explicit intent over brevity.

### Type Safety & Explicitness

- Use explicit types for function parameters and return values when they enhance clarity
- Prefer `unknown` over `any` when the type is genuinely unknown
- Use const assertions (`as const`) for immutable values and literal types
- Leverage TypeScript's type narrowing instead of type assertions
- Use meaningful variable names instead of magic numbers - extract constants with descriptive names

### Modern JavaScript/TypeScript

- Use arrow functions for callbacks and short functions
- Prefer `for...of` loops over `.forEach()` and indexed `for` loops
- Use optional chaining (`?.`) and nullish coalescing (`??`) for safer property access
- Prefer template literals over string concatenation
- Use destructuring for object and array assignments
- Use `const` by default, `let` only when reassignment is needed, never `var`

### Async & Promises

- Always `await` promises in async functions - don't forget to use the return value
- Use `async/await` syntax instead of promise chains for better readability
- Handle errors appropriately in async code with try-catch blocks
- Don't use async functions as Promise executors

### React & JSX

- Use function components over class components
- Call hooks at the top level only, never conditionally
- Specify all dependencies in hook dependency arrays correctly
- Use the `key` prop for elements in iterables (prefer unique IDs over array indices)
- Nest children between opening and closing tags instead of passing as props
- Don't define components inside other components
- Use semantic HTML and ARIA attributes for accessibility:
- Provide meaningful alt text for images
- Use proper heading hierarchy
- Add labels for form inputs
- Include keyboard event handlers alongside mouse events
- Use semantic elements (`<button>`, `<nav>`, etc.) instead of divs with roles

### Error Handling & Debugging

- Remove `console.log`, `debugger`, and `alert` statements from production code
- Throw `Error` objects with descriptive messages, not strings or other values
- Use `try-catch` blocks meaningfully - don't catch errors just to rethrow them
- Prefer early returns over nested conditionals for error cases

### Code Organization

- Keep functions focused and under reasonable cognitive complexity limits
- Extract complex conditions into well-named boolean variables
- Use early returns to reduce nesting
- Prefer simple conditionals over nested ternary operators
- Group related code together and separate concerns

### Security

- Add `rel="noopener"` when using `target="_blank"` on links
- Avoid `dangerouslySetInnerHTML` unless absolutely necessary
- Don't use `eval()` or assign directly to `document.cookie`
- Validate and sanitize user input

### Performance

- Avoid spread syntax in accumulators within loops
- Use top-level regex literals instead of creating them in loops
- Prefer specific imports over namespace imports
- Avoid barrel files (index files that re-export everything)
- Use proper image components (e.g., Next.js `<Image>`) over `<img>` tags

### Framework-Specific Guidance

**Next.js:**

- Use Next.js `<Image>` component for images
- Use `next/head` or App Router metadata API for head elements
- Use Server Components for async data fetching instead of async Client Components

**React 19+:**

- Use ref as a prop instead of `React.forwardRef`

**Solid/Svelte/Vue/Qwik:**

- Use `class` and `for` attributes (not `className` or `htmlFor`)

---

## Testing

- Write assertions inside `it()` or `test()` blocks
- Avoid done callbacks in async tests - use async/await instead
- Don't use `.only` or `.skip` in committed code
- Keep test suites reasonably flat - avoid excessive `describe` nesting

## When Oxlint + Oxfmt Can't Help

Oxlint + Oxfmt's linter will catch most issues automatically. Focus your attention on:

1. **Business logic correctness** - Oxlint + Oxfmt can't validate your algorithms
2. **Meaningful naming** - Use descriptive names for functions, variables, and types
3. **Architecture decisions** - Component structure, data flow, and API design
4. **Edge cases** - Handle boundary conditions and error states
5. **User experience** - Accessibility, performance, and usability considerations
6. **Documentation** - Add comments for complex logic, but prefer self-documenting code

---

Most formatting and common issues are automatically fixed by Oxlint + Oxfmt. Run `bun x ultracite fix` before committing to ensure compliance.
This codebase will outlive you. Every shortcut you take becomes someone else's burden. Every hack compounds into technical debt that slows the whole team down.
You are not just writing code. You are shaping the future of this project. The patterns you establish will be copied. The corners you cut will be cut again.
Fight entropy. Leave the codebase better than you found it.
11 changes: 11 additions & 0 deletions bishop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"bots": ["cursor[bot]"],
"review": {
"skills": [
{ "name": "tdd", "paths": ["src/**/*test.ts"] },
{ "name": "improve-codebase-architecture" }
],
"agent": "cursor",
"model": "composer-2-fast"
}
}
Loading