@oyolincc/create 0.2.1 → 0.3.0
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.
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -1
- package/templates/hono-fullstack/.agents/skills/ask-matt/PHASE-BOUNDARIES.md +55 -0
- package/templates/hono-fullstack/.agents/skills/ask-matt/SKILL.md +90 -0
- package/templates/hono-fullstack/.agents/skills/ask-matt/agents/openai.yaml +5 -0
- package/templates/hono-fullstack/.agents/skills/code-review/SKILL.md +87 -0
- package/templates/hono-fullstack/.agents/skills/code-review/agents/openai.yaml +3 -0
- package/templates/hono-fullstack/.agents/skills/codebase-design/DEEPENING.md +37 -0
- package/templates/hono-fullstack/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/templates/hono-fullstack/.agents/skills/codebase-design/SKILL.md +114 -0
- package/templates/hono-fullstack/.agents/skills/codebase-design/agents/openai.yaml +3 -0
- package/templates/hono-fullstack/.agents/skills/confirm-requirements/SKILL.md +25 -0
- package/templates/hono-fullstack/.agents/skills/diagnosing-bugs/SKILL.md +140 -0
- package/templates/hono-fullstack/.agents/skills/diagnosing-bugs/agents/openai.yaml +3 -0
- package/templates/hono-fullstack/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
- package/templates/hono-fullstack/.agents/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/templates/hono-fullstack/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/templates/hono-fullstack/.agents/skills/domain-modeling/SKILL.md +74 -0
- package/templates/hono-fullstack/.agents/skills/domain-modeling/agents/openai.yaml +3 -0
- package/templates/hono-fullstack/.agents/skills/grill-me/SKILL.md +7 -0
- package/templates/hono-fullstack/.agents/skills/grill-me/agents/openai.yaml +5 -0
- package/templates/hono-fullstack/.agents/skills/grilling/SKILL.md +22 -0
- package/templates/hono-fullstack/.agents/skills/grilling/agents/openai.yaml +3 -0
- package/templates/hono-fullstack/.agents/skills/implement/SKILL.md +15 -0
- package/templates/hono-fullstack/.agents/skills/implement/agents/openai.yaml +5 -0
- package/templates/hono-fullstack/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/templates/hono-fullstack/.agents/skills/improve-codebase-architecture/SKILL.md +71 -0
- package/templates/hono-fullstack/.agents/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
- package/templates/hono-fullstack/.agents/skills/prototype/LOGIC.md +67 -0
- package/templates/hono-fullstack/.agents/skills/prototype/SKILL.md +26 -0
- package/templates/hono-fullstack/.agents/skills/prototype/UI.md +112 -0
- package/templates/hono-fullstack/.agents/skills/prototype/agents/openai.yaml +3 -0
- package/templates/hono-fullstack/.agents/skills/research/SKILL.md +12 -0
- package/templates/hono-fullstack/.agents/skills/research/agents/openai.yaml +3 -0
- package/templates/hono-fullstack/.agents/skills/resolving-merge-conflicts/SKILL.md +14 -0
- package/templates/hono-fullstack/.agents/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
- package/templates/hono-fullstack/.agents/skills/scoped-code-review/SKILL.md +113 -0
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/SKILL.md +116 -0
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/domain.md +51 -0
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +45 -0
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +46 -0
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +30 -0
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/triage-labels.md +15 -0
- package/templates/hono-fullstack/.agents/skills/tdd/SKILL.md +38 -0
- package/templates/hono-fullstack/.agents/skills/tdd/agents/openai.yaml +3 -0
- package/templates/hono-fullstack/.agents/skills/tdd/mocking.md +59 -0
- package/templates/hono-fullstack/.agents/skills/tdd/tests.md +77 -0
- package/templates/hono-fullstack/.agents/skills/teach/GLOSSARY-FORMAT.md +35 -0
- package/templates/hono-fullstack/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/templates/hono-fullstack/.agents/skills/teach/MISSION-FORMAT.md +31 -0
- package/templates/hono-fullstack/.agents/skills/teach/RESOURCES-FORMAT.md +32 -0
- package/templates/hono-fullstack/.agents/skills/teach/SKILL.md +140 -0
- package/templates/hono-fullstack/.agents/skills/teach/agents/openai.yaml +5 -0
- package/templates/hono-fullstack/.agents/skills/to-questionnaire/SKILL.md +53 -0
- package/templates/hono-fullstack/.agents/skills/to-questionnaire/agents/openai.yaml +5 -0
- package/templates/hono-fullstack/.agents/skills/triage/AGENT-BRIEF.md +207 -0
- package/templates/hono-fullstack/.agents/skills/triage/OUT-OF-SCOPE.md +105 -0
- package/templates/hono-fullstack/.agents/skills/triage/SKILL.md +112 -0
- package/templates/hono-fullstack/.agents/skills/triage/agents/openai.yaml +5 -0
- package/templates/hono-fullstack/.agents/skills/wait-what/SKILL.md +7 -0
- package/templates/hono-fullstack/.agents/skills/wait-what/agents/openai.yaml +5 -0
- package/templates/hono-fullstack/.agents/skills/wayfinder/SKILL.md +128 -0
- package/templates/hono-fullstack/.agents/skills/wayfinder/agents/openai.yaml +5 -0
- package/templates/hono-fullstack/.agents/skills/wizard/SKILL.md +44 -0
- package/templates/hono-fullstack/.agents/skills/wizard/agents/openai.yaml +3 -0
- package/templates/hono-fullstack/.agents/skills/wizard/template.sh +204 -0
- package/templates/hono-fullstack/.agents/skills/writing-for-agents/SKILL-MECHANICS.md +22 -0
- package/templates/hono-fullstack/.agents/skills/writing-for-agents/SKILL.md +81 -0
- package/templates/hono-fullstack/.agents/skills/writing-for-agents/agents/openai.yaml +3 -0
- package/templates/hono-fullstack/.changeset/README.md +8 -0
- package/templates/hono-fullstack/.changeset/config.json +11 -0
- package/templates/hono-fullstack/.editorconfig +31 -0
- package/templates/hono-fullstack/.gitattributes +39 -0
- package/templates/hono-fullstack/.vscode/extensions.json +5 -0
- package/templates/hono-fullstack/.vscode/launch.json +36 -0
- package/templates/hono-fullstack/.vscode/settings.json +26 -0
- package/templates/hono-fullstack/AGENTS.md +50 -0
- package/templates/hono-fullstack/README.md +51 -0
- package/templates/hono-fullstack/_gitignore +35 -0
- package/templates/hono-fullstack/apps/server/.dev.vars.example +9 -0
- package/templates/hono-fullstack/apps/server/package.json +63 -0
- package/templates/hono-fullstack/apps/server/src/adapters/cloudflare/entry.ts +36 -0
- package/templates/hono-fullstack/apps/server/src/adapters/nodejs/bootstrap.ts +61 -0
- package/templates/hono-fullstack/apps/server/src/adapters/nodejs/entry.ts +62 -0
- package/templates/hono-fullstack/apps/server/src/app.ts +43 -0
- package/templates/hono-fullstack/apps/server/src/config.ts +47 -0
- package/templates/hono-fullstack/apps/server/src/infra/logger/getter.ts +74 -0
- package/templates/hono-fullstack/apps/server/src/infra/logger/pino.ts +126 -0
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/constants.ts +23 -0
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/errors.ts +40 -0
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/example/worker-entry.ts +13 -0
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/pass-through/runner.ts +42 -0
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/piscina/runner.ts +185 -0
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/types.ts +118 -0
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/utils/business-error.ts +19 -0
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/utils/message.ts +49 -0
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/utils/transfer.ts +144 -0
- package/templates/hono-fullstack/apps/server/src/middlewares/cors.ts +26 -0
- package/templates/hono-fullstack/apps/server/src/modules/example/contracts.ts +9 -0
- package/templates/hono-fullstack/apps/server/src/modules/example/routes.ts +73 -0
- package/templates/hono-fullstack/apps/server/src/modules/example/work-task/tasks.test.ts +49 -0
- package/templates/hono-fullstack/apps/server/src/modules/example/work-task/tasks.ts +58 -0
- package/templates/hono-fullstack/apps/server/src/shared/app/types.ts +44 -0
- package/templates/hono-fullstack/apps/server/src/shared/errors/constants.ts +152 -0
- package/templates/hono-fullstack/apps/server/src/shared/errors/defs/index.ts +15 -0
- package/templates/hono-fullstack/apps/server/src/shared/errors/handler.ts +16 -0
- package/templates/hono-fullstack/apps/server/src/shared/errors/log.ts +67 -0
- package/templates/hono-fullstack/apps/server/src/shared/errors/proto.ts +42 -0
- package/templates/hono-fullstack/apps/server/src/shared/errors/types.ts +29 -0
- package/templates/hono-fullstack/apps/server/src/shared/network/fetcher.ts +35 -0
- package/templates/hono-fullstack/apps/server/src/shared/network/openapi/index.ts +50 -0
- package/templates/hono-fullstack/apps/server/src/shared/network/openapi/res-defs.ts +39 -0
- package/templates/hono-fullstack/apps/server/src/shared/network/types.ts +3 -0
- package/templates/hono-fullstack/apps/server/src/shared/network/utils.ts +36 -0
- package/templates/hono-fullstack/apps/server/src/shared/network/validator.ts +28 -0
- package/templates/hono-fullstack/apps/server/src/shared/utils/index.ts +30 -0
- package/templates/hono-fullstack/apps/server/src/virtual-modules.d.ts +5 -0
- package/templates/hono-fullstack/apps/server/tsconfig.json +17 -0
- package/templates/hono-fullstack/apps/server/vite.config.ts +87 -0
- package/templates/hono-fullstack/apps/server/wrangler.jsonc +29 -0
- package/templates/hono-fullstack/apps/stack/backend/cloudflare.ts +5 -0
- package/templates/hono-fullstack/apps/stack/backend/node.ts +3 -0
- package/templates/hono-fullstack/apps/stack/frontend/components/general/ErrorMessage.tsx +4 -0
- package/templates/hono-fullstack/apps/stack/frontend/components/layouts/AppLayout.tsx +11 -0
- package/templates/hono-fullstack/apps/stack/frontend/components/layouts/Header.tsx +7 -0
- package/templates/hono-fullstack/apps/stack/frontend/components/layouts/Page.tsx +5 -0
- package/templates/hono-fullstack/apps/stack/frontend/components/layouts/PageContainer.tsx +5 -0
- package/templates/hono-fullstack/apps/stack/frontend/modules/example/api.ts +13 -0
- package/templates/hono-fullstack/apps/stack/frontend/modules/example/components/ExampleForm.tsx +45 -0
- package/templates/hono-fullstack/apps/stack/frontend/modules/example/components/ExampleList.tsx +13 -0
- package/templates/hono-fullstack/apps/stack/frontend/modules/example/hooks/api-hooks.ts +14 -0
- package/templates/hono-fullstack/apps/stack/frontend/modules/example/stores/index.ts +3 -0
- package/templates/hono-fullstack/apps/stack/frontend/routeTree.gen.ts +73 -0
- package/templates/hono-fullstack/apps/stack/frontend/router.tsx +22 -0
- package/templates/hono-fullstack/apps/stack/frontend/routes/__root.tsx +61 -0
- package/templates/hono-fullstack/apps/stack/frontend/routes/api/$.ts +18 -0
- package/templates/hono-fullstack/apps/stack/frontend/routes/index.tsx +50 -0
- package/templates/hono-fullstack/apps/stack/frontend/shared/network/client.ts +19 -0
- package/templates/hono-fullstack/apps/stack/frontend/shared/network/constants.ts +1 -0
- package/templates/hono-fullstack/apps/stack/frontend/shared/network/errors.ts +33 -0
- package/templates/hono-fullstack/apps/stack/frontend/styles.css +23 -0
- package/templates/hono-fullstack/apps/stack/frontend/vite-env.d.ts +6 -0
- package/templates/hono-fullstack/apps/stack/package.json +59 -0
- package/templates/hono-fullstack/apps/stack/tsconfig.json +13 -0
- package/templates/hono-fullstack/apps/stack/tsr.config.json +5 -0
- package/templates/hono-fullstack/apps/stack/vite.config.ts +82 -0
- package/templates/hono-fullstack/apps/stack/wrangler.jsonc +20 -0
- package/templates/hono-fullstack/docs/agents/domain.md +41 -0
- package/templates/hono-fullstack/docs/agents/issue-tracker.md +30 -0
- package/templates/hono-fullstack/docs/agents/triage-labels.md +15 -0
- package/templates/hono-fullstack/envs/.env.example.server +12 -0
- package/templates/hono-fullstack/envs/.env.example.sqlite +1 -0
- package/templates/hono-fullstack/envs/.env.example.sqlite-d1 +3 -0
- package/templates/hono-fullstack/libs/db/drizzle-kit/sqlite-d1.config.ts +22 -0
- package/templates/hono-fullstack/libs/db/drizzle-kit/sqlite.config.ts +22 -0
- package/templates/hono-fullstack/libs/db/package.json +42 -0
- package/templates/hono-fullstack/libs/db/src/dialects/sqlite/client.ts +35 -0
- package/templates/hono-fullstack/libs/db/src/dialects/sqlite/d1-client.ts +12 -0
- package/templates/hono-fullstack/libs/db/src/dialects/sqlite/schema/columns.ts +37 -0
- package/templates/hono-fullstack/libs/db/src/dialects/sqlite/schema/index.ts +7 -0
- package/templates/hono-fullstack/libs/db/src/dialects/sqlite/schema/modules/examples/examples.ts +22 -0
- package/templates/hono-fullstack/libs/db/src/dialects/sqlite/schema/relations.ts +5 -0
- package/templates/hono-fullstack/libs/db/src/dialects/sqlite/schema/tables.ts +5 -0
- package/templates/hono-fullstack/libs/db/src/dialects/sqlite/schema/types.ts +7 -0
- package/templates/hono-fullstack/libs/db/src/dialects/sqlite/schema/vo.ts +1 -0
- package/templates/hono-fullstack/libs/db/src/dialects/sqlite/utils.ts +8 -0
- package/templates/hono-fullstack/libs/db/src/shared/types.ts +26 -0
- package/templates/hono-fullstack/libs/db/tsconfig.json +10 -0
- package/templates/hono-fullstack/libs/db/vite.config.ts +25 -0
- package/templates/hono-fullstack/libs/definition/package.json +30 -0
- package/templates/hono-fullstack/libs/definition/src/backend.ts +2 -0
- package/templates/hono-fullstack/libs/definition/src/configs/defs/log.ts +53 -0
- package/templates/hono-fullstack/libs/definition/src/configs/defs/middleware.ts +16 -0
- package/templates/hono-fullstack/libs/definition/src/configs/defs/runtime.ts +12 -0
- package/templates/hono-fullstack/libs/definition/src/configs/defs/sqlite.ts +26 -0
- package/templates/hono-fullstack/libs/definition/src/configs/defs/worker.ts +29 -0
- package/templates/hono-fullstack/libs/definition/src/configs/index.ts +5 -0
- package/templates/hono-fullstack/libs/definition/src/configs/proto.ts +81 -0
- package/templates/hono-fullstack/libs/definition/src/configs/schema.ts +23 -0
- package/templates/hono-fullstack/libs/definition/src/frontend.ts +1 -0
- package/templates/hono-fullstack/libs/definition/src/modules/example/index.ts +16 -0
- package/templates/hono-fullstack/libs/definition/src/modules/index.ts +1 -0
- package/templates/hono-fullstack/libs/definition/tsconfig.json +5 -0
- package/templates/hono-fullstack/libs/definition/vite.config.ts +16 -0
- package/templates/hono-fullstack/oyo.config.json +13 -0
- package/templates/hono-fullstack/package.json +25 -0
- package/templates/hono-fullstack/pnpm-workspace.yaml +84 -0
- package/templates/hono-fullstack/tsconfig.json +4 -0
- package/templates/hono-fullstack/turbo.json +36 -0
- package/templates/hono-fullstack/vite.config.ts +14 -0
- package/templates/hono-server/.agents/skills/ask-matt/PHASE-BOUNDARIES.md +55 -0
- package/templates/hono-server/.agents/skills/ask-matt/SKILL.md +90 -0
- package/templates/hono-server/.agents/skills/ask-matt/agents/openai.yaml +5 -0
- package/templates/hono-server/.agents/skills/code-review/SKILL.md +87 -0
- package/templates/hono-server/.agents/skills/code-review/agents/openai.yaml +3 -0
- package/templates/hono-server/.agents/skills/codebase-design/DEEPENING.md +37 -0
- package/templates/hono-server/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/templates/hono-server/.agents/skills/codebase-design/SKILL.md +114 -0
- package/templates/hono-server/.agents/skills/codebase-design/agents/openai.yaml +3 -0
- package/templates/hono-server/.agents/skills/confirm-requirements/SKILL.md +25 -0
- package/templates/hono-server/.agents/skills/diagnosing-bugs/SKILL.md +140 -0
- package/templates/hono-server/.agents/skills/diagnosing-bugs/agents/openai.yaml +3 -0
- package/templates/hono-server/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
- package/templates/hono-server/.agents/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/templates/hono-server/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/templates/hono-server/.agents/skills/domain-modeling/SKILL.md +74 -0
- package/templates/hono-server/.agents/skills/domain-modeling/agents/openai.yaml +3 -0
- package/templates/hono-server/.agents/skills/grill-me/SKILL.md +7 -0
- package/templates/hono-server/.agents/skills/grill-me/agents/openai.yaml +5 -0
- package/templates/hono-server/.agents/skills/grilling/SKILL.md +22 -0
- package/templates/hono-server/.agents/skills/grilling/agents/openai.yaml +3 -0
- package/templates/hono-server/.agents/skills/implement/SKILL.md +15 -0
- package/templates/hono-server/.agents/skills/implement/agents/openai.yaml +5 -0
- package/templates/hono-server/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/templates/hono-server/.agents/skills/improve-codebase-architecture/SKILL.md +71 -0
- package/templates/hono-server/.agents/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
- package/templates/hono-server/.agents/skills/prototype/LOGIC.md +67 -0
- package/templates/hono-server/.agents/skills/prototype/SKILL.md +26 -0
- package/templates/hono-server/.agents/skills/prototype/UI.md +112 -0
- package/templates/hono-server/.agents/skills/prototype/agents/openai.yaml +3 -0
- package/templates/hono-server/.agents/skills/research/SKILL.md +12 -0
- package/templates/hono-server/.agents/skills/research/agents/openai.yaml +3 -0
- package/templates/hono-server/.agents/skills/resolving-merge-conflicts/SKILL.md +14 -0
- package/templates/hono-server/.agents/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
- package/templates/hono-server/.agents/skills/scoped-code-review/SKILL.md +113 -0
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/SKILL.md +116 -0
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/domain.md +51 -0
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +45 -0
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +46 -0
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +30 -0
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/triage-labels.md +15 -0
- package/templates/hono-server/.agents/skills/tdd/SKILL.md +38 -0
- package/templates/hono-server/.agents/skills/tdd/agents/openai.yaml +3 -0
- package/templates/hono-server/.agents/skills/tdd/mocking.md +59 -0
- package/templates/hono-server/.agents/skills/tdd/tests.md +77 -0
- package/templates/hono-server/.agents/skills/teach/GLOSSARY-FORMAT.md +35 -0
- package/templates/hono-server/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/templates/hono-server/.agents/skills/teach/MISSION-FORMAT.md +31 -0
- package/templates/hono-server/.agents/skills/teach/RESOURCES-FORMAT.md +32 -0
- package/templates/hono-server/.agents/skills/teach/SKILL.md +140 -0
- package/templates/hono-server/.agents/skills/teach/agents/openai.yaml +5 -0
- package/templates/hono-server/.agents/skills/to-questionnaire/SKILL.md +53 -0
- package/templates/hono-server/.agents/skills/to-questionnaire/agents/openai.yaml +5 -0
- package/templates/hono-server/.agents/skills/triage/AGENT-BRIEF.md +207 -0
- package/templates/hono-server/.agents/skills/triage/OUT-OF-SCOPE.md +105 -0
- package/templates/hono-server/.agents/skills/triage/SKILL.md +112 -0
- package/templates/hono-server/.agents/skills/triage/agents/openai.yaml +5 -0
- package/templates/hono-server/.agents/skills/wait-what/SKILL.md +7 -0
- package/templates/hono-server/.agents/skills/wait-what/agents/openai.yaml +5 -0
- package/templates/hono-server/.agents/skills/wayfinder/SKILL.md +128 -0
- package/templates/hono-server/.agents/skills/wayfinder/agents/openai.yaml +5 -0
- package/templates/hono-server/.agents/skills/wizard/SKILL.md +44 -0
- package/templates/hono-server/.agents/skills/wizard/agents/openai.yaml +3 -0
- package/templates/hono-server/.agents/skills/wizard/template.sh +204 -0
- package/templates/hono-server/.agents/skills/writing-for-agents/SKILL-MECHANICS.md +22 -0
- package/templates/hono-server/.agents/skills/writing-for-agents/SKILL.md +81 -0
- package/templates/hono-server/.agents/skills/writing-for-agents/agents/openai.yaml +3 -0
- package/templates/hono-server/.changeset/README.md +8 -0
- package/templates/hono-server/.changeset/config.json +11 -0
- package/templates/hono-server/.editorconfig +31 -0
- package/templates/hono-server/.gitattributes +39 -0
- package/templates/hono-server/.vscode/extensions.json +5 -0
- package/templates/hono-server/.vscode/launch.json +29 -0
- package/templates/hono-server/.vscode/settings.json +26 -0
- package/templates/hono-server/AGENTS.md +50 -0
- package/templates/hono-server/README.md +44 -0
- package/templates/hono-server/_gitignore +35 -0
- package/templates/hono-server/apps/server/.dev.vars.example +9 -0
- package/templates/hono-server/apps/server/package.json +64 -0
- package/templates/hono-server/apps/server/src/adapters/cloudflare/entry.ts +36 -0
- package/templates/hono-server/apps/server/src/adapters/nodejs/bootstrap.ts +61 -0
- package/templates/hono-server/apps/server/src/adapters/nodejs/entry.ts +62 -0
- package/templates/hono-server/apps/server/src/app.ts +43 -0
- package/templates/hono-server/apps/server/src/config.ts +47 -0
- package/templates/hono-server/apps/server/src/infra/logger/getter.ts +74 -0
- package/templates/hono-server/apps/server/src/infra/logger/pino.ts +126 -0
- package/templates/hono-server/apps/server/src/infra/work-runner/constants.ts +23 -0
- package/templates/hono-server/apps/server/src/infra/work-runner/errors.ts +40 -0
- package/templates/hono-server/apps/server/src/infra/work-runner/example/worker-entry.ts +13 -0
- package/templates/hono-server/apps/server/src/infra/work-runner/pass-through/runner.ts +42 -0
- package/templates/hono-server/apps/server/src/infra/work-runner/piscina/runner.ts +185 -0
- package/templates/hono-server/apps/server/src/infra/work-runner/types.ts +118 -0
- package/templates/hono-server/apps/server/src/infra/work-runner/utils/business-error.ts +19 -0
- package/templates/hono-server/apps/server/src/infra/work-runner/utils/message.ts +49 -0
- package/templates/hono-server/apps/server/src/infra/work-runner/utils/transfer.ts +144 -0
- package/templates/hono-server/apps/server/src/middlewares/cors.ts +26 -0
- package/templates/hono-server/apps/server/src/modules/example/contracts.ts +9 -0
- package/templates/hono-server/apps/server/src/modules/example/routes.ts +73 -0
- package/templates/hono-server/apps/server/src/modules/example/work-task/tasks.test.ts +49 -0
- package/templates/hono-server/apps/server/src/modules/example/work-task/tasks.ts +58 -0
- package/templates/hono-server/apps/server/src/shared/app/types.ts +44 -0
- package/templates/hono-server/apps/server/src/shared/errors/constants.ts +152 -0
- package/templates/hono-server/apps/server/src/shared/errors/defs/index.ts +15 -0
- package/templates/hono-server/apps/server/src/shared/errors/handler.ts +16 -0
- package/templates/hono-server/apps/server/src/shared/errors/log.ts +67 -0
- package/templates/hono-server/apps/server/src/shared/errors/proto.ts +42 -0
- package/templates/hono-server/apps/server/src/shared/errors/types.ts +29 -0
- package/templates/hono-server/apps/server/src/shared/network/fetcher.ts +35 -0
- package/templates/hono-server/apps/server/src/shared/network/openapi/index.ts +50 -0
- package/templates/hono-server/apps/server/src/shared/network/openapi/res-defs.ts +39 -0
- package/templates/hono-server/apps/server/src/shared/network/types.ts +3 -0
- package/templates/hono-server/apps/server/src/shared/network/utils.ts +36 -0
- package/templates/hono-server/apps/server/src/shared/network/validator.ts +28 -0
- package/templates/hono-server/apps/server/src/shared/utils/index.ts +30 -0
- package/templates/hono-server/apps/server/src/virtual-modules.d.ts +5 -0
- package/templates/hono-server/apps/server/tsconfig.json +17 -0
- package/templates/hono-server/apps/server/vite.config.ts +87 -0
- package/templates/hono-server/apps/server/wrangler.jsonc +29 -0
- package/templates/hono-server/docker/.env.example +4 -0
- package/templates/hono-server/docker/README.md +5 -0
- package/templates/hono-server/docker/local/compose.local.app.yml +21 -0
- package/templates/hono-server/docker/local/local-app-deploy.sh +8 -0
- package/templates/hono-server/docker/local/local-app-down.sh +8 -0
- package/templates/hono-server/docker/prod/.env.example.server +11 -0
- package/templates/hono-server/docker/prod/compose.prod.stack.yml +21 -0
- package/templates/hono-server/docker/prod/update.sh +7 -0
- package/templates/hono-server/docker/server.Dockerfile +38 -0
- package/templates/hono-server/docker/server.Dockerfile.dockerignore +23 -0
- package/templates/hono-server/docs/agents/domain.md +41 -0
- package/templates/hono-server/docs/agents/issue-tracker.md +30 -0
- package/templates/hono-server/docs/agents/triage-labels.md +15 -0
- package/templates/hono-server/envs/.env.example.server +12 -0
- package/templates/hono-server/envs/.env.example.sqlite +1 -0
- package/templates/hono-server/envs/.env.example.sqlite-d1 +3 -0
- package/templates/hono-server/libs/db/drizzle-kit/sqlite-d1.config.ts +22 -0
- package/templates/hono-server/libs/db/drizzle-kit/sqlite.config.ts +22 -0
- package/templates/hono-server/libs/db/package.json +42 -0
- package/templates/hono-server/libs/db/src/dialects/sqlite/client.ts +35 -0
- package/templates/hono-server/libs/db/src/dialects/sqlite/d1-client.ts +12 -0
- package/templates/hono-server/libs/db/src/dialects/sqlite/schema/columns.ts +37 -0
- package/templates/hono-server/libs/db/src/dialects/sqlite/schema/index.ts +7 -0
- package/templates/hono-server/libs/db/src/dialects/sqlite/schema/modules/examples/examples.ts +22 -0
- package/templates/hono-server/libs/db/src/dialects/sqlite/schema/relations.ts +5 -0
- package/templates/hono-server/libs/db/src/dialects/sqlite/schema/tables.ts +5 -0
- package/templates/hono-server/libs/db/src/dialects/sqlite/schema/types.ts +7 -0
- package/templates/hono-server/libs/db/src/dialects/sqlite/schema/vo.ts +1 -0
- package/templates/hono-server/libs/db/src/dialects/sqlite/utils.ts +8 -0
- package/templates/hono-server/libs/db/src/shared/types.ts +26 -0
- package/templates/hono-server/libs/db/tsconfig.json +10 -0
- package/templates/hono-server/libs/db/vite.config.ts +25 -0
- package/templates/hono-server/libs/definition/package.json +29 -0
- package/templates/hono-server/libs/definition/src/backend.ts +2 -0
- package/templates/hono-server/libs/definition/src/configs/defs/log.ts +53 -0
- package/templates/hono-server/libs/definition/src/configs/defs/middleware.ts +16 -0
- package/templates/hono-server/libs/definition/src/configs/defs/runtime.ts +12 -0
- package/templates/hono-server/libs/definition/src/configs/defs/sqlite.ts +26 -0
- package/templates/hono-server/libs/definition/src/configs/defs/worker.ts +29 -0
- package/templates/hono-server/libs/definition/src/configs/index.ts +5 -0
- package/templates/hono-server/libs/definition/src/configs/proto.ts +81 -0
- package/templates/hono-server/libs/definition/src/configs/schema.ts +23 -0
- package/templates/hono-server/libs/definition/src/modules/example/index.ts +16 -0
- package/templates/hono-server/libs/definition/src/modules/index.ts +1 -0
- package/templates/hono-server/libs/definition/tsconfig.json +5 -0
- package/templates/hono-server/libs/definition/vite.config.ts +15 -0
- package/templates/hono-server/oyo.config.json +13 -0
- package/templates/hono-server/package.json +25 -0
- package/templates/hono-server/pnpm-workspace.yaml +66 -0
- package/templates/hono-server/scripts/.env.example.docker +4 -0
- package/templates/hono-server/scripts/build-docker-server.sh +13 -0
- package/templates/hono-server/scripts/common.sh +20 -0
- package/templates/hono-server/tsconfig.json +4 -0
- package/templates/hono-server/turbo.json +36 -0
- package/templates/hono-server/vite.config.ts +14 -0
- package/templates/monorepo/.agents/skills/ask-matt/PHASE-BOUNDARIES.md +55 -0
- package/templates/monorepo/.agents/skills/ask-matt/SKILL.md +90 -0
- package/templates/monorepo/.agents/skills/ask-matt/agents/openai.yaml +5 -0
- package/templates/monorepo/.agents/skills/code-review/SKILL.md +87 -0
- package/templates/monorepo/.agents/skills/code-review/agents/openai.yaml +3 -0
- package/templates/monorepo/.agents/skills/codebase-design/DEEPENING.md +37 -0
- package/templates/monorepo/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/templates/monorepo/.agents/skills/codebase-design/SKILL.md +114 -0
- package/templates/monorepo/.agents/skills/codebase-design/agents/openai.yaml +3 -0
- package/templates/monorepo/.agents/skills/confirm-requirements/SKILL.md +25 -0
- package/templates/monorepo/.agents/skills/diagnosing-bugs/SKILL.md +140 -0
- package/templates/monorepo/.agents/skills/diagnosing-bugs/agents/openai.yaml +3 -0
- package/templates/monorepo/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
- package/templates/monorepo/.agents/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/templates/monorepo/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/templates/monorepo/.agents/skills/domain-modeling/SKILL.md +74 -0
- package/templates/monorepo/.agents/skills/domain-modeling/agents/openai.yaml +3 -0
- package/templates/monorepo/.agents/skills/grill-me/SKILL.md +7 -0
- package/templates/monorepo/.agents/skills/grill-me/agents/openai.yaml +5 -0
- package/templates/monorepo/.agents/skills/grilling/SKILL.md +22 -0
- package/templates/monorepo/.agents/skills/grilling/agents/openai.yaml +3 -0
- package/templates/monorepo/.agents/skills/implement/SKILL.md +15 -0
- package/templates/monorepo/.agents/skills/implement/agents/openai.yaml +5 -0
- package/templates/monorepo/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/templates/monorepo/.agents/skills/improve-codebase-architecture/SKILL.md +71 -0
- package/templates/monorepo/.agents/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
- package/templates/monorepo/.agents/skills/prototype/LOGIC.md +67 -0
- package/templates/monorepo/.agents/skills/prototype/SKILL.md +26 -0
- package/templates/monorepo/.agents/skills/prototype/UI.md +112 -0
- package/templates/monorepo/.agents/skills/prototype/agents/openai.yaml +3 -0
- package/templates/monorepo/.agents/skills/research/SKILL.md +12 -0
- package/templates/monorepo/.agents/skills/research/agents/openai.yaml +3 -0
- package/templates/monorepo/.agents/skills/resolving-merge-conflicts/SKILL.md +14 -0
- package/templates/monorepo/.agents/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
- package/templates/monorepo/.agents/skills/scoped-code-review/SKILL.md +113 -0
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/SKILL.md +116 -0
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/domain.md +51 -0
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +45 -0
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +46 -0
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +30 -0
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/triage-labels.md +15 -0
- package/templates/monorepo/.agents/skills/tdd/SKILL.md +38 -0
- package/templates/monorepo/.agents/skills/tdd/agents/openai.yaml +3 -0
- package/templates/monorepo/.agents/skills/tdd/mocking.md +59 -0
- package/templates/monorepo/.agents/skills/tdd/tests.md +77 -0
- package/templates/monorepo/.agents/skills/teach/GLOSSARY-FORMAT.md +35 -0
- package/templates/monorepo/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/templates/monorepo/.agents/skills/teach/MISSION-FORMAT.md +31 -0
- package/templates/monorepo/.agents/skills/teach/RESOURCES-FORMAT.md +32 -0
- package/templates/monorepo/.agents/skills/teach/SKILL.md +140 -0
- package/templates/monorepo/.agents/skills/teach/agents/openai.yaml +5 -0
- package/templates/monorepo/.agents/skills/to-questionnaire/SKILL.md +53 -0
- package/templates/monorepo/.agents/skills/to-questionnaire/agents/openai.yaml +5 -0
- package/templates/monorepo/.agents/skills/triage/AGENT-BRIEF.md +207 -0
- package/templates/monorepo/.agents/skills/triage/OUT-OF-SCOPE.md +105 -0
- package/templates/monorepo/.agents/skills/triage/SKILL.md +112 -0
- package/templates/monorepo/.agents/skills/triage/agents/openai.yaml +5 -0
- package/templates/monorepo/.agents/skills/wait-what/SKILL.md +7 -0
- package/templates/monorepo/.agents/skills/wait-what/agents/openai.yaml +5 -0
- package/templates/monorepo/.agents/skills/wayfinder/SKILL.md +128 -0
- package/templates/monorepo/.agents/skills/wayfinder/agents/openai.yaml +5 -0
- package/templates/monorepo/.agents/skills/wizard/SKILL.md +44 -0
- package/templates/monorepo/.agents/skills/wizard/agents/openai.yaml +3 -0
- package/templates/monorepo/.agents/skills/wizard/template.sh +204 -0
- package/templates/monorepo/.agents/skills/writing-for-agents/SKILL-MECHANICS.md +22 -0
- package/templates/monorepo/.agents/skills/writing-for-agents/SKILL.md +81 -0
- package/templates/monorepo/.agents/skills/writing-for-agents/agents/openai.yaml +3 -0
- package/templates/monorepo/.vscode/extensions.json +5 -0
- package/templates/monorepo/.vscode/launch.json +0 -3
- package/templates/monorepo/.vscode/settings.json +3 -1
- package/templates/monorepo/AGENTS.md +50 -0
- package/templates/monorepo/README.md +27 -0
- package/templates/monorepo/_gitignore +5 -0
- package/templates/monorepo/docs/agents/domain.md +41 -0
- package/templates/monorepo/docs/agents/issue-tracker.md +30 -0
- package/templates/monorepo/docs/agents/triage-labels.md +15 -0
- package/templates/monorepo/package.json +4 -3
- package/templates/monorepo/pnpm-workspace.yaml +23 -26
- package/templates/monorepo/turbo.json +27 -3
- package/templates/monorepo/vite.config.ts +1 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/wrangler/config-schema.json",
|
|
3
|
+
"name": "repo-server-dev",
|
|
4
|
+
"main": "./src/adapters/cloudflare/entry.ts",
|
|
5
|
+
"compatibility_date": "2026-09-23",
|
|
6
|
+
"compatibility_flags": ["nodejs_compat"],
|
|
7
|
+
"dev": {
|
|
8
|
+
"port": 6464,
|
|
9
|
+
"inspector_port": 19230,
|
|
10
|
+
},
|
|
11
|
+
"observability": {
|
|
12
|
+
"logs": {
|
|
13
|
+
"enabled": true,
|
|
14
|
+
"invocation_logs": true,
|
|
15
|
+
},
|
|
16
|
+
"traces": {
|
|
17
|
+
"enabled": false,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
"d1_databases": [
|
|
21
|
+
{
|
|
22
|
+
"binding": "DB",
|
|
23
|
+
"database_name": "repo-db",
|
|
24
|
+
"database_id": "00000000-0000-0000-0000-000000000000",
|
|
25
|
+
"migrations_dir": "../../libs/db/migrations/sqlite-d1",
|
|
26
|
+
"migrations_pattern": "../../libs/db/migrations/sqlite-d1/*/migration.sql",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Docker
|
|
2
|
+
|
|
3
|
+
Copy `docker/.env.example` to `docker/.env` and `envs/.env.example.server` to `envs/.env.server`. Build with `bash scripts/build-docker-server.sh`, then run `docker/local/local-app-deploy.sh`. Production Compose lives under `docker/prod`; copy `.env.example.server` to `.env.server` before use.
|
|
4
|
+
|
|
5
|
+
The image is a Turbo-pruned, multi-stage production deployment. It validates the Node entry and Example worker artifacts, runs as a non-root user, and checks `/health`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: ${COMPOSE_APP_NS:-hono-server-local}
|
|
2
|
+
|
|
3
|
+
services:
|
|
4
|
+
server:
|
|
5
|
+
image: ${SERVER_IMAGE:-repo/hono-server}:${SERVER_BUILD_TAG:?SERVER_BUILD_TAG is required}
|
|
6
|
+
container_name: ${COMPOSE_APP_NS:-hono-server-local}-server
|
|
7
|
+
restart: unless-stopped
|
|
8
|
+
env_file:
|
|
9
|
+
- ../../envs/.env.server
|
|
10
|
+
ports:
|
|
11
|
+
- '6464:6464'
|
|
12
|
+
healthcheck:
|
|
13
|
+
test:
|
|
14
|
+
[
|
|
15
|
+
'CMD-SHELL',
|
|
16
|
+
'node -e "require(''http'').get(''http://127.0.0.1:6464/health'',r=>process.exit(r.statusCode<500?0:1)).on(''error'',()=>process.exit(1))"',
|
|
17
|
+
]
|
|
18
|
+
interval: 30s
|
|
19
|
+
timeout: 5s
|
|
20
|
+
retries: 3
|
|
21
|
+
start_period: 30s
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
4
|
+
DOCKER_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
5
|
+
compose_args=(-f "${SCRIPT_DIR}/compose.local.app.yml")
|
|
6
|
+
if [ -f "${DOCKER_DIR}/.env" ]; then compose_args+=(--env-file "${DOCKER_DIR}/.env"); fi
|
|
7
|
+
docker compose "${compose_args[@]}" up -d --no-deps server
|
|
8
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
4
|
+
DOCKER_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
5
|
+
compose_args=(-f "${SCRIPT_DIR}/compose.local.app.yml")
|
|
6
|
+
if [ -f "${DOCKER_DIR}/.env" ]; then compose_args+=(--env-file "${DOCKER_DIR}/.env"); fi
|
|
7
|
+
docker compose "${compose_args[@]}" down --remove-orphans
|
|
8
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: ${COMPOSE_APP_NS:-hono-server-prod}
|
|
2
|
+
|
|
3
|
+
services:
|
|
4
|
+
server:
|
|
5
|
+
image: ${SERVER_IMAGE:-repo/hono-server}:${SERVER_BUILD_TAG:?SERVER_BUILD_TAG is required}
|
|
6
|
+
container_name: ${COMPOSE_APP_NS:-hono-server-prod}-server
|
|
7
|
+
restart: unless-stopped
|
|
8
|
+
env_file:
|
|
9
|
+
- ./.env.server
|
|
10
|
+
ports:
|
|
11
|
+
- '6464:6464'
|
|
12
|
+
healthcheck:
|
|
13
|
+
test:
|
|
14
|
+
[
|
|
15
|
+
'CMD-SHELL',
|
|
16
|
+
'node -e "require(''http'').get(''http://127.0.0.1:6464/health'',r=>process.exit(r.statusCode<500?0:1)).on(''error'',()=>process.exit(1))"',
|
|
17
|
+
]
|
|
18
|
+
interval: 30s
|
|
19
|
+
timeout: 5s
|
|
20
|
+
retries: 3
|
|
21
|
+
start_period: 30s
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
4
|
+
compose_args=(-f "${SCRIPT_DIR}/compose.prod.stack.yml")
|
|
5
|
+
if [ -f "${SCRIPT_DIR}/.env.docker" ]; then compose_args+=(--env-file "${SCRIPT_DIR}/.env.docker"); fi
|
|
6
|
+
docker compose "${compose_args[@]}" up --pull=always --remove-orphans -d --no-deps server
|
|
7
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# syntax=docker/dockerfile:1
|
|
2
|
+
FROM node:22.22.1-slim AS base
|
|
3
|
+
|
|
4
|
+
ENV PNPM_HOME="/pnpm"
|
|
5
|
+
ENV PATH="$PNPM_HOME/bin:$PATH"
|
|
6
|
+
RUN npm install --global pnpm@11.25.0 turbo@2.9.14
|
|
7
|
+
WORKDIR /app
|
|
8
|
+
|
|
9
|
+
FROM base AS prepare
|
|
10
|
+
COPY . .
|
|
11
|
+
RUN turbo prune @repo/server --docker
|
|
12
|
+
|
|
13
|
+
FROM base AS builder
|
|
14
|
+
ENV TURBO_TELEMETRY_DISABLED=1
|
|
15
|
+
ENV VP_GIT_HOOKS=0
|
|
16
|
+
COPY --from=prepare /app/out/json/ .
|
|
17
|
+
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
|
18
|
+
COPY --from=prepare /app/out/full/ .
|
|
19
|
+
RUN pnpm exec turbo build
|
|
20
|
+
|
|
21
|
+
FROM builder AS packager
|
|
22
|
+
RUN pnpm --filter=@repo/server --prod --legacy deploy /app/deploy
|
|
23
|
+
RUN test -f /app/deploy/dist/nodejsMain.mjs && \
|
|
24
|
+
test -f /app/deploy/dist/nodejsEntry.mjs
|
|
25
|
+
|
|
26
|
+
FROM base AS runner
|
|
27
|
+
ENV NODE_ENV=production
|
|
28
|
+
ENV NODE_PORT=6464
|
|
29
|
+
RUN groupadd --system --gid 1001 nodejs \
|
|
30
|
+
&& useradd --system --uid 1001 --gid nodejs --home-dir /app server \
|
|
31
|
+
&& mkdir -p /app/logs \
|
|
32
|
+
&& chown server:nodejs /app/logs
|
|
33
|
+
COPY --from=packager --chown=server:nodejs /app/deploy ./
|
|
34
|
+
USER server
|
|
35
|
+
EXPOSE 6464
|
|
36
|
+
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
|
|
37
|
+
CMD node -e "require('http').get('http://127.0.0.1:6464/health',r=>process.exit(r.statusCode<500?0:1)).on('error',()=>process.exit(1))"
|
|
38
|
+
CMD ["node", "--import", "dotenv/config", "dist/nodejsMain.mjs"]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
**/.DS_Store
|
|
2
|
+
**/node_modules
|
|
3
|
+
.git
|
|
4
|
+
**/.gitignore
|
|
5
|
+
plop/
|
|
6
|
+
**/dist
|
|
7
|
+
.agents
|
|
8
|
+
.vscode
|
|
9
|
+
.cursor
|
|
10
|
+
**/*.log
|
|
11
|
+
**/.turbo
|
|
12
|
+
**/.env
|
|
13
|
+
**/.env.*
|
|
14
|
+
**/__test__
|
|
15
|
+
**/__tests__
|
|
16
|
+
**/*.test.ts
|
|
17
|
+
**/coverage
|
|
18
|
+
.idea
|
|
19
|
+
docker/
|
|
20
|
+
docs/
|
|
21
|
+
.scratch/
|
|
22
|
+
.changeset/
|
|
23
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Domain Docs
|
|
2
|
+
|
|
3
|
+
How the engineering skills should consume this repo's domain documentation when exploring the codebase.
|
|
4
|
+
|
|
5
|
+
## Before exploring, read these
|
|
6
|
+
|
|
7
|
+
- **`CONTEXT-MAP.md`** at the repo root. It points at the `CONTEXT.md` file for each relevant app or library context; read the entries relevant to the topic.
|
|
8
|
+
- **`docs/adr/`** — read ADRs that touch the area you're about to work in.
|
|
9
|
+
- Context-specific `docs/adr/` directories — check the ADR directory alongside the relevant context when one exists.
|
|
10
|
+
|
|
11
|
+
If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The `/domain-modeling` skill (reached via `/grill-with-docs` and `/improve-codebase-architecture`) creates them lazily when terms or decisions actually get resolved.
|
|
12
|
+
|
|
13
|
+
## File structure
|
|
14
|
+
|
|
15
|
+
This repo uses a multi-context layout:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
/
|
|
19
|
+
├── CONTEXT-MAP.md ← index of all contexts
|
|
20
|
+
├── docs/adr/ ← system-wide decisions
|
|
21
|
+
├── apps/
|
|
22
|
+
│ └── <app>/
|
|
23
|
+
│ ├── CONTEXT.md
|
|
24
|
+
│ └── docs/adr/ ← app-specific decisions
|
|
25
|
+
└── libs/
|
|
26
|
+
└── <library>/
|
|
27
|
+
├── CONTEXT.md
|
|
28
|
+
└── docs/adr/ ← library-specific decisions
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Use the glossary's vocabulary
|
|
32
|
+
|
|
33
|
+
When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in the relevant context's `CONTEXT.md`. Don't drift to synonyms the glossary explicitly avoids.
|
|
34
|
+
|
|
35
|
+
If the concept you need isn't in the relevant glossary yet, that's a signal — either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/domain-modeling`).
|
|
36
|
+
|
|
37
|
+
## Flag ADR conflicts
|
|
38
|
+
|
|
39
|
+
If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
|
|
40
|
+
|
|
41
|
+
> _Contradicts ADR-0007 (event-sourced orders) — but worth reopening because…_
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Issue tracker: Local Markdown
|
|
2
|
+
|
|
3
|
+
Issues and specs for this repo live as markdown files in `.scratch/`.
|
|
4
|
+
|
|
5
|
+
## Conventions
|
|
6
|
+
|
|
7
|
+
- One feature per directory: `.scratch/<feature-slug>/`
|
|
8
|
+
- The spec is `.scratch/<feature-slug>/spec.md`
|
|
9
|
+
- Implementation issues are one file per ticket at `.scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01` — never a single combined tickets file
|
|
10
|
+
- Triage state is recorded as a `Status:` line near the top of each issue file (see `triage-labels.md` for the role strings)
|
|
11
|
+
- Comments and conversation history append to the bottom of the file under a `## Comments` heading
|
|
12
|
+
|
|
13
|
+
## When a skill says "publish to the issue tracker"
|
|
14
|
+
|
|
15
|
+
Create a new file under `.scratch/<feature-slug>/` (creating the directory if needed).
|
|
16
|
+
|
|
17
|
+
## When a skill says "fetch the relevant ticket"
|
|
18
|
+
|
|
19
|
+
Read the file at the referenced path. The user will normally pass the path or the issue number directly.
|
|
20
|
+
|
|
21
|
+
## Wayfinding operations
|
|
22
|
+
|
|
23
|
+
Used by `/wayfinder`. The **map** is a file with one **child** file per ticket.
|
|
24
|
+
|
|
25
|
+
- **Map**: `.scratch/<effort>/map.md` — the Notes / Decisions-so-far / Fog body.
|
|
26
|
+
- **Child ticket**: `.scratch/<effort>/issues/NN-<slug>.md`, numbered from `01`, with the question in the body. A `Type:` line records the ticket type (`research`/`prototype`/`grilling`/`task`); a `Status:` line records `claimed`/`resolved`.
|
|
27
|
+
- **Blocking**: a `Blocked by: NN, NN` line near the top. A ticket is unblocked when every file it lists is `resolved`.
|
|
28
|
+
- **Frontier**: scan `.scratch/<effort>/issues/` for files that are open, unblocked, and unclaimed; first by number wins.
|
|
29
|
+
- **Claim**: set `Status: claimed` and save before any work.
|
|
30
|
+
- **Resolve**: append the answer under an `## Answer` heading, set `Status: resolved`, then append a context pointer (gist + link) to the map's Decisions-so-far in `map.md`.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Triage Labels
|
|
2
|
+
|
|
3
|
+
The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.
|
|
4
|
+
|
|
5
|
+
| Label in mattpocock/skills | Label in our tracker | Meaning |
|
|
6
|
+
| -------------------------- | -------------------- | ---------------------------------------- |
|
|
7
|
+
| `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |
|
|
8
|
+
| `needs-info` | `needs-info` | Waiting on reporter for more information |
|
|
9
|
+
| `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |
|
|
10
|
+
| `ready-for-human` | `ready-for-human` | Requires human implementation |
|
|
11
|
+
| `wontfix` | `wontfix` | Will not be actioned |
|
|
12
|
+
|
|
13
|
+
When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.
|
|
14
|
+
|
|
15
|
+
Edit the right-hand column to match whatever vocabulary you actually use.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
NODE_PORT=6464
|
|
2
|
+
SERVER_BASE_PATH=/api
|
|
3
|
+
SERVER_ENV=local
|
|
4
|
+
LOGGER_DIR=./logs
|
|
5
|
+
LOGGER_FILE_BASE=app
|
|
6
|
+
# LOGGER_LEVEL=debug
|
|
7
|
+
CORS_DOMAINS='*'
|
|
8
|
+
# MIN_THREADS=1
|
|
9
|
+
# MAX_THREADS=4
|
|
10
|
+
# CONCURRENT_TASKS_PER_WORKER=1
|
|
11
|
+
# MAX_QUEUE=12
|
|
12
|
+
# WORKER_TASK_TIMEOUT_MS=30000
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
DB_PATH=/absolute/path/to/repo.sqlite
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import { defineConfig } from 'drizzle-kit'
|
|
3
|
+
import { d1SchemaConfig } from '@repo/definition/backend'
|
|
4
|
+
|
|
5
|
+
const configDir = import.meta.dirname
|
|
6
|
+
|
|
7
|
+
const { cloudflareAccountId, cloudflareDatabaseId, cloudflareToken } = d1SchemaConfig.resolve({
|
|
8
|
+
context: process.env,
|
|
9
|
+
matchContextKey: 'constantCase',
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
export default defineConfig({
|
|
13
|
+
dialect: 'sqlite',
|
|
14
|
+
driver: 'd1-http',
|
|
15
|
+
schema: path.join(configDir, '../src/dialects/sqlite/schema/tables.ts'),
|
|
16
|
+
out: path.join(configDir, '../migrations/sqlite-d1'),
|
|
17
|
+
dbCredentials: {
|
|
18
|
+
accountId: cloudflareAccountId,
|
|
19
|
+
databaseId: cloudflareDatabaseId,
|
|
20
|
+
token: cloudflareToken,
|
|
21
|
+
},
|
|
22
|
+
})
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import { defineConfig } from 'drizzle-kit'
|
|
3
|
+
import { ensureDatabaseDirectory } from '../src/dialects/sqlite/utils'
|
|
4
|
+
import { sqliteSchemaConfig } from '@repo/definition/backend'
|
|
5
|
+
|
|
6
|
+
const configDir = import.meta.dirname
|
|
7
|
+
|
|
8
|
+
const { dbPath } = sqliteSchemaConfig.resolve({
|
|
9
|
+
context: process.env,
|
|
10
|
+
matchContextKey: 'constantCase',
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
ensureDatabaseDirectory(dbPath)
|
|
14
|
+
|
|
15
|
+
export default defineConfig({
|
|
16
|
+
dialect: 'sqlite',
|
|
17
|
+
schema: path.join(configDir, '../src/dialects/sqlite/schema/tables.ts'),
|
|
18
|
+
out: path.join(configDir, '../migrations/sqlite'),
|
|
19
|
+
dbCredentials: {
|
|
20
|
+
url: dbPath,
|
|
21
|
+
},
|
|
22
|
+
})
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@repo/db",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
"./sqlite/d1-client": "./dist/sqlite/d1-client.mjs",
|
|
11
|
+
"./sqlite/schema": "./dist/sqlite/schema.mjs",
|
|
12
|
+
"./sqlite/sqlite": "./dist/sqlite/sqlite.mjs",
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "vp pack",
|
|
17
|
+
"dev": "vp pack --watch",
|
|
18
|
+
"test": "vp test",
|
|
19
|
+
"check": "vp check",
|
|
20
|
+
"sqlite:export": "oyo env sqlite -- drizzle-kit export --config=drizzle-kit/sqlite.config.ts",
|
|
21
|
+
"dev:sqlite:push": "oyo env sqlite -- drizzle-kit push --config=drizzle-kit/sqlite.config.ts",
|
|
22
|
+
"dev:sqlite:gen": "oyo env sqlite -- drizzle-kit generate --config=drizzle-kit/sqlite.config.ts",
|
|
23
|
+
"dev:sqlite:migrate": "oyo env sqlite -- drizzle-kit migrate --config=drizzle-kit/sqlite.config.ts",
|
|
24
|
+
"dev:d1:gen": "oyo env sqlite-d1 -- drizzle-kit generate --config=drizzle-kit/sqlite-d1.config.ts",
|
|
25
|
+
"dev:d1:migrate": "oyo env sqlite-d1 -- drizzle-kit migrate --config=drizzle-kit/sqlite-d1.config.ts"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@repo/definition": "workspace:*",
|
|
29
|
+
"better-sqlite3": "catalog:db",
|
|
30
|
+
"drizzle-orm": "catalog:db"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@oyolincc/cli": "catalog:",
|
|
34
|
+
"@oyolincc/dev-config": "catalog:",
|
|
35
|
+
"@types/better-sqlite3": "catalog:db",
|
|
36
|
+
"@types/node": "catalog:",
|
|
37
|
+
"drizzle-kit": "catalog:db",
|
|
38
|
+
"tsx": "catalog:",
|
|
39
|
+
"typescript": "catalog:",
|
|
40
|
+
"vite-plus": "catalog:"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import Database from 'better-sqlite3'
|
|
2
|
+
import { drizzle } from 'drizzle-orm/better-sqlite3'
|
|
3
|
+
import { relations, type SqliteDBType } from './schema'
|
|
4
|
+
import { ensureDatabaseDirectory } from './utils'
|
|
5
|
+
|
|
6
|
+
export type SqliteDatabase = SqliteDBType
|
|
7
|
+
|
|
8
|
+
export interface SqliteClient {
|
|
9
|
+
db: SqliteDatabase
|
|
10
|
+
close(): void
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function createSqliteClient(databaseFile: string): SqliteClient {
|
|
14
|
+
if (!databaseFile) throw new Error('databaseFile must not be empty')
|
|
15
|
+
|
|
16
|
+
ensureDatabaseDirectory(databaseFile)
|
|
17
|
+
|
|
18
|
+
const client = new Database(databaseFile)
|
|
19
|
+
client.pragma('foreign_keys = ON')
|
|
20
|
+
if (databaseFile !== ':memory:') client.pragma('journal_mode = WAL')
|
|
21
|
+
|
|
22
|
+
const db = drizzle({ client, relations })
|
|
23
|
+
|
|
24
|
+
let closed = false
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
db,
|
|
28
|
+
close() {
|
|
29
|
+
if (!closed) {
|
|
30
|
+
client.close()
|
|
31
|
+
closed = true
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { drizzle, type AnyD1Database } from 'drizzle-orm/d1'
|
|
2
|
+
import { relations } from './schema'
|
|
3
|
+
|
|
4
|
+
export type D1Binding = AnyD1Database
|
|
5
|
+
|
|
6
|
+
export function createD1Client(database: D1Binding) {
|
|
7
|
+
if (!database) throw new Error('database must not be empty')
|
|
8
|
+
|
|
9
|
+
const db = drizzle(database, { relations })
|
|
10
|
+
|
|
11
|
+
return { db }
|
|
12
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { sql } from 'drizzle-orm'
|
|
2
|
+
import { customType, integer, text } from 'drizzle-orm/sqlite-core'
|
|
3
|
+
|
|
4
|
+
export const idType = customType<{ data: string; driverData: number | bigint }>({
|
|
5
|
+
dataType() {
|
|
6
|
+
return 'integer'
|
|
7
|
+
},
|
|
8
|
+
fromDriver(value) {
|
|
9
|
+
return String(value)
|
|
10
|
+
},
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
export const autoIncrementId = (name: string) =>
|
|
14
|
+
idType(name)
|
|
15
|
+
.primaryKey({ autoIncrement: true })
|
|
16
|
+
.$defaultFn(() => sql`null`)
|
|
17
|
+
|
|
18
|
+
export function timestampMsColumn(name: string) {
|
|
19
|
+
return integer(name, { mode: 'timestamp_ms' })
|
|
20
|
+
.notNull()
|
|
21
|
+
.default(sql`(unixepoch('subsec') * 1000)`)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const updatedAtCol = () => timestampMsColumn('updated_at').$onUpdateFn(() => new Date())
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* createdAt 和 updatedAt 是数据库行的创建/修改时间,SQLite 保存毫秒时间戳,代码里使用 Date。
|
|
28
|
+
* syncState.updatedTime 是客户端同步版本号,和这两个时间不是一回事,不要混用。
|
|
29
|
+
*/
|
|
30
|
+
export const modifiedTimeCols = () => ({
|
|
31
|
+
createdAt: timestampMsColumn('created_at'),
|
|
32
|
+
updatedAt: updatedAtCol(),
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
export function jsonColumn<T>(name: string) {
|
|
36
|
+
return text(name, { mode: 'json' }).$type<T>()
|
|
37
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { sqliteTable, text } from 'drizzle-orm/sqlite-core'
|
|
2
|
+
import { autoIncrementId, modifiedTimeCols } from '../../columns'
|
|
3
|
+
import type { SelectVOResults } from '@/shared/types'
|
|
4
|
+
import { defineVO } from '@/shared/types'
|
|
5
|
+
|
|
6
|
+
export const examples = sqliteTable('examples', {
|
|
7
|
+
id: autoIncrementId('id'),
|
|
8
|
+
message: text('message').notNull(),
|
|
9
|
+
...modifiedTimeCols(),
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
export type InsertExample = typeof examples.$inferInsert
|
|
13
|
+
|
|
14
|
+
export const voExamples = defineVO({
|
|
15
|
+
id: examples.id,
|
|
16
|
+
message: examples.message,
|
|
17
|
+
createdAt: examples.createdAt,
|
|
18
|
+
updatedAt: examples.updatedAt,
|
|
19
|
+
})
|
|
20
|
+
export type IExamplesVO = SelectVOResults<typeof voExamples>
|
|
21
|
+
|
|
22
|
+
export const vcExamples = { default: voExamples } as const
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3'
|
|
2
|
+
import type { AnySQLiteColumn, AnySQLiteTable } from 'drizzle-orm/sqlite-core'
|
|
3
|
+
import type { relations } from './relations'
|
|
4
|
+
|
|
5
|
+
export type SqliteDBType = BetterSQLite3Database<typeof relations>
|
|
6
|
+
export type SqliteTableType = AnySQLiteTable
|
|
7
|
+
export type SqliteColType = AnySQLiteColumn
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { vcExamples, voExamples, type IExamplesVO } from './modules/examples/examples'
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { mkdirSync } from 'node:fs'
|
|
2
|
+
import { dirname } from 'node:path'
|
|
3
|
+
|
|
4
|
+
export function ensureDatabaseDirectory(databaseFile: string): void {
|
|
5
|
+
if (!databaseFile || databaseFile === ':memory:') return
|
|
6
|
+
|
|
7
|
+
mkdirSync(dirname(databaseFile), { recursive: true })
|
|
8
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AnyColumn, GetColumnData, InferModelFromColumns, Table } from 'drizzle-orm'
|
|
2
|
+
|
|
3
|
+
export type AnyTableType = Table
|
|
4
|
+
export type AnyColType = AnyColumn
|
|
5
|
+
|
|
6
|
+
export type TableColsMap<T extends AnyTableType> = T['_']['columns']
|
|
7
|
+
export type TableField<T extends AnyTableType> = keyof TableColsMap<T> & string
|
|
8
|
+
export type TableFieldValue<T extends AnyTableType, K extends TableField<T>> = GetColumnData<
|
|
9
|
+
TableColsMap<T>[K],
|
|
10
|
+
'query'
|
|
11
|
+
>
|
|
12
|
+
|
|
13
|
+
export type VO<TColumn extends AnyColType = AnyColType> = Record<string, TColumn>
|
|
14
|
+
export type InsertModel<T extends AnyTableType> = InferModelFromColumns<TableColsMap<T>, 'insert'>
|
|
15
|
+
|
|
16
|
+
export function defineVO<T extends VO>(vo: T): T {
|
|
17
|
+
return vo
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type SelectVOResults<V extends VO> = {
|
|
21
|
+
[K in keyof V]: GetColumnData<V[K], 'query'>
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type VOColsOption<V extends VO> = {
|
|
25
|
+
[K in keyof V]: true
|
|
26
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineConfig } from 'vite-plus'
|
|
2
|
+
import { packConfig } from '@oyolincc/dev-config'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
|
|
5
|
+
const __dirname = import.meta.dirname
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
test: {
|
|
9
|
+
clearMocks: false,
|
|
10
|
+
},
|
|
11
|
+
pack: {
|
|
12
|
+
...packConfig,
|
|
13
|
+
entry: {
|
|
14
|
+
'sqlite/schema': 'src/dialects/sqlite/schema/index.ts',
|
|
15
|
+
'sqlite/sqlite': 'src/dialects/sqlite/client.ts',
|
|
16
|
+
'sqlite/d1-client': 'src/dialects/sqlite/d1-client.ts',
|
|
17
|
+
},
|
|
18
|
+
exports: true,
|
|
19
|
+
},
|
|
20
|
+
resolve: {
|
|
21
|
+
alias: {
|
|
22
|
+
'@': path.resolve(__dirname, './src'),
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
})
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@repo/definition",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
"./backend": "./dist/backend.mjs",
|
|
11
|
+
"./package.json": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "vp pack",
|
|
15
|
+
"dev": "vp pack --watch",
|
|
16
|
+
"test": "vp test",
|
|
17
|
+
"check": "vp check"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"change-case": "catalog:shared",
|
|
21
|
+
"valibot": "catalog:shared"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@oyolincc/dev-config": "catalog:",
|
|
25
|
+
"@types/node": "catalog:",
|
|
26
|
+
"typescript": "catalog:",
|
|
27
|
+
"vite-plus": "catalog:"
|
|
28
|
+
}
|
|
29
|
+
}
|