prjct-cli 0.28.4 → 0.29.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/CHANGELOG.md +26 -161
- package/CLAUDE.md +170 -0
- package/README.md +14 -1
- package/core/agentic/agent-router.ts +0 -15
- package/core/agentic/command-executor.ts +5 -53
- package/core/agentic/index.ts +1 -11
- package/core/agentic/memory-system.ts +5 -44
- package/core/agentic/prompt-builder.ts +2 -83
- package/core/agentic/smart-context.ts +64 -36
- package/core/agentic/template-loader.ts +32 -107
- package/core/commands/command-data.ts +33 -0
- package/core/commands/commands.ts +12 -4
- package/core/commands/registry.ts +37 -0
- package/core/domain/agent-loader.ts +9 -7
- package/core/domain/context-estimator.ts +15 -15
- package/core/index.ts +2 -0
- package/core/infrastructure/config-manager.ts +4 -25
- package/core/infrastructure/path-manager.ts +7 -7
- package/core/infrastructure/setup.ts +182 -86
- package/core/integrations/issue-tracker/enricher.ts +281 -0
- package/core/integrations/issue-tracker/index.ts +8 -0
- package/core/integrations/issue-tracker/manager.ts +284 -0
- package/core/integrations/issue-tracker/types.ts +321 -0
- package/core/integrations/linear/client.ts +375 -0
- package/core/integrations/linear/index.ts +6 -0
- package/core/integrations/notion/client.ts +413 -0
- package/core/integrations/notion/index.ts +46 -0
- package/core/integrations/notion/setup.ts +235 -0
- package/core/integrations/notion/sync.ts +818 -0
- package/core/integrations/notion/templates.ts +246 -0
- package/core/plugin/builtin/notion.ts +178 -0
- package/core/schemas/enriched-task.ts +278 -0
- package/core/schemas/outcomes.ts +471 -14
- package/core/schemas/prd.ts +437 -0
- package/core/schemas/roadmap.ts +188 -4
- package/core/server/index.ts +1 -0
- package/core/server/routes-extended.ts +544 -0
- package/core/server/server.ts +10 -0
- package/core/session/session-log-manager.ts +0 -17
- package/core/types/config.ts +1 -1
- package/core/types/index.ts +2 -0
- package/core/types/integrations.ts +56 -20
- package/core/types/storage.ts +8 -0
- package/core/types/task.ts +4 -0
- package/dist/bin/prjct.mjs +1457 -765
- package/package.json +2 -1
- package/packages/shared/node_modules/@types/bun/LICENSE +21 -0
- package/packages/shared/node_modules/@types/bun/README.md +20 -0
- package/packages/shared/node_modules/@types/bun/index.d.ts +1 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/CLAUDE.md +105 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/README.md +33 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/bun.d.ts +7032 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/bun.ns.d.ts +5 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/bundle.d.ts +74 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/deprecated.d.ts +184 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/devserver.d.ts +187 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/README.md +28 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/bytecode.mdx +465 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/css.mdx +1024 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/esbuild.mdx +298 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/executables.mdx +1277 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/fullstack.mdx +1086 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/hot-reloading.mdx +229 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/html-static.mdx +488 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/index.mdx +1604 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/loaders.mdx +451 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/macros.mdx +328 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/minifier.mdx +1286 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/plugins.mdx +425 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/feedback.mdx +75 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/arraybuffer-to-array.mdx +29 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/arraybuffer-to-blob.mdx +26 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/arraybuffer-to-buffer.mdx +27 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/arraybuffer-to-string.mdx +17 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/arraybuffer-to-typedarray.mdx +41 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/blob-to-arraybuffer.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/blob-to-dataview.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/blob-to-stream.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/blob-to-string.mdx +17 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/blob-to-typedarray.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/buffer-to-arraybuffer.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/buffer-to-blob.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/buffer-to-readablestream.mdx +43 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/buffer-to-string.mdx +27 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/buffer-to-typedarray.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/dataview-to-string.mdx +17 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/typedarray-to-arraybuffer.mdx +27 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/typedarray-to-blob.mdx +18 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/typedarray-to-buffer.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/typedarray-to-dataview.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/typedarray-to-readablestream.mdx +43 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/typedarray-to-string.mdx +18 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/deployment/aws-lambda.mdx +204 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/deployment/digital-ocean.mdx +161 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/deployment/google-cloud-run.mdx +194 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/deployment/railway.mdx +145 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/deployment/render.mdx +82 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/deployment/vercel.mdx +97 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/astro.mdx +82 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/discordjs.mdx +80 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/docker.mdx +151 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/drizzle.mdx +195 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/elysia.mdx +31 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/express.mdx +43 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/gel.mdx +261 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/hono.mdx +47 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/mongoose.mdx +92 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/neon-drizzle.mdx +234 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/neon-serverless-postgres.mdx +60 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/nextjs.mdx +103 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/nuxt.mdx +96 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/pm2.mdx +55 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/prisma-postgres.mdx +169 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/prisma.mdx +164 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/qwik.mdx +114 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/react.mdx +52 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/remix.mdx +97 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/sentry.mdx +54 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/solidstart.mdx +62 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/ssr-react.mdx +49 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/stric.mdx +54 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/sveltekit.mdx +138 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/systemd.mdx +114 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/tanstack-start.mdx +791 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/upstash.mdx +87 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/vite.mdx +77 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/html-rewriter/extract-links.mdx +71 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/html-rewriter/extract-social-meta.mdx +97 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/cluster.mdx +69 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/fetch-unix.mdx +35 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/fetch.mdx +26 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/file-uploads.mdx +97 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/hot.mdx +28 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/proxy.mdx +50 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/server.mdx +48 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/simple.mdx +20 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/stream-file.mdx +50 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/stream-iterator.mdx +49 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/stream-node-streams-in-bun.mdx +22 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/tls.mdx +32 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/index.mdx +10 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/add-dev.mdx +28 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/add-git.mdx +40 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/add-optional.mdx +27 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/add-peer.mdx +45 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/add-tarball.mdx +35 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/add.mdx +44 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/azure-artifacts.mdx +76 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/cicd.mdx +43 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/custom-registry.mdx +32 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/from-npm-install-to-bun-install.mdx +230 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/git-diff-bun-lockfile.mdx +48 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/jfrog-artifactory.mdx +28 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/npm-alias.mdx +25 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/registry-scope.mdx +40 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/trusted.mdx +52 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/workspaces.mdx +70 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/yarnlock.mdx +51 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/argv.mdx +66 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/ctrl-c.mdx +18 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/ipc.mdx +69 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/nanoseconds.mdx +15 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/os-signals.mdx +31 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/spawn-stderr.mdx +34 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/spawn-stdout.mdx +28 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/spawn.mdx +43 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/stdin.mdx +62 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/arraybuffer.mdx +30 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/buffer.mdx +21 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/exists.mdx +18 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/json.mdx +19 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/mime.mdx +22 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/stream.mdx +28 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/string.mdx +24 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/uint8array.mdx +23 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/watch.mdx +66 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/build-time-constants.mdx +295 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/cicd.mdx +45 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/codesign-macos-executable.mdx +61 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/define-constant.mdx +149 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/delete-directory.mdx +39 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/delete-file.mdx +21 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/heap-snapshot.mdx +28 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/import-html.mdx +15 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/import-json.mdx +46 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/import-toml.mdx +32 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/import-yaml.mdx +104 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/read-env.mdx +37 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/set-env.mdx +51 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/shell.mdx +42 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/timezone.mdx +38 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/tsconfig-paths.mdx +31 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/typescript.mdx +51 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/vscode-debugger.mdx +47 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/web-debugger.mdx +103 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/node-readable-to-arraybuffer.mdx +13 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/node-readable-to-blob.mdx +13 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/node-readable-to-json.mdx +14 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/node-readable-to-string.mdx +14 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/node-readable-to-uint8array.mdx +13 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-array.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-arraybuffer.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-blob.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-buffer.mdx +17 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-json.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-string.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-typedarray.mdx +24 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/bail.mdx +24 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/concurrent-test-glob.mdx +146 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/coverage-threshold.mdx +67 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/coverage.mdx +49 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/happy-dom.mdx +73 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/migrate-from-jest.mdx +125 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/mock-clock.mdx +50 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/mock-functions.mdx +70 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/rerun-each.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/run-tests.mdx +116 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/skip-tests.mdx +43 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/snapshot.mdx +102 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/spy-on.mdx +49 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/svelte-test.mdx +113 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/testing-library.mdx +93 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/timeout.mdx +17 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/todo-tests.mdx +74 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/update-snapshots.mdx +49 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/watch-mode.mdx +24 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/base64.mdx +17 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/deep-equals.mdx +41 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/deflate.mdx +20 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/detect-bun.mdx +28 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/entrypoint.mdx +19 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/escape-html.mdx +24 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/file-url-to-path.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/gzip.mdx +20 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/hash-a-password.mdx +56 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/import-meta-dir.mdx +15 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/import-meta-file.mdx +15 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/import-meta-path.mdx +15 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/javascript-uuid.mdx +25 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/main.mdx +43 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/path-to-file-url.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/sleep.mdx +24 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/upgrade.mdx +93 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/version.mdx +23 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/which-path-to-executable-bin.mdx +17 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/websocket/compression.mdx +33 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/websocket/context.mdx +79 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/websocket/pubsub.mdx +43 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/websocket/simple.mdx +38 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/append.mdx +54 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/basic.mdx +46 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/blob.mdx +30 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/cat.mdx +19 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/file-cp.mdx +18 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/filesink.mdx +54 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/response.mdx +19 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/stdout.mdx +23 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/stream.mdx +19 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/unlink.mdx +18 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/index.mdx +133 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/installation.mdx +365 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/bunx.mdx +91 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/catalogs.mdx +292 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/add.mdx +179 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/audit.mdx +60 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/info.mdx +70 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/install.mdx +606 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/link.mdx +61 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/outdated.mdx +197 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/patch.mdx +69 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/pm.mdx +323 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/publish.mdx +131 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/remove.mdx +16 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/update.mdx +140 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/why.mdx +84 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/filter.mdx +102 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/global-cache.mdx +72 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/isolated-installs.mdx +220 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/lifecycle.mdx +64 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/lockfile.mdx +64 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/npmrc.mdx +111 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/overrides.mdx +83 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/scopes-registries.mdx +35 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/security-scanner-api.mdx +95 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/workspaces.mdx +115 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/benchmarking.mdx +241 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/bindgen.mdx +223 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/building-windows.mdx +133 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/contributing.mdx +388 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/feedback.mdx +20 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/license.mdx +78 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/roadmap.mdx +8 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/quickstart.mdx +251 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/auto-install.mdx +97 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/binary-data.mdx +846 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/bun-apis.mdx +59 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/bunfig.mdx +723 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/c-compiler.mdx +204 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/child-process.mdx +659 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/color.mdx +267 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/console.mdx +67 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/cookies.mdx +454 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/debugger.mdx +335 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/environment-variables.mdx +231 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/ffi.mdx +565 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/file-io.mdx +306 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/file-system-router.mdx +118 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/file-types.mdx +435 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/glob.mdx +181 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/globals.mdx +72 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/hashing.mdx +315 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/html-rewriter.mdx +333 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/cookies.mdx +79 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/error-handling.mdx +40 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/metrics.mdx +36 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/routing.mdx +289 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/server.mdx +645 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/tls.mdx +101 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/websockets.mdx +414 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/index.mdx +223 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/jsx.mdx +115 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/module-resolution.mdx +374 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/networking/dns.mdx +111 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/networking/fetch.mdx +484 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/networking/tcp.mdx +239 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/networking/udp.mdx +129 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/node-api.mdx +19 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/nodejs-compat.mdx +468 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/plugins.mdx +419 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/redis.mdx +583 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/s3.mdx +863 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/secrets.mdx +340 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/semver.mdx +57 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/shell.mdx +637 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/sql.mdx +1404 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/sqlite.mdx +721 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/streams.mdx +232 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/templating/create.mdx +269 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/templating/init.mdx +58 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/transpiler.mdx +288 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/typescript.mdx +58 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/utils.mdx +922 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/watch-mode.mdx +161 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/web-apis.mdx +29 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/workers.mdx +314 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/yaml.mdx +469 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/add.mdx +166 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/build.mdx +196 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/bunx.mdx +49 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/feedback.mdx +17 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/init.mdx +84 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/install.mdx +173 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/link.mdx +163 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/outdated.mdx +140 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/patch.mdx +171 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/publish.mdx +198 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/remove.mdx +146 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/run.mdx +293 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/test.mdx +100 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/update.mdx +144 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/code-coverage.mdx +409 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/configuration.mdx +514 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/dates-times.mdx +129 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/discovery.mdx +90 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/dom.mdx +226 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/index.mdx +380 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/lifecycle.mdx +366 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/mocks.mdx +637 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/reporters.mdx +126 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/runtime-behavior.mdx +342 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/snapshots.mdx +434 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/writing-tests.mdx +672 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/typescript.mdx +54 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/extensions.d.ts +35 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/fetch.d.ts +79 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/ffi.d.ts +1154 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/globals.d.ts +2067 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/html-rewriter.d.ts +186 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/index.d.ts +32 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/jsc.d.ts +233 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/overrides.d.ts +376 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/package.json +37 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/redis.d.ts +3352 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/s3.d.ts +1299 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/security.d.ts +101 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/serve.d.ts +1296 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/shell.d.ts +380 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/sql.d.ts +887 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/sqlite.d.ts +1321 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/test-globals.d.ts +22 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/test.d.ts +2391 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/vendor/expect-type/branding.d.ts +283 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/vendor/expect-type/index.d.ts +1207 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/vendor/expect-type/messages.d.ts +395 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/vendor/expect-type/overloads.d.ts +669 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/vendor/expect-type/utils.d.ts +431 -0
- package/packages/shared/node_modules/@types/bun/node_modules/bun-types/wasm.d.ts +193 -0
- package/packages/shared/node_modules/@types/bun/package.json +53 -0
- package/scripts/postinstall.js +69 -0
- package/templates/agentic/agents/uxui.md +218 -0
- package/templates/agentic/subagent-generation.md +81 -241
- package/templates/commands/bug.md +392 -51
- package/templates/commands/cleanup.md +0 -5
- package/templates/commands/dashboard.md +686 -0
- package/templates/commands/done.md +232 -53
- package/templates/commands/enrich.md +345 -0
- package/templates/commands/feature.md +46 -0
- package/templates/commands/impact.md +864 -0
- package/templates/commands/init.md +44 -1
- package/templates/commands/linear.md +287 -0
- package/templates/commands/now.md +53 -0
- package/templates/commands/plan.md +696 -0
- package/templates/commands/prd.md +356 -0
- package/templates/commands/ship.md +589 -87
- package/templates/commands/sync.md +766 -180
- package/templates/commands/task.md +333 -51
- package/templates/context/dashboard.md +256 -0
- package/templates/context/roadmap.md +221 -0
- package/templates/global/CLAUDE.md +161 -101
- package/templates/mcp-config.json +46 -23
- package/templates/skills/notion-push.md +116 -0
- package/templates/skills/notion-setup.md +199 -0
- package/templates/skills/notion-sync.md +290 -0
- package/templates/subagents/domain/backend.md +106 -0
- package/templates/subagents/domain/database.md +118 -0
- package/templates/subagents/domain/devops.md +149 -0
- package/templates/subagents/domain/frontend.md +100 -0
- package/templates/subagents/domain/testing.md +166 -0
- package/templates/subagents/pm-expert.md +366 -0
- package/templates/subagents/workflow/chief-architect.md +657 -0
- package/core/agentic/token-estimator.ts +0 -264
- package/core/infrastructure/slash-command-registry.ts +0 -176
- package/templates/commands/setup-statusline.md +0 -138
- package/templates/guides/agent-generation.md +0 -164
- package/templates/guides/claude-code-ux.md +0 -232
- package/templates/guides/integrations.md +0 -149
- package/templates/shared/git-operations.md +0 -68
- package/templates/shared/io-patterns.md +0 -72
- package/templates/shared/standard.md +0 -70
- package/templates/shared/validation.md +0 -75
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notion Database Templates
|
|
3
|
+
* Schemas for auto-creating prjct databases in Notion.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { NotionDatabaseSchema } from './client'
|
|
7
|
+
|
|
8
|
+
// =============================================================================
|
|
9
|
+
// Database Schemas
|
|
10
|
+
// =============================================================================
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Shipped Features Database Schema
|
|
14
|
+
* Tracks shipped features with metrics
|
|
15
|
+
*/
|
|
16
|
+
export const SHIPPED_DATABASE_SCHEMA: NotionDatabaseSchema = {
|
|
17
|
+
title: 'prjct: Shipped Features',
|
|
18
|
+
properties: {
|
|
19
|
+
Name: { type: 'title', title: {} },
|
|
20
|
+
Version: { type: 'rich_text', rich_text: {} },
|
|
21
|
+
Type: {
|
|
22
|
+
type: 'select',
|
|
23
|
+
select: {
|
|
24
|
+
options: [
|
|
25
|
+
{ name: 'feature', color: 'blue' },
|
|
26
|
+
{ name: 'fix', color: 'red' },
|
|
27
|
+
{ name: 'improvement', color: 'green' },
|
|
28
|
+
{ name: 'refactor', color: 'purple' },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
'Shipped Date': { type: 'date', date: {} },
|
|
33
|
+
'Lines Changed': { type: 'number', number: { format: 'number' } },
|
|
34
|
+
'Files Changed': { type: 'number', number: { format: 'number' } },
|
|
35
|
+
Commits: { type: 'number', number: { format: 'number' } },
|
|
36
|
+
Duration: { type: 'rich_text', rich_text: {} },
|
|
37
|
+
Description: { type: 'rich_text', rich_text: {} },
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Roadmap Database Schema
|
|
43
|
+
* Tracks feature roadmap and progress
|
|
44
|
+
*/
|
|
45
|
+
export const ROADMAP_DATABASE_SCHEMA: NotionDatabaseSchema = {
|
|
46
|
+
title: 'prjct: Roadmap',
|
|
47
|
+
properties: {
|
|
48
|
+
Feature: { type: 'title', title: {} },
|
|
49
|
+
Status: {
|
|
50
|
+
type: 'status',
|
|
51
|
+
status: {
|
|
52
|
+
options: [
|
|
53
|
+
{ name: 'Planned', color: 'gray' },
|
|
54
|
+
{ name: 'Active', color: 'blue' },
|
|
55
|
+
{ name: 'Completed', color: 'green' },
|
|
56
|
+
{ name: 'Shipped', color: 'purple' },
|
|
57
|
+
],
|
|
58
|
+
groups: [
|
|
59
|
+
{ name: 'To Do', option_ids: [], color: 'gray' },
|
|
60
|
+
{ name: 'In Progress', option_ids: [], color: 'blue' },
|
|
61
|
+
{ name: 'Done', option_ids: [], color: 'green' },
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
Priority: {
|
|
66
|
+
type: 'select',
|
|
67
|
+
select: {
|
|
68
|
+
options: [
|
|
69
|
+
{ name: 'High', color: 'red' },
|
|
70
|
+
{ name: 'Medium', color: 'yellow' },
|
|
71
|
+
{ name: 'Low', color: 'gray' },
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
Progress: { type: 'number', number: { format: 'percent' } },
|
|
76
|
+
Phase: { type: 'rich_text', rich_text: {} },
|
|
77
|
+
'Target Date': { type: 'date', date: {} },
|
|
78
|
+
Description: { type: 'rich_text', rich_text: {} },
|
|
79
|
+
Tasks: { type: 'number', number: { format: 'number' } },
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Ideas Database Schema
|
|
85
|
+
* Captures and tracks ideas
|
|
86
|
+
*/
|
|
87
|
+
export const IDEAS_DATABASE_SCHEMA: NotionDatabaseSchema = {
|
|
88
|
+
title: 'prjct: Ideas',
|
|
89
|
+
properties: {
|
|
90
|
+
Idea: { type: 'title', title: {} },
|
|
91
|
+
Status: {
|
|
92
|
+
type: 'status',
|
|
93
|
+
status: {
|
|
94
|
+
options: [
|
|
95
|
+
{ name: 'Pending', color: 'gray' },
|
|
96
|
+
{ name: 'Converted', color: 'green' },
|
|
97
|
+
{ name: 'Archived', color: 'default' },
|
|
98
|
+
],
|
|
99
|
+
groups: [
|
|
100
|
+
{ name: 'Not Started', option_ids: [], color: 'gray' },
|
|
101
|
+
{ name: 'Done', option_ids: [], color: 'green' },
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
Priority: {
|
|
106
|
+
type: 'select',
|
|
107
|
+
select: {
|
|
108
|
+
options: [
|
|
109
|
+
{ name: 'high', color: 'red' },
|
|
110
|
+
{ name: 'medium', color: 'yellow' },
|
|
111
|
+
{ name: 'low', color: 'gray' },
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
Tags: { type: 'multi_select', multi_select: { options: [] } },
|
|
116
|
+
Created: { type: 'date', date: {} },
|
|
117
|
+
'Converted To': { type: 'rich_text', rich_text: {} },
|
|
118
|
+
},
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Active Tasks Database Schema
|
|
123
|
+
* Tracks current task queue
|
|
124
|
+
*/
|
|
125
|
+
export const TASKS_DATABASE_SCHEMA: NotionDatabaseSchema = {
|
|
126
|
+
title: 'prjct: Active Tasks',
|
|
127
|
+
properties: {
|
|
128
|
+
Task: { type: 'title', title: {} },
|
|
129
|
+
Priority: {
|
|
130
|
+
type: 'select',
|
|
131
|
+
select: {
|
|
132
|
+
options: [
|
|
133
|
+
{ name: 'critical', color: 'red' },
|
|
134
|
+
{ name: 'high', color: 'orange' },
|
|
135
|
+
{ name: 'medium', color: 'yellow' },
|
|
136
|
+
{ name: 'low', color: 'gray' },
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
Type: {
|
|
141
|
+
type: 'select',
|
|
142
|
+
select: {
|
|
143
|
+
options: [
|
|
144
|
+
{ name: 'feature', color: 'blue' },
|
|
145
|
+
{ name: 'bug', color: 'red' },
|
|
146
|
+
{ name: 'improvement', color: 'green' },
|
|
147
|
+
{ name: 'chore', color: 'gray' },
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
Section: {
|
|
152
|
+
type: 'select',
|
|
153
|
+
select: {
|
|
154
|
+
options: [
|
|
155
|
+
{ name: 'active', color: 'blue' },
|
|
156
|
+
{ name: 'backlog', color: 'gray' },
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
Completed: { type: 'checkbox', checkbox: {} },
|
|
161
|
+
Agent: { type: 'rich_text', rich_text: {} },
|
|
162
|
+
Feature: { type: 'rich_text', rich_text: {} },
|
|
163
|
+
Created: { type: 'date', date: {} },
|
|
164
|
+
'Completed At': { type: 'date', date: {} },
|
|
165
|
+
},
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// =============================================================================
|
|
169
|
+
// Dashboard Template
|
|
170
|
+
// =============================================================================
|
|
171
|
+
|
|
172
|
+
export interface DashboardMetrics {
|
|
173
|
+
shippedCount: number
|
|
174
|
+
ideasPending: number
|
|
175
|
+
tasksActive: number
|
|
176
|
+
roadmapProgress: number // 0-100
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Dashboard page content template with metrics
|
|
181
|
+
*/
|
|
182
|
+
export function getDashboardContent(
|
|
183
|
+
projectName: string,
|
|
184
|
+
databases: {
|
|
185
|
+
shipped?: string
|
|
186
|
+
roadmap?: string
|
|
187
|
+
ideas?: string
|
|
188
|
+
tasks?: string
|
|
189
|
+
},
|
|
190
|
+
metrics?: DashboardMetrics
|
|
191
|
+
): string {
|
|
192
|
+
const sections: string[] = []
|
|
193
|
+
|
|
194
|
+
sections.push(`# ${projectName} Dashboard`)
|
|
195
|
+
sections.push('')
|
|
196
|
+
|
|
197
|
+
// Metrics section
|
|
198
|
+
if (metrics) {
|
|
199
|
+
sections.push('## Metrics')
|
|
200
|
+
sections.push('')
|
|
201
|
+
sections.push('| Metric | Value |')
|
|
202
|
+
sections.push('|--------|-------|')
|
|
203
|
+
sections.push(`| Features Shipped | ${metrics.shippedCount} |`)
|
|
204
|
+
sections.push(`| Ideas Pending | ${metrics.ideasPending} |`)
|
|
205
|
+
sections.push(`| Active Tasks | ${metrics.tasksActive} |`)
|
|
206
|
+
sections.push(`| Roadmap Progress | ${metrics.roadmapProgress}% |`)
|
|
207
|
+
sections.push('')
|
|
208
|
+
} else {
|
|
209
|
+
sections.push('*Metrics will appear after first sync*')
|
|
210
|
+
sections.push('')
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Database links
|
|
214
|
+
sections.push('## Databases')
|
|
215
|
+
sections.push('')
|
|
216
|
+
|
|
217
|
+
if (databases.shipped) {
|
|
218
|
+
sections.push(`- **Shipped Features**: Track released features and metrics`)
|
|
219
|
+
}
|
|
220
|
+
if (databases.roadmap) {
|
|
221
|
+
sections.push(`- **Roadmap**: Feature planning and progress`)
|
|
222
|
+
}
|
|
223
|
+
if (databases.ideas) {
|
|
224
|
+
sections.push(`- **Ideas**: Captured ideas and status`)
|
|
225
|
+
}
|
|
226
|
+
if (databases.tasks) {
|
|
227
|
+
sections.push(`- **Active Tasks**: Current task queue`)
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
sections.push('')
|
|
231
|
+
sections.push('---')
|
|
232
|
+
sections.push('Synced by [prjct-cli](https://prjct.app)')
|
|
233
|
+
|
|
234
|
+
return sections.join('\n')
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// =============================================================================
|
|
238
|
+
// All Schemas Export
|
|
239
|
+
// =============================================================================
|
|
240
|
+
|
|
241
|
+
export const ALL_DATABASE_SCHEMAS = {
|
|
242
|
+
shipped: SHIPPED_DATABASE_SCHEMA,
|
|
243
|
+
roadmap: ROADMAP_DATABASE_SCHEMA,
|
|
244
|
+
ideas: IDEAS_DATABASE_SCHEMA,
|
|
245
|
+
tasks: TASKS_DATABASE_SCHEMA,
|
|
246
|
+
} as const
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notion Plugin for prjct-cli
|
|
3
|
+
*
|
|
4
|
+
* Syncs prjct data to Notion databases on events.
|
|
5
|
+
* Activated when project has integrations.notion.enabled = true
|
|
6
|
+
*
|
|
7
|
+
* @version 1.0.0
|
|
8
|
+
*
|
|
9
|
+
* Configuration in GlobalConfig.integrations.notion:
|
|
10
|
+
* {
|
|
11
|
+
* "enabled": true,
|
|
12
|
+
* "databases": {
|
|
13
|
+
* "shipped": "notion-db-id",
|
|
14
|
+
* "ideas": "notion-db-id"
|
|
15
|
+
* },
|
|
16
|
+
* "syncOn": { "ship": true, "idea": true }
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { HookPoints } from '../hooks'
|
|
21
|
+
import type { NotionIntegrationConfig } from '../../types/integrations'
|
|
22
|
+
import type { ShippedFeature, Idea } from '../../types/storage'
|
|
23
|
+
import { notionClient, syncShippedFeature, syncIdea } from '../../integrations/notion'
|
|
24
|
+
|
|
25
|
+
interface NotionPluginContext {
|
|
26
|
+
projectId: string
|
|
27
|
+
config: NotionIntegrationConfig
|
|
28
|
+
apiToken?: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const plugin = {
|
|
32
|
+
name: 'notion',
|
|
33
|
+
version: '1.0.0',
|
|
34
|
+
description: 'Sync prjct data to Notion',
|
|
35
|
+
|
|
36
|
+
// Plugin state
|
|
37
|
+
enabled: false,
|
|
38
|
+
projectId: null as string | null,
|
|
39
|
+
config: null as NotionIntegrationConfig | null,
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Activate plugin
|
|
43
|
+
*/
|
|
44
|
+
async activate(context: NotionPluginContext): Promise<void> {
|
|
45
|
+
const { projectId, config, apiToken } = context
|
|
46
|
+
|
|
47
|
+
if (!config?.enabled) {
|
|
48
|
+
return
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Initialize Notion client
|
|
52
|
+
notionClient.initialize(config, apiToken || process.env.NOTION_TOKEN)
|
|
53
|
+
|
|
54
|
+
if (!notionClient.isReady()) {
|
|
55
|
+
console.warn('[notion] API token not configured, plugin disabled')
|
|
56
|
+
return
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
plugin.enabled = true
|
|
60
|
+
plugin.projectId = projectId
|
|
61
|
+
plugin.config = config
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Deactivate plugin
|
|
66
|
+
*/
|
|
67
|
+
async deactivate(): Promise<void> {
|
|
68
|
+
plugin.enabled = false
|
|
69
|
+
plugin.projectId = null
|
|
70
|
+
plugin.config = null
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Hook handlers
|
|
75
|
+
*/
|
|
76
|
+
hooks: {
|
|
77
|
+
/**
|
|
78
|
+
* Sync shipped feature to Notion after ship
|
|
79
|
+
*/
|
|
80
|
+
[HookPoints.AFTER_FEATURE_SHIP]: async function (data: {
|
|
81
|
+
feature: ShippedFeature
|
|
82
|
+
projectId?: string
|
|
83
|
+
}): Promise<void> {
|
|
84
|
+
if (!plugin.enabled || !plugin.config || !plugin.projectId) return
|
|
85
|
+
if (!plugin.config.syncOn?.ship) return
|
|
86
|
+
|
|
87
|
+
try {
|
|
88
|
+
const result = await syncShippedFeature(
|
|
89
|
+
data.projectId || plugin.projectId,
|
|
90
|
+
data.feature,
|
|
91
|
+
plugin.config
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
if (result.success) {
|
|
95
|
+
console.log(`[notion] Synced: ${data.feature.name} (${result.action})`)
|
|
96
|
+
} else if (result.error) {
|
|
97
|
+
console.warn(`[notion] Sync failed: ${result.error}`)
|
|
98
|
+
}
|
|
99
|
+
} catch (error) {
|
|
100
|
+
// Graceful degradation - don't fail the ship
|
|
101
|
+
console.warn('[notion] Sync error:', (error as Error).message)
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Sync idea to Notion after capture
|
|
107
|
+
*/
|
|
108
|
+
[HookPoints.AFTER_IDEA_CAPTURE]: async function (data: {
|
|
109
|
+
idea: Idea
|
|
110
|
+
projectId?: string
|
|
111
|
+
}): Promise<void> {
|
|
112
|
+
if (!plugin.enabled || !plugin.config || !plugin.projectId) return
|
|
113
|
+
if (!plugin.config.syncOn?.idea) return
|
|
114
|
+
|
|
115
|
+
try {
|
|
116
|
+
const result = await syncIdea(
|
|
117
|
+
data.projectId || plugin.projectId,
|
|
118
|
+
data.idea,
|
|
119
|
+
plugin.config
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
if (result.success) {
|
|
123
|
+
console.log(`[notion] Synced idea: ${data.idea.text.slice(0, 30)}... (${result.action})`)
|
|
124
|
+
} else if (result.error) {
|
|
125
|
+
console.warn(`[notion] Sync failed: ${result.error}`)
|
|
126
|
+
}
|
|
127
|
+
} catch (error) {
|
|
128
|
+
// Graceful degradation - don't fail the idea capture
|
|
129
|
+
console.warn('[notion] Sync error:', (error as Error).message)
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Sync task completion (optional)
|
|
135
|
+
*/
|
|
136
|
+
[HookPoints.AFTER_TASK_COMPLETE]: async function (data: {
|
|
137
|
+
taskName?: string
|
|
138
|
+
projectId?: string
|
|
139
|
+
}): Promise<void> {
|
|
140
|
+
if (!plugin.enabled || !plugin.config || !plugin.projectId) return
|
|
141
|
+
if (!plugin.config.syncOn?.done) return
|
|
142
|
+
|
|
143
|
+
// Task sync is optional and less critical
|
|
144
|
+
// Could update task status in Notion if database exists
|
|
145
|
+
if (data.taskName) {
|
|
146
|
+
console.log(`[notion] Task completed: ${data.taskName}`)
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Check if plugin is active
|
|
153
|
+
*/
|
|
154
|
+
isActive(): boolean {
|
|
155
|
+
return plugin.enabled && plugin.config?.enabled === true
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Get current sync status
|
|
160
|
+
*/
|
|
161
|
+
getStatus(): {
|
|
162
|
+
enabled: boolean
|
|
163
|
+
databases: number
|
|
164
|
+
lastSync?: string
|
|
165
|
+
} {
|
|
166
|
+
const dbCount = plugin.config?.databases
|
|
167
|
+
? Object.values(plugin.config.databases).filter(Boolean).length
|
|
168
|
+
: 0
|
|
169
|
+
|
|
170
|
+
return {
|
|
171
|
+
enabled: plugin.enabled,
|
|
172
|
+
databases: dbCount,
|
|
173
|
+
lastSync: plugin.config?.lastSyncAt,
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export default plugin
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enriched Task Schema
|
|
3
|
+
* Defines the structure of a fully enriched task from PM Expert
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { z } from 'zod'
|
|
7
|
+
|
|
8
|
+
// =============================================================================
|
|
9
|
+
// Enums
|
|
10
|
+
// =============================================================================
|
|
11
|
+
|
|
12
|
+
export const TaskTypeSchema = z.enum([
|
|
13
|
+
'feature',
|
|
14
|
+
'bug',
|
|
15
|
+
'improvement',
|
|
16
|
+
'task',
|
|
17
|
+
'chore',
|
|
18
|
+
'spike',
|
|
19
|
+
'epic',
|
|
20
|
+
])
|
|
21
|
+
|
|
22
|
+
export const PrioritySchema = z.enum([
|
|
23
|
+
'critical',
|
|
24
|
+
'high',
|
|
25
|
+
'medium',
|
|
26
|
+
'low',
|
|
27
|
+
'none',
|
|
28
|
+
])
|
|
29
|
+
|
|
30
|
+
export const ComplexitySchema = z.enum([
|
|
31
|
+
'trivial', // < 1 hour
|
|
32
|
+
'small', // 1-4 hours
|
|
33
|
+
'medium', // 1-2 days
|
|
34
|
+
'large', // 3-5 days
|
|
35
|
+
'epic', // > 1 week
|
|
36
|
+
])
|
|
37
|
+
|
|
38
|
+
export const RiskLevelSchema = z.enum(['none', 'low', 'medium', 'high', 'critical'])
|
|
39
|
+
|
|
40
|
+
// =============================================================================
|
|
41
|
+
// User Story
|
|
42
|
+
// =============================================================================
|
|
43
|
+
|
|
44
|
+
export const UserStorySchema = z.object({
|
|
45
|
+
role: z.string().describe('The user role (e.g., "mobile user")'),
|
|
46
|
+
action: z.string().describe('What the user wants to do'),
|
|
47
|
+
benefit: z.string().describe('The benefit they get'),
|
|
48
|
+
formatted: z.string().describe('Formatted user story: "As a [role], I want [action] so that [benefit]"'),
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
// =============================================================================
|
|
52
|
+
// Acceptance Criteria
|
|
53
|
+
// =============================================================================
|
|
54
|
+
|
|
55
|
+
export const AcceptanceCriterionSchema = z.object({
|
|
56
|
+
id: z.string().describe('Unique criterion ID (e.g., AC-1)'),
|
|
57
|
+
description: z.string().describe('Criterion description'),
|
|
58
|
+
type: z.enum(['functional', 'technical', 'ux', 'performance']).default('functional'),
|
|
59
|
+
testable: z.boolean().default(true).describe('Whether it is verifiable/testable'),
|
|
60
|
+
gherkin: z.string().optional().describe('Optional Given/When/Then format'),
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
// =============================================================================
|
|
64
|
+
// Dependencies
|
|
65
|
+
// =============================================================================
|
|
66
|
+
|
|
67
|
+
export const CodeDependencySchema = z.object({
|
|
68
|
+
file: z.string().describe('File path'),
|
|
69
|
+
reason: z.string().describe('Why it is relevant'),
|
|
70
|
+
risk: RiskLevelSchema.describe('Risk level of modifying'),
|
|
71
|
+
lines: z.string().optional().describe('Specific lines (e.g., "45-67")'),
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
export const ApiDependencySchema = z.object({
|
|
75
|
+
endpoint: z.string().describe('Endpoint (e.g., POST /api/auth/login)'),
|
|
76
|
+
method: z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE']).optional(),
|
|
77
|
+
status: z.enum(['stable', 'in_development', 'deprecated']).default('stable'),
|
|
78
|
+
risk: RiskLevelSchema,
|
|
79
|
+
notes: z.string().optional(),
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
export const TaskDependencySchema = z.object({
|
|
83
|
+
id: z.string().describe('Blocking task ID'),
|
|
84
|
+
title: z.string().describe('Task title'),
|
|
85
|
+
status: z.string().describe('Current status'),
|
|
86
|
+
blocking: z.boolean().default(false).describe('Whether it completely blocks'),
|
|
87
|
+
risk: RiskLevelSchema,
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
export const DependenciesSchema = z.object({
|
|
91
|
+
code: z.array(CodeDependencySchema).default([]),
|
|
92
|
+
api: z.array(ApiDependencySchema).default([]),
|
|
93
|
+
tasks: z.array(TaskDependencySchema).default([]),
|
|
94
|
+
infrastructure: z.array(z.object({
|
|
95
|
+
service: z.string(),
|
|
96
|
+
purpose: z.string(),
|
|
97
|
+
risk: RiskLevelSchema,
|
|
98
|
+
})).default([]),
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
// =============================================================================
|
|
102
|
+
// Technical Analysis
|
|
103
|
+
// =============================================================================
|
|
104
|
+
|
|
105
|
+
export const TechnicalAnalysisSchema = z.object({
|
|
106
|
+
affectedFiles: z.array(z.object({
|
|
107
|
+
path: z.string(),
|
|
108
|
+
changes: z.string().describe('Expected changes'),
|
|
109
|
+
complexity: ComplexitySchema,
|
|
110
|
+
})).default([]),
|
|
111
|
+
|
|
112
|
+
existingPatterns: z.array(z.object({
|
|
113
|
+
pattern: z.string().describe('Pattern name'),
|
|
114
|
+
file: z.string().describe('Reference file'),
|
|
115
|
+
relevance: z.string().describe('Why it is relevant'),
|
|
116
|
+
})).default([]),
|
|
117
|
+
|
|
118
|
+
suggestedApproach: z.string().optional().describe('Recommended approach'),
|
|
119
|
+
|
|
120
|
+
potentialRisks: z.array(z.object({
|
|
121
|
+
risk: z.string(),
|
|
122
|
+
mitigation: z.string(),
|
|
123
|
+
severity: RiskLevelSchema,
|
|
124
|
+
})).default([]),
|
|
125
|
+
|
|
126
|
+
testingStrategy: z.object({
|
|
127
|
+
unit: z.array(z.string()).default([]),
|
|
128
|
+
integration: z.array(z.string()).default([]),
|
|
129
|
+
e2e: z.array(z.string()).default([]),
|
|
130
|
+
}).optional(),
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
// =============================================================================
|
|
134
|
+
// LLM Prompt (AI-Agnostic)
|
|
135
|
+
// =============================================================================
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* LLM Prompt Schema
|
|
139
|
+
* Generates prompts compatible with any AI assistant:
|
|
140
|
+
* Claude, ChatGPT, Copilot, Gemini, Cursor, etc.
|
|
141
|
+
*/
|
|
142
|
+
export const LLMPromptSchema = z.object({
|
|
143
|
+
context: z.string().describe('Codebase context (stack, structure)'),
|
|
144
|
+
problem: z.string().describe('What problem needs to be solved'),
|
|
145
|
+
task: z.string().describe('Task description'),
|
|
146
|
+
instructions: z.array(z.string()).describe('Step-by-step instructions'),
|
|
147
|
+
files: z.array(z.string()).describe('Files to modify'),
|
|
148
|
+
patterns: z.array(z.string()).describe('Reference patterns to follow'),
|
|
149
|
+
acceptanceCriteria: z.array(z.string()).describe('How to know when done'),
|
|
150
|
+
verification: z.array(z.string()).describe('How to test/verify correctness'),
|
|
151
|
+
formatted: z.string().describe('Complete copy-paste ready prompt'),
|
|
152
|
+
})
|
|
153
|
+
|
|
154
|
+
// =============================================================================
|
|
155
|
+
// Main Enriched Task Schema
|
|
156
|
+
// =============================================================================
|
|
157
|
+
|
|
158
|
+
export const EnrichedTaskSchema = z.object({
|
|
159
|
+
// Identification
|
|
160
|
+
id: z.string().describe('Task UUID'),
|
|
161
|
+
externalId: z.string().optional().describe('External system ID (ENG-123)'),
|
|
162
|
+
provider: z.enum(['linear', 'jira', 'monday', 'github', 'internal']).optional(),
|
|
163
|
+
|
|
164
|
+
// Basic (original input)
|
|
165
|
+
originalTitle: z.string().describe('Original title from PO'),
|
|
166
|
+
originalDescription: z.string().optional().describe('Original description'),
|
|
167
|
+
|
|
168
|
+
// Classification
|
|
169
|
+
type: TaskTypeSchema,
|
|
170
|
+
priority: PrioritySchema,
|
|
171
|
+
complexity: ComplexitySchema,
|
|
172
|
+
labels: z.array(z.string()).default([]),
|
|
173
|
+
|
|
174
|
+
// Enrichment
|
|
175
|
+
userStory: UserStorySchema,
|
|
176
|
+
acceptanceCriteria: z.array(AcceptanceCriterionSchema).min(1),
|
|
177
|
+
definitionOfDone: z.array(z.string()).default([
|
|
178
|
+
'Code reviewed',
|
|
179
|
+
'Tests pass',
|
|
180
|
+
'Documentation updated',
|
|
181
|
+
'Deployed to staging',
|
|
182
|
+
]),
|
|
183
|
+
|
|
184
|
+
// Technical analysis
|
|
185
|
+
technicalAnalysis: TechnicalAnalysisSchema,
|
|
186
|
+
dependencies: DependenciesSchema,
|
|
187
|
+
|
|
188
|
+
// For the LLM
|
|
189
|
+
llmPrompt: LLMPromptSchema,
|
|
190
|
+
|
|
191
|
+
// Metadata
|
|
192
|
+
enrichedAt: z.string().describe('ISO timestamp'),
|
|
193
|
+
enrichedBy: z.enum(['pm-expert', 'manual', 'imported']).default('pm-expert'),
|
|
194
|
+
confidence: z.number().min(0).max(1).describe('Analysis confidence (0-1)'),
|
|
195
|
+
|
|
196
|
+
// Status
|
|
197
|
+
readyForDev: z.boolean().default(false).describe('Whether ready for development'),
|
|
198
|
+
blockers: z.array(z.string()).default([]).describe('Active blockers'),
|
|
199
|
+
})
|
|
200
|
+
|
|
201
|
+
// =============================================================================
|
|
202
|
+
// Types
|
|
203
|
+
// =============================================================================
|
|
204
|
+
|
|
205
|
+
export type TaskType = z.infer<typeof TaskTypeSchema>
|
|
206
|
+
export type Priority = z.infer<typeof PrioritySchema>
|
|
207
|
+
export type Complexity = z.infer<typeof ComplexitySchema>
|
|
208
|
+
export type RiskLevel = z.infer<typeof RiskLevelSchema>
|
|
209
|
+
export type UserStory = z.infer<typeof UserStorySchema>
|
|
210
|
+
export type AcceptanceCriterion = z.infer<typeof AcceptanceCriterionSchema>
|
|
211
|
+
export type Dependencies = z.infer<typeof DependenciesSchema>
|
|
212
|
+
export type TechnicalAnalysis = z.infer<typeof TechnicalAnalysisSchema>
|
|
213
|
+
export type LLMPrompt = z.infer<typeof LLMPromptSchema>
|
|
214
|
+
export type EnrichedTask = z.infer<typeof EnrichedTaskSchema>
|
|
215
|
+
|
|
216
|
+
// =============================================================================
|
|
217
|
+
// Helpers
|
|
218
|
+
// =============================================================================
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Create formatted user story
|
|
222
|
+
*/
|
|
223
|
+
export function formatUserStory(role: string, action: string, benefit: string): UserStory {
|
|
224
|
+
return {
|
|
225
|
+
role,
|
|
226
|
+
action,
|
|
227
|
+
benefit,
|
|
228
|
+
formatted: `As a **${role}**, I want to **${action}** so that **${benefit}**.`,
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Check if task is ready for development
|
|
234
|
+
*/
|
|
235
|
+
export function isReadyForDev(task: EnrichedTask): { ready: boolean; reasons: string[] } {
|
|
236
|
+
const reasons: string[] = []
|
|
237
|
+
|
|
238
|
+
// Check acceptance criteria
|
|
239
|
+
if (task.acceptanceCriteria.length < 2) {
|
|
240
|
+
reasons.push('Needs at least 2 acceptance criteria')
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// Check blockers
|
|
244
|
+
const blockingDeps = task.dependencies.tasks.filter(t => t.blocking)
|
|
245
|
+
if (blockingDeps.length > 0) {
|
|
246
|
+
reasons.push(`Blocked by: ${blockingDeps.map(t => t.id).join(', ')}`)
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// Check critical risks
|
|
250
|
+
const criticalRisks = task.technicalAnalysis.potentialRisks.filter(r => r.severity === 'critical')
|
|
251
|
+
if (criticalRisks.length > 0) {
|
|
252
|
+
reasons.push('Has unmitigated critical risks')
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Check analysis confidence
|
|
256
|
+
if (task.confidence < 0.6) {
|
|
257
|
+
reasons.push('Low confidence analysis - needs manual review')
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return {
|
|
261
|
+
ready: reasons.length === 0,
|
|
262
|
+
reasons,
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Estimate story points based on complexity
|
|
268
|
+
*/
|
|
269
|
+
export function estimateStoryPoints(complexity: Complexity): number {
|
|
270
|
+
const map: Record<Complexity, number> = {
|
|
271
|
+
trivial: 1,
|
|
272
|
+
small: 2,
|
|
273
|
+
medium: 3,
|
|
274
|
+
large: 5,
|
|
275
|
+
epic: 8,
|
|
276
|
+
}
|
|
277
|
+
return map[complexity]
|
|
278
|
+
}
|