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
|
@@ -283,7 +283,7 @@ class PromptBuilder {
|
|
|
283
283
|
|
|
284
284
|
// Agent assignment (CONDITIONAL - only for code-modifying commands)
|
|
285
285
|
const commandName = template.frontmatter?.name?.replace('p:', '') || ''
|
|
286
|
-
const agentCommands = ['
|
|
286
|
+
const agentCommands = ['now', 'build', 'feature', 'design', 'fix', 'bug', 'test', 'work', 'cleanup', 'spec']
|
|
287
287
|
const needsAgent = agentCommands.includes(commandName)
|
|
288
288
|
|
|
289
289
|
if (agent && needsAgent) {
|
|
@@ -332,7 +332,7 @@ class PromptBuilder {
|
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
// OPTIMIZED: Only include patterns for code-modifying commands
|
|
335
|
-
const codeCommands = ['
|
|
335
|
+
const codeCommands = ['now', 'build', 'feature', 'design', 'cleanup', 'fix', 'bug', 'test', 'init', 'spec', 'work']
|
|
336
336
|
const needsPatterns = codeCommands.includes(commandName)
|
|
337
337
|
|
|
338
338
|
// Include code patterns analysis for code-modifying commands
|
|
@@ -498,87 +498,6 @@ class PromptBuilder {
|
|
|
498
498
|
return result || null
|
|
499
499
|
}
|
|
500
500
|
|
|
501
|
-
/**
|
|
502
|
-
* Claude Code subagents that can be invoked via @ notation
|
|
503
|
-
*/
|
|
504
|
-
private readonly CLAUDE_SUBAGENTS = ['explore', 'general', 'plan']
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* Parse @ agent mentions from input
|
|
508
|
-
* Separates prjct agents from Claude Code subagents
|
|
509
|
-
* @example "@frontend @explore add dark mode" -> { prjctAgents: ["frontend"], claudeSubagents: ["explore"], cleanInput: "add dark mode" }
|
|
510
|
-
*/
|
|
511
|
-
parseAgentMentions(input: string): {
|
|
512
|
-
prjctAgents: string[]
|
|
513
|
-
claudeSubagents: string[]
|
|
514
|
-
cleanInput: string
|
|
515
|
-
} {
|
|
516
|
-
if (!input) return { prjctAgents: [], claudeSubagents: [], cleanInput: '' }
|
|
517
|
-
|
|
518
|
-
const mentionPattern = /@(\w+)/g
|
|
519
|
-
const prjctAgents: string[] = []
|
|
520
|
-
const claudeSubagents: string[] = []
|
|
521
|
-
let match
|
|
522
|
-
|
|
523
|
-
while ((match = mentionPattern.exec(input)) !== null) {
|
|
524
|
-
const name = match[1].toLowerCase()
|
|
525
|
-
if (this.CLAUDE_SUBAGENTS.includes(name)) {
|
|
526
|
-
claudeSubagents.push(name)
|
|
527
|
-
} else {
|
|
528
|
-
prjctAgents.push(name)
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
const cleanInput = input.replace(mentionPattern, '').trim()
|
|
533
|
-
return { prjctAgents, claudeSubagents, cleanInput }
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* Build Claude subagent instructions for the prompt
|
|
538
|
-
*/
|
|
539
|
-
buildSubagentInstructions(claudeSubagents: string[]): string {
|
|
540
|
-
if (!claudeSubagents.length) return ''
|
|
541
|
-
|
|
542
|
-
const instructions = claudeSubagents.map((sub) => {
|
|
543
|
-
switch (sub) {
|
|
544
|
-
case 'explore':
|
|
545
|
-
return '- USE Task tool with subagent_type=Explore for fast codebase exploration'
|
|
546
|
-
case 'general':
|
|
547
|
-
return '- USE Task tool with subagent_type=general-purpose for complex multi-step research'
|
|
548
|
-
case 'plan':
|
|
549
|
-
return '- USE Task tool with subagent_type=Plan for architecture design'
|
|
550
|
-
default:
|
|
551
|
-
return null
|
|
552
|
-
}
|
|
553
|
-
}).filter(Boolean)
|
|
554
|
-
|
|
555
|
-
if (!instructions.length) return ''
|
|
556
|
-
|
|
557
|
-
return `
|
|
558
|
-
## CLAUDE SUBAGENT INSTRUCTIONS
|
|
559
|
-
${instructions.join('\n')}
|
|
560
|
-
`
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* Build tool permissions section from template frontmatter
|
|
565
|
-
*/
|
|
566
|
-
buildToolPermissions(toolPermissions: Record<string, { allow?: string[]; ask?: string[]; deny?: string[] }> | null): string {
|
|
567
|
-
if (!toolPermissions) return ''
|
|
568
|
-
|
|
569
|
-
const parts: string[] = ['\n## TOOL PERMISSIONS\n', 'Check these BEFORE executing:\n']
|
|
570
|
-
|
|
571
|
-
for (const [tool, rules] of Object.entries(toolPermissions)) {
|
|
572
|
-
parts.push(`\n**${tool}:**`)
|
|
573
|
-
if (rules.allow?.length) parts.push(`- ALLOW: ${rules.allow.join(', ')}`)
|
|
574
|
-
if (rules.ask?.length) parts.push(`- ASK USER: ${rules.ask.join(', ')}`)
|
|
575
|
-
if (rules.deny?.length) parts.push(`- NEVER: ${rules.deny.join(', ')}`)
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
parts.push('\n⚠️ DENY = Never execute. ASK = Confirm with user first.\n')
|
|
579
|
-
return parts.join('\n')
|
|
580
|
-
}
|
|
581
|
-
|
|
582
501
|
/**
|
|
583
502
|
* Build critical anti-hallucination rules section
|
|
584
503
|
*/
|
|
@@ -13,6 +13,7 @@ import { outcomeAnalyzer } from '../outcomes'
|
|
|
13
13
|
import type { TaskType } from '../types'
|
|
14
14
|
import type {
|
|
15
15
|
ContextDomain,
|
|
16
|
+
SmartContextProjectState,
|
|
16
17
|
FullContext,
|
|
17
18
|
FilteredContext,
|
|
18
19
|
StackInfo,
|
|
@@ -31,22 +32,8 @@ export type {
|
|
|
31
32
|
FilterMetrics,
|
|
32
33
|
} from '../types'
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
* Instead of iterating 5 arrays of keywords, we do a single pass
|
|
37
|
-
*/
|
|
38
|
-
const KEYWORD_DOMAIN_MAP: Map<string, ContextDomain> = new Map([
|
|
39
|
-
// Frontend
|
|
40
|
-
...['ui', 'component', 'react', 'vue', 'angular', 'css', 'style', 'button', 'form', 'modal', 'layout', 'responsive', 'animation', 'dom', 'html', 'frontend', 'fe', 'client', 'browser', 'jsx', 'tsx'].map(k => [k, 'frontend' as ContextDomain] as const),
|
|
41
|
-
// Backend
|
|
42
|
-
...['api', 'server', 'database', 'db', 'endpoint', 'route', 'handler', 'controller', 'service', 'repository', 'model', 'query', 'backend', 'be', 'rest', 'graphql', 'prisma', 'sql', 'redis', 'auth'].map(k => [k, 'backend' as ContextDomain] as const),
|
|
43
|
-
// DevOps
|
|
44
|
-
...['deploy', 'docker', 'kubernetes', 'k8s', 'ci', 'cd', 'pipeline', 'terraform', 'ansible', 'aws', 'gcp', 'azure', 'nginx', 'devops', 'infrastructure', 'monitoring', 'logging'].map(k => [k, 'devops' as ContextDomain] as const),
|
|
45
|
-
// Docs
|
|
46
|
-
...['document', 'docs', 'readme', 'changelog', 'comment', 'jsdoc', 'tutorial', 'guide', 'explain', 'describe', 'markdown'].map(k => [k, 'docs' as ContextDomain] as const),
|
|
47
|
-
// Testing
|
|
48
|
-
...['test', 'spec', 'jest', 'mocha', 'cypress', 'playwright', 'pytest', 'unittest', 'e2e', 'unit', 'integration', 'coverage', 'mock', 'fixture'].map(k => [k, 'testing' as ContextDomain] as const),
|
|
49
|
-
])
|
|
35
|
+
// Local type alias for backward compatibility
|
|
36
|
+
type ProjectState = SmartContextProjectState
|
|
50
37
|
|
|
51
38
|
/**
|
|
52
39
|
* SmartContext - Intelligent context filtering.
|
|
@@ -54,20 +41,63 @@ const KEYWORD_DOMAIN_MAP: Map<string, ContextDomain> = new Map([
|
|
|
54
41
|
class SmartContext {
|
|
55
42
|
/**
|
|
56
43
|
* Detect the domain of a task from its description.
|
|
57
|
-
* OPTIMIZED: Single-pass O(n) where n = words in description
|
|
58
44
|
*/
|
|
59
45
|
detectDomain(taskDescription: string): DomainAnalysis {
|
|
60
|
-
const
|
|
61
|
-
const scores: Record<ContextDomain, number> = {
|
|
62
|
-
frontend: 0, backend: 0, devops: 0, docs: 0, testing: 0, general: 0
|
|
63
|
-
}
|
|
46
|
+
const lower = taskDescription.toLowerCase()
|
|
64
47
|
|
|
65
|
-
//
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
48
|
+
// Frontend indicators
|
|
49
|
+
const frontendKeywords = [
|
|
50
|
+
'ui', 'component', 'react', 'vue', 'angular', 'css', 'style',
|
|
51
|
+
'button', 'form', 'modal', 'layout', 'responsive', 'animation',
|
|
52
|
+
'dom', 'html', 'frontend', 'fe', 'client', 'browser', 'jsx', 'tsx'
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
// Backend indicators
|
|
56
|
+
const backendKeywords = [
|
|
57
|
+
'api', 'server', 'database', 'db', 'endpoint', 'route', 'handler',
|
|
58
|
+
'controller', 'service', 'repository', 'model', 'query', 'backend',
|
|
59
|
+
'be', 'rest', 'graphql', 'prisma', 'sql', 'redis', 'auth'
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
// DevOps indicators
|
|
63
|
+
const devopsKeywords = [
|
|
64
|
+
'deploy', 'docker', 'kubernetes', 'k8s', 'ci', 'cd', 'pipeline',
|
|
65
|
+
'terraform', 'ansible', 'aws', 'gcp', 'azure', 'config', 'nginx',
|
|
66
|
+
'devops', 'infrastructure', 'monitoring', 'logging', 'build'
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
// Docs indicators
|
|
70
|
+
const docsKeywords = [
|
|
71
|
+
'document', 'docs', 'readme', 'changelog', 'comment', 'jsdoc',
|
|
72
|
+
'tutorial', 'guide', 'explain', 'describe', 'markdown'
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
// Testing indicators
|
|
76
|
+
const testingKeywords = [
|
|
77
|
+
'test', 'spec',
|
|
78
|
+
// JS/TS
|
|
79
|
+
'bun', 'bun test', 'jest', 'mocha', 'cypress', 'playwright',
|
|
80
|
+
// Python
|
|
81
|
+
'pytest', 'unittest',
|
|
82
|
+
// Go
|
|
83
|
+
'go test',
|
|
84
|
+
// Rust
|
|
85
|
+
'cargo test',
|
|
86
|
+
// .NET
|
|
87
|
+
'dotnet test',
|
|
88
|
+
// Java
|
|
89
|
+
'mvn test', 'gradle test', 'gradlew test',
|
|
90
|
+
'e2e', 'unit', 'integration', 'coverage', 'mock', 'fixture'
|
|
91
|
+
]
|
|
92
|
+
|
|
93
|
+
// Count matches
|
|
94
|
+
const scores: Record<ContextDomain, number> = {
|
|
95
|
+
frontend: frontendKeywords.filter(k => lower.includes(k)).length,
|
|
96
|
+
backend: backendKeywords.filter(k => lower.includes(k)).length,
|
|
97
|
+
devops: devopsKeywords.filter(k => lower.includes(k)).length,
|
|
98
|
+
docs: docsKeywords.filter(k => lower.includes(k)).length,
|
|
99
|
+
testing: testingKeywords.filter(k => lower.includes(k)).length,
|
|
100
|
+
general: 0,
|
|
71
101
|
}
|
|
72
102
|
|
|
73
103
|
// Find primary and secondary domains
|
|
@@ -109,16 +139,14 @@ class SmartContext {
|
|
|
109
139
|
agent => relevantDomains.includes(agent.domain)
|
|
110
140
|
)
|
|
111
141
|
|
|
112
|
-
//
|
|
113
|
-
const
|
|
114
|
-
agentPerformanceTracker.getAgentPerformance(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
for (let i = 0; i < filteredAgents.length; i++) {
|
|
119
|
-
const perf = perfResults[i]
|
|
142
|
+
// Enrich with performance data
|
|
143
|
+
for (const agent of filteredAgents) {
|
|
144
|
+
const perf = await agentPerformanceTracker.getAgentPerformance(
|
|
145
|
+
projectId,
|
|
146
|
+
agent.name
|
|
147
|
+
)
|
|
120
148
|
if (perf) {
|
|
121
|
-
|
|
149
|
+
agent.successRate = perf.successRate
|
|
122
150
|
}
|
|
123
151
|
}
|
|
124
152
|
|
|
@@ -15,92 +15,26 @@ import type { Frontmatter, ParsedTemplate } from '../types'
|
|
|
15
15
|
const TEMPLATES_DIR = path.join(__dirname, '..', '..', 'templates', 'commands')
|
|
16
16
|
const MAX_CACHE_SIZE = 50
|
|
17
17
|
|
|
18
|
-
// Use single Map for O(1) LRU operations (ES6 Maps maintain insertion order)
|
|
19
18
|
const cache = new Map<string, ParsedTemplate>()
|
|
19
|
+
const cacheOrder: string[] = []
|
|
20
20
|
|
|
21
21
|
// ============ Cache Helpers ============
|
|
22
22
|
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// Evict oldest (first item) if over limit
|
|
29
|
-
if (cache.size > MAX_CACHE_SIZE) {
|
|
30
|
-
const oldest = cache.keys().next().value
|
|
31
|
-
if (oldest) cache.delete(oldest)
|
|
32
|
-
}
|
|
23
|
+
function updateLruOrder(key: string): void {
|
|
24
|
+
const index = cacheOrder.indexOf(key)
|
|
25
|
+
if (index > -1) cacheOrder.splice(index, 1)
|
|
26
|
+
cacheOrder.push(key)
|
|
33
27
|
}
|
|
34
28
|
|
|
35
|
-
function
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
cache.delete(key)
|
|
40
|
-
cache.set(key, value)
|
|
29
|
+
function evictLru(): void {
|
|
30
|
+
while (cache.size >= MAX_CACHE_SIZE && cacheOrder.length > 0) {
|
|
31
|
+
const oldest = cacheOrder.shift()
|
|
32
|
+
if (oldest) cache.delete(oldest)
|
|
41
33
|
}
|
|
42
|
-
return value
|
|
43
34
|
}
|
|
44
35
|
|
|
45
36
|
// ============ Parsing Functions ============
|
|
46
37
|
|
|
47
|
-
/**
|
|
48
|
-
* Parse tool-permissions YAML block
|
|
49
|
-
* Handles nested structure like:
|
|
50
|
-
* tool-permissions:
|
|
51
|
-
* bash:
|
|
52
|
-
* allow: ["git *"]
|
|
53
|
-
* deny: ["rm -rf"]
|
|
54
|
-
*/
|
|
55
|
-
function parseToolPermissions(lines: string[], startIndex: number): {
|
|
56
|
-
permissions: Record<string, { allow?: string[]; ask?: string[]; deny?: string[] }>
|
|
57
|
-
endIndex: number
|
|
58
|
-
} {
|
|
59
|
-
const permissions: Record<string, { allow?: string[]; ask?: string[]; deny?: string[] }> = {}
|
|
60
|
-
let i = startIndex
|
|
61
|
-
let currentTool: string | null = null
|
|
62
|
-
|
|
63
|
-
while (i < lines.length) {
|
|
64
|
-
const line = lines[i]
|
|
65
|
-
const trimmed = line.trim()
|
|
66
|
-
|
|
67
|
-
// End if we hit a new top-level key (no leading spaces)
|
|
68
|
-
if (line.length > 0 && !line.startsWith(' ') && !line.startsWith('\t')) {
|
|
69
|
-
break
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// Tool name (2 spaces indent)
|
|
73
|
-
const toolMatch = line.match(/^ {2}(\w+):$/)
|
|
74
|
-
if (toolMatch) {
|
|
75
|
-
currentTool = toolMatch[1]
|
|
76
|
-
permissions[currentTool] = {}
|
|
77
|
-
i++
|
|
78
|
-
continue
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// Permission array (4 spaces indent)
|
|
82
|
-
const permMatch = line.match(/^ {4}(allow|ask|deny):\s*\[(.+)\]/)
|
|
83
|
-
if (permMatch && currentTool) {
|
|
84
|
-
const [, permType, arrayContent] = permMatch
|
|
85
|
-
permissions[currentTool][permType as 'allow' | 'ask' | 'deny'] = arrayContent
|
|
86
|
-
.split(',')
|
|
87
|
-
.map((v) => v.trim().replace(/^["']|["']$/g, ''))
|
|
88
|
-
i++
|
|
89
|
-
continue
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// Skip empty lines within block
|
|
93
|
-
if (trimmed === '') {
|
|
94
|
-
i++
|
|
95
|
-
continue
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
i++
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return { permissions, endIndex: i }
|
|
102
|
-
}
|
|
103
|
-
|
|
104
38
|
export function parseFrontmatter(content: string): ParsedTemplate {
|
|
105
39
|
const frontmatterRegex = /^---\n([\s\S]+?)\n---\n([\s\S]*)$/
|
|
106
40
|
const match = content.match(frontmatterRegex)
|
|
@@ -111,35 +45,21 @@ export function parseFrontmatter(content: string): ParsedTemplate {
|
|
|
111
45
|
|
|
112
46
|
const [, frontmatterText, mainContent] = match
|
|
113
47
|
const frontmatter: Frontmatter = {}
|
|
114
|
-
const lines = frontmatterText.split('\n')
|
|
115
48
|
|
|
116
|
-
|
|
117
|
-
const line = lines[i]
|
|
49
|
+
frontmatterText.split('\n').forEach((line) => {
|
|
118
50
|
const [key, ...valueParts] = line.split(':')
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
51
|
+
if (key && valueParts.length > 0) {
|
|
52
|
+
const value = valueParts.join(':').trim()
|
|
53
|
+
|
|
54
|
+
// Parse arrays
|
|
55
|
+
if (value.startsWith('[') && value.endsWith(']')) {
|
|
56
|
+
frontmatter[key.trim()] = value.slice(1, -1).split(',').map((v) => v.trim())
|
|
57
|
+
} else {
|
|
58
|
+
// Remove quotes if present
|
|
59
|
+
frontmatter[key.trim()] = value.replace(/^["']|["']$/g, '')
|
|
60
|
+
}
|
|
122
61
|
}
|
|
123
|
-
|
|
124
|
-
const keyTrimmed = key.trim()
|
|
125
|
-
const value = valueParts.join(':').trim()
|
|
126
|
-
|
|
127
|
-
// Handle tool-permissions nested block
|
|
128
|
-
if (keyTrimmed === 'tool-permissions' && value === '') {
|
|
129
|
-
const { permissions, endIndex } = parseToolPermissions(lines, i + 1)
|
|
130
|
-
frontmatter['tool-permissions'] = permissions
|
|
131
|
-
i = endIndex - 1
|
|
132
|
-
continue
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// Parse arrays
|
|
136
|
-
if (value.startsWith('[') && value.endsWith(']')) {
|
|
137
|
-
frontmatter[keyTrimmed] = value.slice(1, -1).split(',').map((v) => v.trim())
|
|
138
|
-
} else if (value) {
|
|
139
|
-
// Remove quotes if present
|
|
140
|
-
frontmatter[keyTrimmed] = value.replace(/^["']|["']$/g, '')
|
|
141
|
-
}
|
|
142
|
-
}
|
|
62
|
+
})
|
|
143
63
|
|
|
144
64
|
return { frontmatter, content: mainContent.trim() }
|
|
145
65
|
}
|
|
@@ -147,10 +67,10 @@ export function parseFrontmatter(content: string): ParsedTemplate {
|
|
|
147
67
|
// ============ Main Functions ============
|
|
148
68
|
|
|
149
69
|
export async function load(commandName: string): Promise<ParsedTemplate> {
|
|
150
|
-
// Check cache first
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return
|
|
70
|
+
// Check cache first
|
|
71
|
+
if (cache.has(commandName)) {
|
|
72
|
+
updateLruOrder(commandName)
|
|
73
|
+
return cache.get(commandName)!
|
|
154
74
|
}
|
|
155
75
|
|
|
156
76
|
const templatePath = path.join(TEMPLATES_DIR, `${commandName}.md`)
|
|
@@ -159,8 +79,12 @@ export async function load(commandName: string): Promise<ParsedTemplate> {
|
|
|
159
79
|
const rawContent = await fs.readFile(templatePath, 'utf-8')
|
|
160
80
|
const parsed = parseFrontmatter(rawContent)
|
|
161
81
|
|
|
162
|
-
//
|
|
163
|
-
|
|
82
|
+
// Evict LRU if needed before adding
|
|
83
|
+
evictLru()
|
|
84
|
+
|
|
85
|
+
// Cache result
|
|
86
|
+
cache.set(commandName, parsed)
|
|
87
|
+
cacheOrder.push(commandName)
|
|
164
88
|
|
|
165
89
|
return parsed
|
|
166
90
|
} catch {
|
|
@@ -175,6 +99,7 @@ export async function getAllowedTools(commandName: string): Promise<string[]> {
|
|
|
175
99
|
|
|
176
100
|
export function clearCache(): void {
|
|
177
101
|
cache.clear()
|
|
102
|
+
cacheOrder.length = 0
|
|
178
103
|
}
|
|
179
104
|
|
|
180
105
|
// ============ Default Export (backwards compat) ============
|
|
@@ -62,6 +62,17 @@ export const COMMANDS: CommandMeta[] = [
|
|
|
62
62
|
requiresProject: true,
|
|
63
63
|
features: ['Agentic type classification', '7-phase workflow', 'Git branch management', 'Task breakdown'],
|
|
64
64
|
},
|
|
65
|
+
{
|
|
66
|
+
name: 'feature',
|
|
67
|
+
group: 'core',
|
|
68
|
+
description: 'DEPRECATED - Use /p:task instead',
|
|
69
|
+
usage: { claude: '/p:task "<description>"', terminal: 'prjct task "<description>"' },
|
|
70
|
+
params: '<description>',
|
|
71
|
+
implemented: true,
|
|
72
|
+
hasTemplate: true,
|
|
73
|
+
requiresProject: true,
|
|
74
|
+
deprecated: true,
|
|
75
|
+
},
|
|
65
76
|
{
|
|
66
77
|
name: 'spec',
|
|
67
78
|
group: 'core',
|
|
@@ -72,6 +83,28 @@ export const COMMANDS: CommandMeta[] = [
|
|
|
72
83
|
hasTemplate: true,
|
|
73
84
|
requiresProject: true,
|
|
74
85
|
},
|
|
86
|
+
{
|
|
87
|
+
name: 'now',
|
|
88
|
+
group: 'core',
|
|
89
|
+
description: 'DEPRECATED - Use /p:task instead',
|
|
90
|
+
usage: { claude: '/p:task "<description>"', terminal: 'prjct task "<description>"' },
|
|
91
|
+
params: '[task]',
|
|
92
|
+
implemented: true,
|
|
93
|
+
hasTemplate: true,
|
|
94
|
+
requiresProject: true,
|
|
95
|
+
deprecated: true,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'work',
|
|
99
|
+
group: 'core',
|
|
100
|
+
description: 'DEPRECATED - Use /p:task instead',
|
|
101
|
+
usage: { claude: '/p:task "<description>"', terminal: 'prjct task "<description>"' },
|
|
102
|
+
params: '[task]',
|
|
103
|
+
implemented: true,
|
|
104
|
+
hasTemplate: true,
|
|
105
|
+
requiresProject: true,
|
|
106
|
+
deprecated: true,
|
|
107
|
+
},
|
|
75
108
|
{
|
|
76
109
|
name: 'pause',
|
|
77
110
|
group: 'core',
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* MD-First Architecture - All state in Markdown files.
|
|
5
5
|
*
|
|
6
|
-
* COMMANDS (
|
|
7
|
-
* - Workflow (
|
|
8
|
-
* - Planning (
|
|
6
|
+
* COMMANDS (22 total):
|
|
7
|
+
* - Workflow (5): work, done, next, pause, resume
|
|
8
|
+
* - Planning (5): init, feature, bug, idea, spec
|
|
9
9
|
* - Shipping (1): ship
|
|
10
10
|
* - Analytics (2): dash, help
|
|
11
|
-
* - Maintenance (
|
|
11
|
+
* - Maintenance (5): cleanup, design, recover, undo, redo, history
|
|
12
12
|
* - Analysis (2): analyze, sync
|
|
13
13
|
* - Setup (3): start, setup, migrateAll
|
|
14
14
|
*/
|
|
@@ -69,6 +69,10 @@ class PrjctCommands {
|
|
|
69
69
|
|
|
70
70
|
// ========== Workflow Commands ==========
|
|
71
71
|
|
|
72
|
+
async work(task: string | null = null, projectPath: string = process.cwd()): Promise<CommandResult> {
|
|
73
|
+
return this.workflow.now(task, projectPath)
|
|
74
|
+
}
|
|
75
|
+
|
|
72
76
|
async done(projectPath: string = process.cwd()): Promise<CommandResult> {
|
|
73
77
|
return this.workflow.done(projectPath)
|
|
74
78
|
}
|
|
@@ -91,6 +95,10 @@ class PrjctCommands {
|
|
|
91
95
|
return this.planning.init(idea, projectPath)
|
|
92
96
|
}
|
|
93
97
|
|
|
98
|
+
async feature(description: string, projectPath: string = process.cwd()): Promise<CommandResult> {
|
|
99
|
+
return this.planning.feature(description, projectPath)
|
|
100
|
+
}
|
|
101
|
+
|
|
94
102
|
async bug(description: string, projectPath: string = process.cwd()): Promise<CommandResult> {
|
|
95
103
|
return this.planning.bug(description, projectPath)
|
|
96
104
|
}
|
|
@@ -388,6 +388,43 @@ export class CommandRegistry {
|
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
+
/**
|
|
392
|
+
* Execute without requiring project (for init, setup commands)
|
|
393
|
+
* @deprecated Use execute() - it auto-detects based on command metadata
|
|
394
|
+
*/
|
|
395
|
+
async executeWithoutProject<TParams = void>(
|
|
396
|
+
name: string,
|
|
397
|
+
params: TParams,
|
|
398
|
+
projectPath: string = process.cwd()
|
|
399
|
+
): Promise<CommandResult> {
|
|
400
|
+
const handler = this.handlers.get(name)
|
|
401
|
+
if (handler) {
|
|
402
|
+
const context: ExecutionContext = {
|
|
403
|
+
projectId: '',
|
|
404
|
+
projectPath,
|
|
405
|
+
globalPath: '',
|
|
406
|
+
timestamp: getTimestamp(),
|
|
407
|
+
}
|
|
408
|
+
return handler.execute(params, context)
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
const handlerFn = this.handlerFns.get(name)
|
|
412
|
+
if (handlerFn) {
|
|
413
|
+
const context: ExecutionContext = {
|
|
414
|
+
projectId: '',
|
|
415
|
+
projectPath,
|
|
416
|
+
globalPath: '',
|
|
417
|
+
timestamp: getTimestamp(),
|
|
418
|
+
}
|
|
419
|
+
return handlerFn(params, context)
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
return {
|
|
423
|
+
success: false,
|
|
424
|
+
error: `Command not found: ${name}`,
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
391
428
|
/**
|
|
392
429
|
* Clear all registrations (useful for testing)
|
|
393
430
|
*/
|
|
@@ -70,21 +70,23 @@ class AgentLoader {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* Load all agents for the project
|
|
73
|
+
* Load all agents for the project
|
|
74
74
|
*/
|
|
75
75
|
async loadAllAgents(): Promise<Agent[]> {
|
|
76
76
|
try {
|
|
77
77
|
const files = await fs.readdir(this.agentsDir)
|
|
78
78
|
const agentFiles = files.filter((f) => f.endsWith('.md') && !f.startsWith('.'))
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
const
|
|
80
|
+
const agents: Agent[] = []
|
|
81
|
+
for (const file of agentFiles) {
|
|
82
82
|
const agentName = file.replace('.md', '')
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
const agent = await this.loadAgent(agentName)
|
|
84
|
+
if (agent) {
|
|
85
|
+
agents.push(agent)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
85
88
|
|
|
86
|
-
|
|
87
|
-
return results.filter((agent): agent is Agent => agent !== null)
|
|
89
|
+
return agents
|
|
88
90
|
} catch (error) {
|
|
89
91
|
if (isNotFoundError(error)) {
|
|
90
92
|
return [] // Agents directory doesn't exist yet
|
|
@@ -137,21 +137,21 @@ class ContextEstimator {
|
|
|
137
137
|
globPatterns.push(`*${ext}`)
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
// Execute glob searches
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
140
|
+
// Execute glob searches
|
|
141
|
+
for (const pattern of globPatterns) {
|
|
142
|
+
try {
|
|
143
|
+
const matches = await glob(pattern, {
|
|
144
|
+
cwd: projectPath,
|
|
145
|
+
ignore: patterns.exclude.map((ex) => `**/${ex}/**`),
|
|
146
|
+
nodir: true,
|
|
147
|
+
follow: false,
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
if (Array.isArray(matches)) {
|
|
151
|
+
files.push(...matches)
|
|
152
|
+
}
|
|
153
|
+
} catch {
|
|
154
|
+
// Skip invalid patterns
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
|
package/core/index.ts
CHANGED
|
@@ -97,12 +97,14 @@ async function main(): Promise<void> {
|
|
|
97
97
|
const param = parsedArgs.join(' ') || null
|
|
98
98
|
const standardCommands: Record<string, (p: string | null) => Promise<CommandResult>> = {
|
|
99
99
|
// Core workflow
|
|
100
|
+
work: (p) => commands.work(p),
|
|
100
101
|
done: () => commands.done(),
|
|
101
102
|
next: () => commands.next(),
|
|
102
103
|
pause: (p) => commands.pause(p || ''),
|
|
103
104
|
resume: (p) => commands.resume(p),
|
|
104
105
|
// Planning
|
|
105
106
|
init: (p) => commands.init(p),
|
|
107
|
+
feature: (p) => commands.feature(p || ''),
|
|
106
108
|
bug: (p) => commands.bug(p || ''),
|
|
107
109
|
idea: (p) => commands.idea(p || ''),
|
|
108
110
|
spec: (p) => commands.spec(p),
|