From 00f49ebc0b0f1fb1803c034f8c2bb1873b8625ea Mon Sep 17 00:00:00 2001 From: PlayerNguyen Date: Wed, 8 Jul 2026 17:09:53 +0700 Subject: [PATCH 1/3] docs: add Biome.js setup plan (refs #12) --- .../plans/08-07-2026-17-09_setup-biomejs.md | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .opencode/plans/08-07-2026-17-09_setup-biomejs.md diff --git a/.opencode/plans/08-07-2026-17-09_setup-biomejs.md b/.opencode/plans/08-07-2026-17-09_setup-biomejs.md new file mode 100644 index 0000000..a28980d --- /dev/null +++ b/.opencode/plans/08-07-2026-17-09_setup-biomejs.md @@ -0,0 +1,46 @@ +# Setup Biome.js + +## Context + +The project has zero linting or formatting tooling — no ESLint, no Prettier, no Biome. Adding Biome brings both linting and formatting in a single fast tool, with native Bun support and zero-config setup. + +## Current State + +- 6-package Bun workspace monorepo (`apps/api`, `apps/ui`, `packages/{business,cache,common,database}`) +- TypeScript `strict` mode as the only code quality measure +- No `lint`/`format` scripts anywhere +- No `.editorconfig`, no `.vscode/settings.json` + +## Target State + +- `@biomejs/biome` installed as root devDependency +- `biome.json` at root with sensible defaults +- Root scripts: `lint`, `format`, `check` +- All existing code formatted on first run + +## Implementation Steps + +1. **Install Biome** — `bun add -D -E @biomejs/biome` at root +2. **Generate config** — `bunx --bun @biomejs/biome init` → creates `biome.json` +3. **Tweak `biome.json`** — set `indentStyle: space`, `quoteStyle: single`, `lineWidth: 100`, add `files.ignoreUnknown: true`, ignore generated/prisma and dist dirs +4. **Add root scripts** to root `package.json`: + - `"lint": "biome lint"` + - `"lint:fix": "biome lint --write"` + - `"format": "biome format --write"` + - `"check": "biome check --write"` +5. **Add `.vscode/settings.json`** recommending Biome extension & setting it as default formatter +6. **Run `bun run check`** — initial format + lint pass across the whole codebase + +## Key Considerations + +- **Version pinning** — use `-E` to pin Biome version (per Biome docs, pinned versions are important) +- **No `bunfig.toml` change needed** — Biome is standalone +- **Risk:** Initial `biome check --write` will touch many files. Review the diff before committing. +- **CI**: Can add `biome ci` to the GitHub Actions workflow as a follow-up + +## Verification Checklist + +- [ ] `bun run lint` passes with zero errors +- [ ] `bun run format` formats without errors +- [ ] `bun run check` succeeds +- [ ] `bun run test` still passes after formatting changes From 053064f3100548f81c5ec1e03888bdbc0fe0e2f3 Mon Sep 17 00:00:00 2001 From: PlayerNguyen Date: Wed, 8 Jul 2026 17:15:43 +0700 Subject: [PATCH 2/3] docs: add critical note about .github templates to AGENTS.md --- AGENTS.md | 2 + apps/ui/src/routeTree.gen.ts | 119 ++++++++++++----------------------- opencode.jsonc | 7 --- 3 files changed, 42 insertions(+), 86 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 71889c9..cd27bfd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,5 +1,7 @@ # Dashbore — AGENTS.md +> **Pull request and issue creation MUST follow templates in `.github/` — this is CRITICAL.** + > Detailed project documentation lives in `docs/`. Read the relevant file > before making changes to a workspace. diff --git a/apps/ui/src/routeTree.gen.ts b/apps/ui/src/routeTree.gen.ts index 3151fa8..ea26a01 100644 --- a/apps/ui/src/routeTree.gen.ts +++ b/apps/ui/src/routeTree.gen.ts @@ -8,127 +8,88 @@ // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. -// Import Routes +import { Route as rootRouteImport } from './routes/__root' +import { Route as HomeRouteImport } from './routes/home' +import { Route as IndexRouteImport } from './routes/index' +import { Route as DashboardIndexRouteImport } from './routes/dashboard/index' -import { Route as rootRoute } from './routes/__root' -import { Route as HomeImport } from './routes/home' -import { Route as IndexImport } from './routes/index' -import { Route as DashboardIndexImport } from './routes/dashboard/index' - -// Create/Update Routes - -const HomeRoute = HomeImport.update({ +const HomeRoute = HomeRouteImport.update({ id: '/home', path: '/home', - getParentRoute: () => rootRoute, + getParentRoute: () => rootRouteImport, } as any) - -const IndexRoute = IndexImport.update({ +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => rootRoute, + getParentRoute: () => rootRouteImport, } as any) - -const DashboardIndexRoute = DashboardIndexImport.update({ +const DashboardIndexRoute = DashboardIndexRouteImport.update({ id: '/dashboard/', path: '/dashboard/', - getParentRoute: () => rootRoute, + getParentRoute: () => rootRouteImport, } as any) -// Populate the FileRoutesByPath interface - -declare module '@tanstack/react-router' { - interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexImport - parentRoute: typeof rootRoute - } - '/home': { - id: '/home' - path: '/home' - fullPath: '/home' - preLoaderRoute: typeof HomeImport - parentRoute: typeof rootRoute - } - '/dashboard/': { - id: '/dashboard/' - path: '/dashboard' - fullPath: '/dashboard' - preLoaderRoute: typeof DashboardIndexImport - parentRoute: typeof rootRoute - } - } -} - -// Create and export the route tree - export interface FileRoutesByFullPath { '/': typeof IndexRoute '/home': typeof HomeRoute - '/dashboard': typeof DashboardIndexRoute + '/dashboard/': typeof DashboardIndexRoute } - export interface FileRoutesByTo { '/': typeof IndexRoute '/home': typeof HomeRoute '/dashboard': typeof DashboardIndexRoute } - export interface FileRoutesById { - __root__: typeof rootRoute + __root__: typeof rootRouteImport '/': typeof IndexRoute '/home': typeof HomeRoute '/dashboard/': typeof DashboardIndexRoute } - export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: '/' | '/home' | '/dashboard' + fullPaths: '/' | '/home' | '/dashboard/' fileRoutesByTo: FileRoutesByTo to: '/' | '/home' | '/dashboard' id: '__root__' | '/' | '/home' | '/dashboard/' fileRoutesById: FileRoutesById } - export interface RootRouteChildren { IndexRoute: typeof IndexRoute HomeRoute: typeof HomeRoute DashboardIndexRoute: typeof DashboardIndexRoute } +declare module '@tanstack/react-router' { + interface FileRoutesByPath { + '/home': { + id: '/home' + path: '/home' + fullPath: '/home' + preLoaderRoute: typeof HomeRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/dashboard/': { + id: '/dashboard/' + path: '/dashboard' + fullPath: '/dashboard/' + preLoaderRoute: typeof DashboardIndexRouteImport + parentRoute: typeof rootRouteImport + } + } +} + const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, HomeRoute: HomeRoute, DashboardIndexRoute: DashboardIndexRoute, } - -export const routeTree = rootRoute +export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) ._addFileTypes() - -/* ROUTE_MANIFEST_START -{ - "routes": { - "__root__": { - "filePath": "__root.tsx", - "children": [ - "/", - "/home", - "/dashboard/" - ] - }, - "/": { - "filePath": "index.tsx" - }, - "/home": { - "filePath": "home.tsx" - }, - "/dashboard/": { - "filePath": "dashboard/index.tsx" - } - } -} -ROUTE_MANIFEST_END */ diff --git a/opencode.jsonc b/opencode.jsonc index 982820b..90e75e2 100644 --- a/opencode.jsonc +++ b/opencode.jsonc @@ -22,13 +22,6 @@ }, "snapshot": true, - - "permission": { - "edit": "allow", - "write": "allow", - "bash": "ask" - }, - "compaction": { "auto": true, "prune": false, From 047f771cd1f179956b2f16ec6090f02b0e0b9e71 Mon Sep 17 00:00:00 2001 From: PlayerNguyen Date: Wed, 8 Jul 2026 17:20:12 +0700 Subject: [PATCH 3/3] docs: update plan naming convention in AGENTS.md, SKILL.md, and rename plan file --- .../17-09_setup-biomejs.md} | 0 .opencode/skills/propose-plan/SKILL.md | 4 ++-- AGENTS.md | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) rename .opencode/plans/{08-07-2026-17-09_setup-biomejs.md => 08-07-2026/17-09_setup-biomejs.md} (100%) diff --git a/.opencode/plans/08-07-2026-17-09_setup-biomejs.md b/.opencode/plans/08-07-2026/17-09_setup-biomejs.md similarity index 100% rename from .opencode/plans/08-07-2026-17-09_setup-biomejs.md rename to .opencode/plans/08-07-2026/17-09_setup-biomejs.md diff --git a/.opencode/skills/propose-plan/SKILL.md b/.opencode/skills/propose-plan/SKILL.md index c706a12..79c6e55 100644 --- a/.opencode/skills/propose-plan/SKILL.md +++ b/.opencode/skills/propose-plan/SKILL.md @@ -73,7 +73,7 @@ Present the plan and ask: If the user approves and asks to save the plan: 1. Get current timestamp: `date +"%d-%m-%Y-%H-%M"` -2. Create the plan file at `.opencode/plans/_.md` +2. Create the plan file at `.opencode/plans//hh-mm_.md` 3. Use the plan content from Phase 3 as the file content 4. Confirm the file was created @@ -138,6 +138,6 @@ Does this plan look good? Should I proceed, or would you like any changes? User: Looks good, save the plan -Agent: [Creates .opencode/plans/08-07-2026-15-30_mysql-to-postgresql-migration.md] +Agent: [Creates .opencode/plans/08-07-2026/15-30_mysql-to-postgresql-migration.md] Plan saved. Ready to implement when you are. ``` diff --git a/AGENTS.md b/AGENTS.md index cd27bfd..d666947 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,6 +2,8 @@ > **Pull request and issue creation MUST follow templates in `.github/` — this is CRITICAL.** +> **When using the `propose-plan` skill, the plan path MUST follow `plans//hh-mm_.md` — this is HIGH.** + > Detailed project documentation lives in `docs/`. Read the relevant file > before making changes to a workspace.