n8n-workflow-builder-mcp 0.1.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.
Files changed (595) hide show
  1. package/.cursor/rules/cursor_rules.mdc +53 -0
  2. package/.cursor/rules/dev_workflow.mdc +219 -0
  3. package/.cursor/rules/mcp.mdc +430 -0
  4. package/.cursor/rules/self_improve.mdc +72 -0
  5. package/.cursor/rules/taskmaster.mdc +382 -0
  6. package/.cursorignore +1 -0
  7. package/.cursorrules +4 -0
  8. package/.env.example +23 -0
  9. package/.eslintrc.json +38 -0
  10. package/.github/workflows/npm-publish-github-packages.yml +55 -0
  11. package/.prettierrc +9 -0
  12. package/.roo/rules/dev_workflow.md +219 -0
  13. package/.roo/rules/mcp.md +430 -0
  14. package/.roo/rules/roo_rules.md +53 -0
  15. package/.roo/rules/self_improve.md +72 -0
  16. package/.roo/rules/taskmaster.md +382 -0
  17. package/.roo/rules-architect/architect-rules +93 -0
  18. package/.roo/rules-ask/ask-rules +89 -0
  19. package/.roo/rules-boomerang/boomerang-rules +181 -0
  20. package/.roo/rules-code/code-rules +61 -0
  21. package/.roo/rules-debug/debug-rules +68 -0
  22. package/.roo/rules-test/test-rules +61 -0
  23. package/.roomodes +63 -0
  24. package/.taskmasterconfig +31 -0
  25. package/.windsurfrules +2382 -0
  26. package/LICENSE +21 -0
  27. package/README.md +210 -0
  28. package/config/credentials/credentials.json +1 -0
  29. package/config/default.js +41 -0
  30. package/package.json +56 -0
  31. package/scripts/demo-n8n-integration.js +161 -0
  32. package/scripts/demo-workflow-generator.js +102 -0
  33. package/scripts/init.sh +36 -0
  34. package/scripts/prd.txt +197 -0
  35. package/src/index.ts +1440 -0
  36. package/src/middleware/auth.js +273 -0
  37. package/src/middleware/authorize.js +183 -0
  38. package/src/middleware/logging.js +64 -0
  39. package/src/middleware/mcp.js +187 -0
  40. package/src/middleware/rateLimiter.js +82 -0
  41. package/src/middleware/validation.js +241 -0
  42. package/src/models/credential.js +359 -0
  43. package/src/models/llmService.js +236 -0
  44. package/src/models/n8nIntegration.js +542 -0
  45. package/src/models/storage.js +196 -0
  46. package/src/models/tool.js +148 -0
  47. package/src/models/user.js +164 -0
  48. package/src/models/workflow.js +229 -0
  49. package/src/routes/toolDefinitions.js +62 -0
  50. package/src/routes/toolExecution.js +79 -0
  51. package/src/tools/__index.js +242 -0
  52. package/src/tools/connectionManagement.js +500 -0
  53. package/src/tools/n8nIntegration.js +370 -0
  54. package/src/tools/nodeDiscovery.js +488 -0
  55. package/src/tools/nodeManagement.js +674 -0
  56. package/src/tools/toolDefinitions.js +660 -0
  57. package/src/tools/workflowCreation.js +100 -0
  58. package/src/tools/workflowGenerator.js +152 -0
  59. package/src/tools/workflowStorage.js +113 -0
  60. package/src/tools/workflowTesting.js +285 -0
  61. package/src/utils/encryption.js +164 -0
  62. package/src/utils/logger.js +84 -0
  63. package/src/utils/mcp.js +85 -0
  64. package/src/utils/securityLogger.js +109 -0
  65. package/tests/auth.test.js +402 -0
  66. package/tests/authorize.test.js +208 -0
  67. package/tests/run-memory-tests.js +55 -0
  68. package/tests/run-tests.js +55 -0
  69. package/tests/server.test.js +203 -0
  70. package/tests/unit/add-ai-connections.test.js +385 -0
  71. package/tests/unit/connectionManagement.test.js +309 -0
  72. package/tests/unit/langchain-llm-format.test.js +259 -0
  73. package/tests/unit/memory-connection.test.js +140 -0
  74. package/tests/unit/memory-integration.test.js +253 -0
  75. package/tests/unit/n8nIntegration.test.js +291 -0
  76. package/tests/unit/nodeDiscovery.test.js +270 -0
  77. package/tests/unit/nodeManagement.test.js +522 -0
  78. package/tests/unit/utils/mcp-test-utils.js +94 -0
  79. package/tests/unit/workflowCreation.test.js +110 -0
  80. package/tests/unit/workflowTesting.test.js +269 -0
  81. package/tests/user.test.js +181 -0
  82. package/tsconfig.json +20 -0
  83. package/workflow_nodes/Brandfetch.json +85 -0
  84. package/workflow_nodes/WorkflowTrigger.json +28 -0
  85. package/workflow_nodes/actionNetwork.json +218 -0
  86. package/workflow_nodes/activeCampaign.json +722 -0
  87. package/workflow_nodes/activeCampaignTrigger.json +52 -0
  88. package/workflow_nodes/acuitySchedulingTrigger.json +8 -0
  89. package/workflow_nodes/adalo.json +123 -0
  90. package/workflow_nodes/affinity.json +203 -0
  91. package/workflow_nodes/affinityTrigger.json +124 -0
  92. package/workflow_nodes/aggregate.json +119 -0
  93. package/workflow_nodes/agileCrm.json +503 -0
  94. package/workflow_nodes/aiTransform.json +17 -0
  95. package/workflow_nodes/airtable.json +226 -0
  96. package/workflow_nodes/airtableTrigger.json +120 -0
  97. package/workflow_nodes/airtop.json +10 -0
  98. package/workflow_nodes/amqp.json +62 -0
  99. package/workflow_nodes/amqpTrigger.json +8 -0
  100. package/workflow_nodes/apiTemplateIo.json +147 -0
  101. package/workflow_nodes/asana.json +446 -0
  102. package/workflow_nodes/asanaTrigger.json +52 -0
  103. package/workflow_nodes/automizy.json +195 -0
  104. package/workflow_nodes/autopilot.json +287 -0
  105. package/workflow_nodes/autopilotTrigger.json +8 -0
  106. package/workflow_nodes/awsCertificateManager.json +223 -0
  107. package/workflow_nodes/awsComprehend.json +125 -0
  108. package/workflow_nodes/awsDynamoDb.json +251 -0
  109. package/workflow_nodes/awsElb.json +174 -0
  110. package/workflow_nodes/awsLambda.json +69 -0
  111. package/workflow_nodes/awsRekognition.json +191 -0
  112. package/workflow_nodes/awsS3.json +32 -0
  113. package/workflow_nodes/awsSes.json +302 -0
  114. package/workflow_nodes/awsSns.json +110 -0
  115. package/workflow_nodes/awsSnsTrigger.json +47 -0
  116. package/workflow_nodes/awsSqs.json +140 -0
  117. package/workflow_nodes/awsTextract.json +43 -0
  118. package/workflow_nodes/awsTranscribe.json +217 -0
  119. package/workflow_nodes/azureCosmosDb.json +8 -0
  120. package/workflow_nodes/azureStorage.json +17 -0
  121. package/workflow_nodes/bambooHr.json +8 -0
  122. package/workflow_nodes/bannerbear.json +126 -0
  123. package/workflow_nodes/baserow.json +277 -0
  124. package/workflow_nodes/beeminder.json +146 -0
  125. package/workflow_nodes/bitbucketTrigger.json +62 -0
  126. package/workflow_nodes/bitly.json +130 -0
  127. package/workflow_nodes/bitwarden.json +224 -0
  128. package/workflow_nodes/box.json +457 -0
  129. package/workflow_nodes/boxTrigger.json +8 -0
  130. package/workflow_nodes/brevo.json +41 -0
  131. package/workflow_nodes/brevoTrigger.json +145 -0
  132. package/workflow_nodes/bubble.json +212 -0
  133. package/workflow_nodes/calTrigger.json +91 -0
  134. package/workflow_nodes/calendlyTrigger.json +71 -0
  135. package/workflow_nodes/chargebee.json +217 -0
  136. package/workflow_nodes/chargebeeTrigger.json +187 -0
  137. package/workflow_nodes/circleCi.json +89 -0
  138. package/workflow_nodes/ciscoWebex.json +593 -0
  139. package/workflow_nodes/ciscoWebexTrigger.json +159 -0
  140. package/workflow_nodes/clearbit.json +138 -0
  141. package/workflow_nodes/clickUp.json +793 -0
  142. package/workflow_nodes/clickUpTrigger.json +188 -0
  143. package/workflow_nodes/clockify.json +372 -0
  144. package/workflow_nodes/clockifyTrigger.json +26 -0
  145. package/workflow_nodes/cloudflare.json +103 -0
  146. package/workflow_nodes/cockpit.json +161 -0
  147. package/workflow_nodes/coda.json +242 -0
  148. package/workflow_nodes/code.json +40 -0
  149. package/workflow_nodes/coinGecko.json +363 -0
  150. package/workflow_nodes/compareDatasets.json +14 -0
  151. package/workflow_nodes/compression.json +66 -0
  152. package/workflow_nodes/contentful.json +29 -0
  153. package/workflow_nodes/convertKit.json +159 -0
  154. package/workflow_nodes/convertKitTrigger.json +109 -0
  155. package/workflow_nodes/convertToFile.json +64 -0
  156. package/workflow_nodes/copper.json +239 -0
  157. package/workflow_nodes/copperTrigger.json +8 -0
  158. package/workflow_nodes/cortex.json +348 -0
  159. package/workflow_nodes/crateDb.json +90 -0
  160. package/workflow_nodes/cron.json +23 -0
  161. package/workflow_nodes/crowdDev.json +8 -0
  162. package/workflow_nodes/crowdDevTrigger.json +8 -0
  163. package/workflow_nodes/crypto.json +147 -0
  164. package/workflow_nodes/customerIo.json +206 -0
  165. package/workflow_nodes/customerIoTrigger.json +185 -0
  166. package/workflow_nodes/dateTime.json +39 -0
  167. package/workflow_nodes/debughelper.json +162 -0
  168. package/workflow_nodes/deepL.json +103 -0
  169. package/workflow_nodes/demio.json +187 -0
  170. package/workflow_nodes/dhl.json +53 -0
  171. package/workflow_nodes/discord.json +81 -0
  172. package/workflow_nodes/discourse.json +319 -0
  173. package/workflow_nodes/disqus.json +254 -0
  174. package/workflow_nodes/drift.json +112 -0
  175. package/workflow_nodes/dropbox.json +258 -0
  176. package/workflow_nodes/dropcontact.json +154 -0
  177. package/workflow_nodes/e2eTest.json +70 -0
  178. package/workflow_nodes/editImage.json +132 -0
  179. package/workflow_nodes/egoi.json +220 -0
  180. package/workflow_nodes/elasticSecurity.json +401 -0
  181. package/workflow_nodes/elasticsearch.json +422 -0
  182. package/workflow_nodes/emailReadImap.json +88 -0
  183. package/workflow_nodes/emailSend.json +38 -0
  184. package/workflow_nodes/emelia.json +201 -0
  185. package/workflow_nodes/emeliaTrigger.json +57 -0
  186. package/workflow_nodes/erpNext.json +139 -0
  187. package/workflow_nodes/errorTrigger.json +15 -0
  188. package/workflow_nodes/evaluationMetrics.json +21 -0
  189. package/workflow_nodes/eventbriteTrigger.json +125 -0
  190. package/workflow_nodes/executeCommand.json +25 -0
  191. package/workflow_nodes/executeWorkflow.json +102 -0
  192. package/workflow_nodes/executeWorkflowTrigger.json +65 -0
  193. package/workflow_nodes/executionData.json +35 -0
  194. package/workflow_nodes/extractFromFile.json +71 -0
  195. package/workflow_nodes/facebookGraphApi.json +234 -0
  196. package/workflow_nodes/facebookLeadAdsTrigger.json +8 -0
  197. package/workflow_nodes/facebookTrigger.json +112 -0
  198. package/workflow_nodes/figmaTrigger.json +8 -0
  199. package/workflow_nodes/filemaker.json +268 -0
  200. package/workflow_nodes/filter.json +24 -0
  201. package/workflow_nodes/flow.json +323 -0
  202. package/workflow_nodes/flowTrigger.json +52 -0
  203. package/workflow_nodes/form.json +25 -0
  204. package/workflow_nodes/formIoTrigger.json +59 -0
  205. package/workflow_nodes/formTrigger.json +8 -0
  206. package/workflow_nodes/formstackTrigger.json +8 -0
  207. package/workflow_nodes/freshdesk.json +584 -0
  208. package/workflow_nodes/freshservice.json +899 -0
  209. package/workflow_nodes/freshworksCrm.json +772 -0
  210. package/workflow_nodes/ftp.json +127 -0
  211. package/workflow_nodes/function.json +22 -0
  212. package/workflow_nodes/functionItem.json +22 -0
  213. package/workflow_nodes/gSuiteAdmin.json +562 -0
  214. package/workflow_nodes/getResponse.json +310 -0
  215. package/workflow_nodes/getResponseTrigger.json +82 -0
  216. package/workflow_nodes/ghost.json +290 -0
  217. package/workflow_nodes/git.json +184 -0
  218. package/workflow_nodes/github.json +732 -0
  219. package/workflow_nodes/githubTrigger.json +317 -0
  220. package/workflow_nodes/gitlab.json +544 -0
  221. package/workflow_nodes/gitlabTrigger.json +61 -0
  222. package/workflow_nodes/gmail.json +62 -0
  223. package/workflow_nodes/gmailTrigger.json +127 -0
  224. package/workflow_nodes/goToWebinar.json +430 -0
  225. package/workflow_nodes/gong.json +22 -0
  226. package/workflow_nodes/googleAds.json +116 -0
  227. package/workflow_nodes/googleAnalytics.json +28 -0
  228. package/workflow_nodes/googleBigQuery.json +38 -0
  229. package/workflow_nodes/googleBooks.json +154 -0
  230. package/workflow_nodes/googleBusinessProfile.json +277 -0
  231. package/workflow_nodes/googleBusinessProfileTrigger.json +55 -0
  232. package/workflow_nodes/googleCalendar.json +474 -0
  233. package/workflow_nodes/googleCalendarTrigger.json +72 -0
  234. package/workflow_nodes/googleChat.json +187 -0
  235. package/workflow_nodes/googleCloudNaturalLanguage.json +171 -0
  236. package/workflow_nodes/googleCloudStorage.json +466 -0
  237. package/workflow_nodes/googleContacts.json +481 -0
  238. package/workflow_nodes/googleDocs.json +312 -0
  239. package/workflow_nodes/googleDrive.json +920 -0
  240. package/workflow_nodes/googleDriveTrigger.json +181 -0
  241. package/workflow_nodes/googleFirebaseCloudFirestore.json +156 -0
  242. package/workflow_nodes/googleFirebaseRealtimeDatabase.json +75 -0
  243. package/workflow_nodes/googlePerspective.json +94 -0
  244. package/workflow_nodes/googleSheets.json +98 -0
  245. package/workflow_nodes/googleSheetsTrigger.json +192 -0
  246. package/workflow_nodes/googleSlides.json +186 -0
  247. package/workflow_nodes/googleTasks.json +198 -0
  248. package/workflow_nodes/googleTranslate.json +80 -0
  249. package/workflow_nodes/gotify.json +110 -0
  250. package/workflow_nodes/grafana.json +155 -0
  251. package/workflow_nodes/graphql.json +165 -0
  252. package/workflow_nodes/grist.json +13 -0
  253. package/workflow_nodes/gumroadTrigger.json +8 -0
  254. package/workflow_nodes/hackerNews.json +100 -0
  255. package/workflow_nodes/haloPSA.json +286 -0
  256. package/workflow_nodes/harvest.json +699 -0
  257. package/workflow_nodes/helpScout.json +629 -0
  258. package/workflow_nodes/helpScoutTrigger.json +8 -0
  259. package/workflow_nodes/highLevel.json +8 -0
  260. package/workflow_nodes/homeAssistant.json +201 -0
  261. package/workflow_nodes/html.json +118 -0
  262. package/workflow_nodes/htmlExtract.json +87 -0
  263. package/workflow_nodes/httpRequest.json +472 -0
  264. package/workflow_nodes/hubspot.json +62 -0
  265. package/workflow_nodes/hubspotTrigger.json +138 -0
  266. package/workflow_nodes/humanticAi.json +82 -0
  267. package/workflow_nodes/hunter.json +168 -0
  268. package/workflow_nodes/iCal.json +20 -0
  269. package/workflow_nodes/if.json +24 -0
  270. package/workflow_nodes/intercom.json +335 -0
  271. package/workflow_nodes/interval.json +8 -0
  272. package/workflow_nodes/invoiceNinja.json +882 -0
  273. package/workflow_nodes/invoiceNinjaTrigger.json +11 -0
  274. package/workflow_nodes/itemLists.json +313 -0
  275. package/workflow_nodes/iterable.json +168 -0
  276. package/workflow_nodes/jenkins.json +172 -0
  277. package/workflow_nodes/jira.json +529 -0
  278. package/workflow_nodes/jiraTrigger.json +308 -0
  279. package/workflow_nodes/jotFormTrigger.json +44 -0
  280. package/workflow_nodes/jwt.json +195 -0
  281. package/workflow_nodes/kafka.json +132 -0
  282. package/workflow_nodes/kafkaTrigger.json +11 -0
  283. package/workflow_nodes/keap.json +915 -0
  284. package/workflow_nodes/keapTrigger.json +37 -0
  285. package/workflow_nodes/kitemaker.json +153 -0
  286. package/workflow_nodes/koBoToolbox.json +337 -0
  287. package/workflow_nodes/koBoToolboxTrigger.json +8 -0
  288. package/workflow_nodes/langchain_Summarization Chain.json +60 -0
  289. package/workflow_nodes/langchain_agent.json +145 -0
  290. package/workflow_nodes/langchain_allowFileUploads.json +180 -0
  291. package/workflow_nodes/langchain_chainLlm.json +16 -0
  292. package/workflow_nodes/langchain_chainSummarization.json +119 -0
  293. package/workflow_nodes/langchain_code.json +62 -0
  294. package/workflow_nodes/langchain_documentBinaryInputLoader.json +8 -0
  295. package/workflow_nodes/langchain_documentDefaultDataLoader.json +8 -0
  296. package/workflow_nodes/langchain_documentGithubLoader.json +8 -0
  297. package/workflow_nodes/langchain_documentJsonInputLoader.json +8 -0
  298. package/workflow_nodes/langchain_embeddingDimensions.json +17 -0
  299. package/workflow_nodes/langchain_embeddingsAwsBedrock.json +8 -0
  300. package/workflow_nodes/langchain_embeddingsAzureOpenAi.json +151 -0
  301. package/workflow_nodes/langchain_embeddingsCohere.json +8 -0
  302. package/workflow_nodes/langchain_embeddingsGoogleGemini.json +8 -0
  303. package/workflow_nodes/langchain_embeddingsGoogleVertex.json +8 -0
  304. package/workflow_nodes/langchain_embeddingsHuggingFaceInference.json +8 -0
  305. package/workflow_nodes/langchain_embeddingsMistralCloud.json +8 -0
  306. package/workflow_nodes/langchain_embeddingsOllama.json +8 -0
  307. package/workflow_nodes/langchain_informationExtractor.json +81 -0
  308. package/workflow_nodes/langchain_lmChatAwsBedrock.json +8 -0
  309. package/workflow_nodes/langchain_lmChatAzureOpenAi.json +151 -0
  310. package/workflow_nodes/langchain_lmChatDeepSeek.json +10 -0
  311. package/workflow_nodes/langchain_lmChatGoogleGemini.json +31 -0
  312. package/workflow_nodes/langchain_lmChatGoogleVertex.json +32 -0
  313. package/workflow_nodes/langchain_lmChatGroq.json +8 -0
  314. package/workflow_nodes/langchain_lmChatMistralCloud.json +8 -0
  315. package/workflow_nodes/langchain_lmChatOllama.json +8 -0
  316. package/workflow_nodes/langchain_lmChatOpenAi.json +155 -0
  317. package/workflow_nodes/langchain_lmChatOpenRouter.json +10 -0
  318. package/workflow_nodes/langchain_lmChatXAiGrok.json +10 -0
  319. package/workflow_nodes/langchain_lmCohere.json +8 -0
  320. package/workflow_nodes/langchain_lmOllama.json +8 -0
  321. package/workflow_nodes/langchain_lmOpenAi.json +251 -0
  322. package/workflow_nodes/langchain_lmOpenHuggingFaceInference.json +8 -0
  323. package/workflow_nodes/langchain_manualChatTrigger.json +11 -0
  324. package/workflow_nodes/langchain_mcpClientTool.json +86 -0
  325. package/workflow_nodes/langchain_mcpTrigger.json +8 -0
  326. package/workflow_nodes/langchain_memoryBufferWindow.json +13 -0
  327. package/workflow_nodes/langchain_memoryChatRetriever.json +22 -0
  328. package/workflow_nodes/langchain_memoryManager.json +106 -0
  329. package/workflow_nodes/langchain_memoryMongoDbChat.json +10 -0
  330. package/workflow_nodes/langchain_memoryMotorhead.json +13 -0
  331. package/workflow_nodes/langchain_memoryPostgresChat.json +13 -0
  332. package/workflow_nodes/langchain_memoryRedisChat.json +15 -0
  333. package/workflow_nodes/langchain_memoryXata.json +14 -0
  334. package/workflow_nodes/langchain_memoryZep.json +13 -0
  335. package/workflow_nodes/langchain_model.json +155 -0
  336. package/workflow_nodes/langchain_mongoCollection.json +16 -0
  337. package/workflow_nodes/langchain_notice.json +22 -0
  338. package/workflow_nodes/langchain_openAiAssistant.json +132 -0
  339. package/workflow_nodes/langchain_options.json +17 -0
  340. package/workflow_nodes/langchain_outputParserAutofixing.json +8 -0
  341. package/workflow_nodes/langchain_outputParserItemList.json +8 -0
  342. package/workflow_nodes/langchain_outputParserStructured.json +12 -0
  343. package/workflow_nodes/langchain_pineconeNamespace.json +16 -0
  344. package/workflow_nodes/langchain_queryName.json +16 -0
  345. package/workflow_nodes/langchain_retrieverContextualCompression.json +8 -0
  346. package/workflow_nodes/langchain_retrieverMultiQuery.json +8 -0
  347. package/workflow_nodes/langchain_retrieverVectorStore.json +8 -0
  348. package/workflow_nodes/langchain_retrieverWorkflow.json +103 -0
  349. package/workflow_nodes/langchain_sentimentAnalysis.json +52 -0
  350. package/workflow_nodes/langchain_systemPromptTemplate.json +47 -0
  351. package/workflow_nodes/langchain_tableName.json +23 -0
  352. package/workflow_nodes/langchain_textClassifier.json +66 -0
  353. package/workflow_nodes/langchain_textSplitterCharacterTextSplitter.json +8 -0
  354. package/workflow_nodes/langchain_textSplitterRecursiveCharacterTextSplitter.json +8 -0
  355. package/workflow_nodes/langchain_textSplitterTokenSplitter.json +8 -0
  356. package/workflow_nodes/langchain_toolCalculator.json +8 -0
  357. package/workflow_nodes/langchain_toolCode.json +12 -0
  358. package/workflow_nodes/langchain_toolHttpRequest.json +232 -0
  359. package/workflow_nodes/langchain_toolSearXng.json +8 -0
  360. package/workflow_nodes/langchain_toolSerpApi.json +8 -0
  361. package/workflow_nodes/langchain_toolThink.json +8 -0
  362. package/workflow_nodes/langchain_toolVectorStore.json +11 -0
  363. package/workflow_nodes/langchain_toolWikipedia.json +8 -0
  364. package/workflow_nodes/langchain_toolWolframAlpha.json +8 -0
  365. package/workflow_nodes/langchain_toolWorkflow.json +8 -0
  366. package/workflow_nodes/langchain_vectorStoreInMemoryInsert.json +29 -0
  367. package/workflow_nodes/langchain_vectorStoreInMemoryLoad.json +8 -0
  368. package/workflow_nodes/langchain_vectorStorePineconeInsert.json +37 -0
  369. package/workflow_nodes/langchain_vectorStorePineconeLoad.json +8 -0
  370. package/workflow_nodes/langchain_vectorStoreSupabaseInsert.json +32 -0
  371. package/workflow_nodes/langchain_vectorStoreSupabaseLoad.json +8 -0
  372. package/workflow_nodes/langchain_vectorStoreZepInsert.json +46 -0
  373. package/workflow_nodes/langchain_vectorStoreZepLoad.json +8 -0
  374. package/workflow_nodes/ldap.json +182 -0
  375. package/workflow_nodes/lemlist.json +44 -0
  376. package/workflow_nodes/lemlistTrigger.json +45 -0
  377. package/workflow_nodes/limit.json +26 -0
  378. package/workflow_nodes/line.json +95 -0
  379. package/workflow_nodes/linear.json +151 -0
  380. package/workflow_nodes/linearTrigger.json +71 -0
  381. package/workflow_nodes/lingvaNex.json +66 -0
  382. package/workflow_nodes/linkedIn.json +142 -0
  383. package/workflow_nodes/localFileTrigger.json +120 -0
  384. package/workflow_nodes/lonescale.json +171 -0
  385. package/workflow_nodes/lonescaleTrigger.json +8 -0
  386. package/workflow_nodes/magento2.json +164 -0
  387. package/workflow_nodes/mailcheck.json +46 -0
  388. package/workflow_nodes/mailchimp.json +507 -0
  389. package/workflow_nodes/mailchimpTrigger.json +100 -0
  390. package/workflow_nodes/mailerLite.json +24 -0
  391. package/workflow_nodes/mailerLiteTrigger.json +74 -0
  392. package/workflow_nodes/mailgun.json +81 -0
  393. package/workflow_nodes/mailjet.json +201 -0
  394. package/workflow_nodes/mailjetTrigger.json +8 -0
  395. package/workflow_nodes/mandrill.json +372 -0
  396. package/workflow_nodes/manualTrigger.json +8 -0
  397. package/workflow_nodes/markdown.json +376 -0
  398. package/workflow_nodes/marketstack.json +126 -0
  399. package/workflow_nodes/matrix.json +264 -0
  400. package/workflow_nodes/mattermost.json +8 -0
  401. package/workflow_nodes/mautic.json +564 -0
  402. package/workflow_nodes/mauticTrigger.json +54 -0
  403. package/workflow_nodes/medium.json +209 -0
  404. package/workflow_nodes/merge.json +125 -0
  405. package/workflow_nodes/messageBird.json +182 -0
  406. package/workflow_nodes/metabase.json +175 -0
  407. package/workflow_nodes/microsoftDynamicsCrm.json +100 -0
  408. package/workflow_nodes/microsoftEntra.json +51 -0
  409. package/workflow_nodes/microsoftExcel.json +35 -0
  410. package/workflow_nodes/microsoftGraphSecurity.json +113 -0
  411. package/workflow_nodes/microsoftOneDrive.json +232 -0
  412. package/workflow_nodes/microsoftOneDriveTrigger.json +80 -0
  413. package/workflow_nodes/microsoftOutlook.json +40 -0
  414. package/workflow_nodes/microsoftOutlookTrigger.json +24 -0
  415. package/workflow_nodes/microsoftSql.json +81 -0
  416. package/workflow_nodes/microsoftTeams.json +36 -0
  417. package/workflow_nodes/microsoftToDo.json +181 -0
  418. package/workflow_nodes/mindee.json +86 -0
  419. package/workflow_nodes/misp.json +399 -0
  420. package/workflow_nodes/mocean.json +103 -0
  421. package/workflow_nodes/mondayCom.json +290 -0
  422. package/workflow_nodes/mongoDb.json +16 -0
  423. package/workflow_nodes/monicaCrm.json +543 -0
  424. package/workflow_nodes/moveBinaryData.json +121 -0
  425. package/workflow_nodes/mqtt.json +67 -0
  426. package/workflow_nodes/mqttTrigger.json +47 -0
  427. package/workflow_nodes/msg91.json +65 -0
  428. package/workflow_nodes/mySql.json +111 -0
  429. package/workflow_nodes/n8n.json +75 -0
  430. package/workflow_nodes/n8nTrigger.json +27 -0
  431. package/workflow_nodes/nasa.json +310 -0
  432. package/workflow_nodes/netlify.json +87 -0
  433. package/workflow_nodes/netlifyTrigger.json +68 -0
  434. package/workflow_nodes/netscalerAdc.json +243 -0
  435. package/workflow_nodes/nextCloud.json +312 -0
  436. package/workflow_nodes/noOp.json +8 -0
  437. package/workflow_nodes/nocoDb.json +276 -0
  438. package/workflow_nodes/notion.json +8 -0
  439. package/workflow_nodes/notionTrigger.json +75 -0
  440. package/workflow_nodes/npm.json +64 -0
  441. package/workflow_nodes/odoo.json +344 -0
  442. package/workflow_nodes/okta.json +97 -0
  443. package/workflow_nodes/oneSimpleApi.json +281 -0
  444. package/workflow_nodes/onfleet.json +316 -0
  445. package/workflow_nodes/onfleetTrigger.json +8 -0
  446. package/workflow_nodes/openAi.json +154 -0
  447. package/workflow_nodes/openThesaurus.json +81 -0
  448. package/workflow_nodes/openWeatherMap.json +129 -0
  449. package/workflow_nodes/orbit.json +375 -0
  450. package/workflow_nodes/oura.json +74 -0
  451. package/workflow_nodes/paddle.json +403 -0
  452. package/workflow_nodes/pagerDuty.json +351 -0
  453. package/workflow_nodes/payPal.json +196 -0
  454. package/workflow_nodes/payPalTrigger.json +40 -0
  455. package/workflow_nodes/peekalink.json +41 -0
  456. package/workflow_nodes/phantombuster.json +172 -0
  457. package/workflow_nodes/philipsHue.json +177 -0
  458. package/workflow_nodes/pipedrive.json +860 -0
  459. package/workflow_nodes/pipedriveTrigger.json +11 -0
  460. package/workflow_nodes/plivo.json +91 -0
  461. package/workflow_nodes/postHog.json +122 -0
  462. package/workflow_nodes/postbin.json +60 -0
  463. package/workflow_nodes/postgres.json +109 -0
  464. package/workflow_nodes/postgresTrigger.json +8 -0
  465. package/workflow_nodes/postmarkTrigger.json +72 -0
  466. package/workflow_nodes/profitWell.json +305 -0
  467. package/workflow_nodes/pushbullet.json +186 -0
  468. package/workflow_nodes/pushcut.json +75 -0
  469. package/workflow_nodes/pushcutTrigger.json +8 -0
  470. package/workflow_nodes/pushover.json +159 -0
  471. package/workflow_nodes/questDb.json +94 -0
  472. package/workflow_nodes/quickChart.json +188 -0
  473. package/workflow_nodes/quickbase.json +205 -0
  474. package/workflow_nodes/quickbooks.json +550 -0
  475. package/workflow_nodes/rabbitmq.json +165 -0
  476. package/workflow_nodes/rabbitmqTrigger.json +8 -0
  477. package/workflow_nodes/raindrop.json +216 -0
  478. package/workflow_nodes/readBinaryFile.json +26 -0
  479. package/workflow_nodes/readBinaryFiles.json +26 -0
  480. package/workflow_nodes/readPDF.json +31 -0
  481. package/workflow_nodes/readWriteFile.json +27 -0
  482. package/workflow_nodes/reddit.json +309 -0
  483. package/workflow_nodes/redis.json +183 -0
  484. package/workflow_nodes/redisTrigger.json +8 -0
  485. package/workflow_nodes/removeDuplicates.json +8 -0
  486. package/workflow_nodes/renameKeys.json +67 -0
  487. package/workflow_nodes/respondToWebhook.json +126 -0
  488. package/workflow_nodes/rocketchat.json +216 -0
  489. package/workflow_nodes/rssFeedRead.json +28 -0
  490. package/workflow_nodes/rssFeedReadTrigger.json +17 -0
  491. package/workflow_nodes/rundeck.json +79 -0
  492. package/workflow_nodes/s3.json +425 -0
  493. package/workflow_nodes/salesforce.json +1137 -0
  494. package/workflow_nodes/salesforceTrigger.json +122 -0
  495. package/workflow_nodes/salesmate.json +467 -0
  496. package/workflow_nodes/scheduleTrigger.json +270 -0
  497. package/workflow_nodes/seaTable.json +8 -0
  498. package/workflow_nodes/seaTableTrigger.json +87 -0
  499. package/workflow_nodes/securityScorecard.json +459 -0
  500. package/workflow_nodes/segment.json +219 -0
  501. package/workflow_nodes/sendGrid.json +359 -0
  502. package/workflow_nodes/sendy.json +225 -0
  503. package/workflow_nodes/sentryIo.json +426 -0
  504. package/workflow_nodes/serviceNow.json +544 -0
  505. package/workflow_nodes/set.json +124 -0
  506. package/workflow_nodes/shopify.json +707 -0
  507. package/workflow_nodes/shopifyTrigger.json +8 -0
  508. package/workflow_nodes/signl4.json +133 -0
  509. package/workflow_nodes/simulate.json +30 -0
  510. package/workflow_nodes/simulateTrigger.json +8 -0
  511. package/workflow_nodes/slack.json +62 -0
  512. package/workflow_nodes/slackTrigger.json +135 -0
  513. package/workflow_nodes/sms77.json +121 -0
  514. package/workflow_nodes/snowflake.json +65 -0
  515. package/workflow_nodes/sort.json +57 -0
  516. package/workflow_nodes/splitInBatches.json +30 -0
  517. package/workflow_nodes/splitOut.json +62 -0
  518. package/workflow_nodes/splunk.json +40 -0
  519. package/workflow_nodes/spontit.json +123 -0
  520. package/workflow_nodes/spotify.json +285 -0
  521. package/workflow_nodes/spreadsheetFile.json +8 -0
  522. package/workflow_nodes/sseTrigger.json +8 -0
  523. package/workflow_nodes/ssh.json +105 -0
  524. package/workflow_nodes/stackby.json +85 -0
  525. package/workflow_nodes/start.json +15 -0
  526. package/workflow_nodes/stickyNote.json +36 -0
  527. package/workflow_nodes/stopAndError.json +8 -0
  528. package/workflow_nodes/storyblok.json +138 -0
  529. package/workflow_nodes/strapi.json +138 -0
  530. package/workflow_nodes/strava.json +427 -0
  531. package/workflow_nodes/stravaTrigger.json +79 -0
  532. package/workflow_nodes/stripe.json +357 -0
  533. package/workflow_nodes/stripeTrigger.json +775 -0
  534. package/workflow_nodes/summarize.json +124 -0
  535. package/workflow_nodes/supabase.json +136 -0
  536. package/workflow_nodes/surveyMonkeyTrigger.json +160 -0
  537. package/workflow_nodes/switch.json +91 -0
  538. package/workflow_nodes/syncroMsp.json +8 -0
  539. package/workflow_nodes/taiga.json +340 -0
  540. package/workflow_nodes/taigaTrigger.json +81 -0
  541. package/workflow_nodes/tapfiliate.json +241 -0
  542. package/workflow_nodes/telegram.json +612 -0
  543. package/workflow_nodes/telegramTrigger.json +142 -0
  544. package/workflow_nodes/theHive.json +497 -0
  545. package/workflow_nodes/theHiveProject.json +8 -0
  546. package/workflow_nodes/theHiveProjectTrigger.json +162 -0
  547. package/workflow_nodes/theHiveTrigger.json +101 -0
  548. package/workflow_nodes/timescaleDb.json +95 -0
  549. package/workflow_nodes/todoist.json +285 -0
  550. package/workflow_nodes/togglTrigger.json +24 -0
  551. package/workflow_nodes/totp.json +86 -0
  552. package/workflow_nodes/travisCi.json +142 -0
  553. package/workflow_nodes/trello.json +609 -0
  554. package/workflow_nodes/trelloTrigger.json +8 -0
  555. package/workflow_nodes/twake.json +76 -0
  556. package/workflow_nodes/twilio.json +95 -0
  557. package/workflow_nodes/twilioTrigger.json +46 -0
  558. package/workflow_nodes/twist.json +376 -0
  559. package/workflow_nodes/twitter.json +40 -0
  560. package/workflow_nodes/typeformTrigger.json +62 -0
  561. package/workflow_nodes/unleashedSoftware.json +154 -0
  562. package/workflow_nodes/uplead.json +72 -0
  563. package/workflow_nodes/uproc.json +26 -0
  564. package/workflow_nodes/uptimeRobot.json +453 -0
  565. package/workflow_nodes/urlScanIo.json +113 -0
  566. package/workflow_nodes/venafiTlsProtectCloud.json +310 -0
  567. package/workflow_nodes/venafiTlsProtectCloudTrigger.json +38 -0
  568. package/workflow_nodes/venafiTlsProtectDatacenter.json +491 -0
  569. package/workflow_nodes/vero.json +158 -0
  570. package/workflow_nodes/vonage.json +125 -0
  571. package/workflow_nodes/wait.json +71 -0
  572. package/workflow_nodes/webflow.json +38 -0
  573. package/workflow_nodes/webflowTrigger.json +8 -0
  574. package/workflow_nodes/webhook.json +55 -0
  575. package/workflow_nodes/wekan.json +460 -0
  576. package/workflow_nodes/whatsApp.json +476 -0
  577. package/workflow_nodes/whatsAppTrigger.json +103 -0
  578. package/workflow_nodes/wise.json +330 -0
  579. package/workflow_nodes/wiseTrigger.json +8 -0
  580. package/workflow_nodes/wooCommerce.json +812 -0
  581. package/workflow_nodes/wooCommerceTrigger.json +8 -0
  582. package/workflow_nodes/wordpress.json +500 -0
  583. package/workflow_nodes/workableTrigger.json +51 -0
  584. package/workflow_nodes/writeBinaryFile.json +34 -0
  585. package/workflow_nodes/wufooTrigger.json +37 -0
  586. package/workflow_nodes/xero.json +530 -0
  587. package/workflow_nodes/xml.json +129 -0
  588. package/workflow_nodes/youTube.json +578 -0
  589. package/workflow_nodes/yourls.json +71 -0
  590. package/workflow_nodes/zammad.json +406 -0
  591. package/workflow_nodes/zendesk.json +526 -0
  592. package/workflow_nodes/zendeskTrigger.json +187 -0
  593. package/workflow_nodes/zohoCrm.json +721 -0
  594. package/workflow_nodes/zoom.json +507 -0
  595. package/workflow_nodes/zulip.json +371 -0
package/.windsurfrules ADDED
@@ -0,0 +1,2382 @@
1
+ Below you will find a variety of important rules spanning:
2
+ - the dev_workflow
3
+ - the .windsurfrules document self-improvement workflow
4
+ - the template to follow when modifying or adding new sections/rules to this document.
5
+
6
+ ---
7
+ DEV_WORKFLOW
8
+ ---
9
+ description: Guide for using meta-development script (scripts/dev.js) to manage task-driven development workflows
10
+ globs: **/*
11
+ filesToApplyRule: **/*
12
+ alwaysApply: true
13
+ ---
14
+
15
+ - **Global CLI Commands**
16
+ - Task Master now provides a global CLI through the `task-master` command
17
+ - All functionality from `scripts/dev.js` is available through this interface
18
+ - Install globally with `npm install -g claude-task-master` or use locally via `npx`
19
+ - Use `task-master <command>` instead of `node scripts/dev.js <command>`
20
+ - Examples:
21
+ - `task-master list` instead of `node scripts/dev.js list`
22
+ - `task-master next` instead of `node scripts/dev.js next`
23
+ - `task-master expand --id=3` instead of `node scripts/dev.js expand --id=3`
24
+ - All commands accept the same options as their script equivalents
25
+ - The CLI provides additional commands like `task-master init` for project setup
26
+
27
+ - **Development Workflow Process**
28
+ - Start new projects by running `task-master init` or `node scripts/dev.js parse-prd --input=<prd-file.txt>` to generate initial tasks.json
29
+ - Begin coding sessions with `task-master list` to see current tasks, status, and IDs
30
+ - Analyze task complexity with `task-master analyze-complexity --research` before breaking down tasks
31
+ - Select tasks based on dependencies (all marked 'done'), priority level, and ID order
32
+ - Clarify tasks by checking task files in tasks/ directory or asking for user input
33
+ - View specific task details using `task-master show <id>` to understand implementation requirements
34
+ - Break down complex tasks using `task-master expand --id=<id>` with appropriate flags
35
+ - Clear existing subtasks if needed using `task-master clear-subtasks --id=<id>` before regenerating
36
+ - Implement code following task details, dependencies, and project standards
37
+ - Verify tasks according to test strategies before marking as complete
38
+ - Mark completed tasks with `task-master set-status --id=<id> --status=done`
39
+ - Update dependent tasks when implementation differs from original plan
40
+ - Generate task files with `task-master generate` after updating tasks.json
41
+ - Maintain valid dependency structure with `task-master fix-dependencies` when needed
42
+ - Respect dependency chains and task priorities when selecting work
43
+ - Report progress regularly using the list command
44
+
45
+ - **Task Complexity Analysis**
46
+ - Run `node scripts/dev.js analyze-complexity --research` for comprehensive analysis
47
+ - Review complexity report in scripts/task-complexity-report.json
48
+ - Or use `node scripts/dev.js complexity-report` for a formatted, readable version of the report
49
+ - Focus on tasks with highest complexity scores (8-10) for detailed breakdown
50
+ - Use analysis results to determine appropriate subtask allocation
51
+ - Note that reports are automatically used by the expand command
52
+
53
+ - **Task Breakdown Process**
54
+ - For tasks with complexity analysis, use `node scripts/dev.js expand --id=<id>`
55
+ - Otherwise use `node scripts/dev.js expand --id=<id> --subtasks=<number>`
56
+ - Add `--research` flag to leverage Perplexity AI for research-backed expansion
57
+ - Use `--prompt="<context>"` to provide additional context when needed
58
+ - Review and adjust generated subtasks as necessary
59
+ - Use `--all` flag to expand multiple pending tasks at once
60
+ - If subtasks need regeneration, clear them first with `clear-subtasks` command
61
+
62
+ - **Implementation Drift Handling**
63
+ - When implementation differs significantly from planned approach
64
+ - When future tasks need modification due to current implementation choices
65
+ - When new dependencies or requirements emerge
66
+ - Call `node scripts/dev.js update --from=<futureTaskId> --prompt="<explanation>"` to update tasks.json
67
+
68
+ - **Task Status Management**
69
+ - Use 'pending' for tasks ready to be worked on
70
+ - Use 'done' for completed and verified tasks
71
+ - Use 'deferred' for postponed tasks
72
+ - Add custom status values as needed for project-specific workflows
73
+
74
+ - **Task File Format Reference**
75
+ ```
76
+ # Task ID: <id>
77
+ # Title: <title>
78
+ # Status: <status>
79
+ # Dependencies: <comma-separated list of dependency IDs>
80
+ # Priority: <priority>
81
+ # Description: <brief description>
82
+ # Details:
83
+ <detailed implementation notes>
84
+
85
+ # Test Strategy:
86
+ <verification approach>
87
+ ```
88
+
89
+ - **Command Reference: parse-prd**
90
+ - Legacy Syntax: `node scripts/dev.js parse-prd --input=<prd-file.txt>`
91
+ - CLI Syntax: `task-master parse-prd --input=<prd-file.txt>`
92
+ - Description: Parses a PRD document and generates a tasks.json file with structured tasks
93
+ - Parameters:
94
+ - `--input=<file>`: Path to the PRD text file (default: sample-prd.txt)
95
+ - Example: `task-master parse-prd --input=requirements.txt`
96
+ - Notes: Will overwrite existing tasks.json file. Use with caution.
97
+
98
+ - **Command Reference: update**
99
+ - Legacy Syntax: `node scripts/dev.js update --from=<id> --prompt="<prompt>"`
100
+ - CLI Syntax: `task-master update --from=<id> --prompt="<prompt>"`
101
+ - Description: Updates tasks with ID >= specified ID based on the provided prompt
102
+ - Parameters:
103
+ - `--from=<id>`: Task ID from which to start updating (required)
104
+ - `--prompt="<text>"`: Explanation of changes or new context (required)
105
+ - Example: `task-master update --from=4 --prompt="Now we are using Express instead of Fastify."`
106
+ - Notes: Only updates tasks not marked as 'done'. Completed tasks remain unchanged.
107
+
108
+ - **Command Reference: generate**
109
+ - Legacy Syntax: `node scripts/dev.js generate`
110
+ - CLI Syntax: `task-master generate`
111
+ - Description: Generates individual task files in tasks/ directory based on tasks.json
112
+ - Parameters:
113
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
114
+ - `--output=<dir>, -o`: Output directory (default: 'tasks')
115
+ - Example: `task-master generate`
116
+ - Notes: Overwrites existing task files. Creates tasks/ directory if needed.
117
+
118
+ - **Command Reference: set-status**
119
+ - Legacy Syntax: `node scripts/dev.js set-status --id=<id> --status=<status>`
120
+ - CLI Syntax: `task-master set-status --id=<id> --status=<status>`
121
+ - Description: Updates the status of a specific task in tasks.json
122
+ - Parameters:
123
+ - `--id=<id>`: ID of the task to update (required)
124
+ - `--status=<status>`: New status value (required)
125
+ - Example: `task-master set-status --id=3 --status=done`
126
+ - Notes: Common values are 'done', 'pending', and 'deferred', but any string is accepted.
127
+
128
+ - **Command Reference: list**
129
+ - Legacy Syntax: `node scripts/dev.js list`
130
+ - CLI Syntax: `task-master list`
131
+ - Description: Lists all tasks in tasks.json with IDs, titles, and status
132
+ - Parameters:
133
+ - `--status=<status>, -s`: Filter by status
134
+ - `--with-subtasks`: Show subtasks for each task
135
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
136
+ - Example: `task-master list`
137
+ - Notes: Provides quick overview of project progress. Use at start of sessions.
138
+
139
+ - **Command Reference: expand**
140
+ - Legacy Syntax: `node scripts/dev.js expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]`
141
+ - CLI Syntax: `task-master expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]`
142
+ - Description: Expands a task with subtasks for detailed implementation
143
+ - Parameters:
144
+ - `--id=<id>`: ID of task to expand (required unless using --all)
145
+ - `--all`: Expand all pending tasks, prioritized by complexity
146
+ - `--num=<number>`: Number of subtasks to generate (default: from complexity report)
147
+ - `--research`: Use Perplexity AI for research-backed generation
148
+ - `--prompt="<text>"`: Additional context for subtask generation
149
+ - `--force`: Regenerate subtasks even for tasks that already have them
150
+ - Example: `task-master expand --id=3 --num=5 --research --prompt="Focus on security aspects"`
151
+ - Notes: Uses complexity report recommendations if available.
152
+
153
+ - **Command Reference: analyze-complexity**
154
+ - Legacy Syntax: `node scripts/dev.js analyze-complexity [options]`
155
+ - CLI Syntax: `task-master analyze-complexity [options]`
156
+ - Description: Analyzes task complexity and generates expansion recommendations
157
+ - Parameters:
158
+ - `--output=<file>, -o`: Output file path (default: scripts/task-complexity-report.json)
159
+ - `--model=<model>, -m`: Override LLM model to use
160
+ - `--threshold=<number>, -t`: Minimum score for expansion recommendation (default: 5)
161
+ - `--file=<path>, -f`: Use alternative tasks.json file
162
+ - `--research, -r`: Use Perplexity AI for research-backed analysis
163
+ - Example: `task-master analyze-complexity --research`
164
+ - Notes: Report includes complexity scores, recommended subtasks, and tailored prompts.
165
+
166
+ - **Command Reference: clear-subtasks**
167
+ - Legacy Syntax: `node scripts/dev.js clear-subtasks --id=<id>`
168
+ - CLI Syntax: `task-master clear-subtasks --id=<id>`
169
+ - Description: Removes subtasks from specified tasks to allow regeneration
170
+ - Parameters:
171
+ - `--id=<id>`: ID or comma-separated IDs of tasks to clear subtasks from
172
+ - `--all`: Clear subtasks from all tasks
173
+ - Examples:
174
+ - `task-master clear-subtasks --id=3`
175
+ - `task-master clear-subtasks --id=1,2,3`
176
+ - `task-master clear-subtasks --all`
177
+ - Notes:
178
+ - Task files are automatically regenerated after clearing subtasks
179
+ - Can be combined with expand command to immediately generate new subtasks
180
+ - Works with both parent tasks and individual subtasks
181
+
182
+ - **Task Structure Fields**
183
+ - **id**: Unique identifier for the task (Example: `1`)
184
+ - **title**: Brief, descriptive title (Example: `"Initialize Repo"`)
185
+ - **description**: Concise summary of what the task involves (Example: `"Create a new repository, set up initial structure."`)
186
+ - **status**: Current state of the task (Example: `"pending"`, `"done"`, `"deferred"`)
187
+ - **dependencies**: IDs of prerequisite tasks (Example: `[1, 2]`)
188
+ - Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending)
189
+ - This helps quickly identify which prerequisite tasks are blocking work
190
+ - **priority**: Importance level (Example: `"high"`, `"medium"`, `"low"`)
191
+ - **details**: In-depth implementation instructions (Example: `"Use GitHub client ID/secret, handle callback, set session token."`)
192
+ - **testStrategy**: Verification approach (Example: `"Deploy and call endpoint to confirm 'Hello World' response."`)
193
+ - **subtasks**: List of smaller, more specific tasks (Example: `[{"id": 1, "title": "Configure OAuth", ...}]`)
194
+
195
+ - **Environment Variables Configuration**
196
+ - **ANTHROPIC_API_KEY** (Required): Your Anthropic API key for Claude (Example: `ANTHROPIC_API_KEY=sk-ant-api03-...`)
197
+ - **MODEL** (Default: `"claude-3-7-sonnet-20250219"`): Claude model to use (Example: `MODEL=claude-3-opus-20240229`)
198
+ - **MAX_TOKENS** (Default: `"4000"`): Maximum tokens for responses (Example: `MAX_TOKENS=8000`)
199
+ - **TEMPERATURE** (Default: `"0.7"`): Temperature for model responses (Example: `TEMPERATURE=0.5`)
200
+ - **DEBUG** (Default: `"false"`): Enable debug logging (Example: `DEBUG=true`)
201
+ - **LOG_LEVEL** (Default: `"info"`): Console output level (Example: `LOG_LEVEL=debug`)
202
+ - **DEFAULT_SUBTASKS** (Default: `"3"`): Default subtask count (Example: `DEFAULT_SUBTASKS=5`)
203
+ - **DEFAULT_PRIORITY** (Default: `"medium"`): Default priority (Example: `DEFAULT_PRIORITY=high`)
204
+ - **PROJECT_NAME** (Default: `"MCP SaaS MVP"`): Project name in metadata (Example: `PROJECT_NAME=My Awesome Project`)
205
+ - **PROJECT_VERSION** (Default: `"1.0.0"`): Version in metadata (Example: `PROJECT_VERSION=2.1.0`)
206
+ - **PERPLEXITY_API_KEY**: For research-backed features (Example: `PERPLEXITY_API_KEY=pplx-...`)
207
+ - **PERPLEXITY_MODEL** (Default: `"sonar-medium-online"`): Perplexity model (Example: `PERPLEXITY_MODEL=sonar-large-online`)
208
+
209
+ - **Determining the Next Task**
210
+ - Run `task-master next` to show the next task to work on
211
+ - The next command identifies tasks with all dependencies satisfied
212
+ - Tasks are prioritized by priority level, dependency count, and ID
213
+ - The command shows comprehensive task information including:
214
+ - Basic task details and description
215
+ - Implementation details
216
+ - Subtasks (if they exist)
217
+ - Contextual suggested actions
218
+ - Recommended before starting any new development work
219
+ - Respects your project's dependency structure
220
+ - Ensures tasks are completed in the appropriate sequence
221
+ - Provides ready-to-use commands for common task actions
222
+
223
+ - **Viewing Specific Task Details**
224
+ - Run `task-master show <id>` or `task-master show --id=<id>` to view a specific task
225
+ - Use dot notation for subtasks: `task-master show 1.2` (shows subtask 2 of task 1)
226
+ - Displays comprehensive information similar to the next command, but for a specific task
227
+ - For parent tasks, shows all subtasks and their current status
228
+ - For subtasks, shows parent task information and relationship
229
+ - Provides contextual suggested actions appropriate for the specific task
230
+ - Useful for examining task details before implementation or checking status
231
+
232
+ - **Managing Task Dependencies**
233
+ - Use `task-master add-dependency --id=<id> --depends-on=<id>` to add a dependency
234
+ - Use `task-master remove-dependency --id=<id> --depends-on=<id>` to remove a dependency
235
+ - The system prevents circular dependencies and duplicate dependency entries
236
+ - Dependencies are checked for existence before being added or removed
237
+ - Task files are automatically regenerated after dependency changes
238
+ - Dependencies are visualized with status indicators in task listings and files
239
+
240
+ - **Command Reference: add-dependency**
241
+ - Legacy Syntax: `node scripts/dev.js add-dependency --id=<id> --depends-on=<id>`
242
+ - CLI Syntax: `task-master add-dependency --id=<id> --depends-on=<id>`
243
+ - Description: Adds a dependency relationship between two tasks
244
+ - Parameters:
245
+ - `--id=<id>`: ID of task that will depend on another task (required)
246
+ - `--depends-on=<id>`: ID of task that will become a dependency (required)
247
+ - Example: `task-master add-dependency --id=22 --depends-on=21`
248
+ - Notes: Prevents circular dependencies and duplicates; updates task files automatically
249
+
250
+ - **Command Reference: remove-dependency**
251
+ - Legacy Syntax: `node scripts/dev.js remove-dependency --id=<id> --depends-on=<id>`
252
+ - CLI Syntax: `task-master remove-dependency --id=<id> --depends-on=<id>`
253
+ - Description: Removes a dependency relationship between two tasks
254
+ - Parameters:
255
+ - `--id=<id>`: ID of task to remove dependency from (required)
256
+ - `--depends-on=<id>`: ID of task to remove as a dependency (required)
257
+ - Example: `task-master remove-dependency --id=22 --depends-on=21`
258
+ - Notes: Checks if dependency actually exists; updates task files automatically
259
+
260
+ - **Command Reference: validate-dependencies**
261
+ - Legacy Syntax: `node scripts/dev.js validate-dependencies [options]`
262
+ - CLI Syntax: `task-master validate-dependencies [options]`
263
+ - Description: Checks for and identifies invalid dependencies in tasks.json and task files
264
+ - Parameters:
265
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
266
+ - Example: `task-master validate-dependencies`
267
+ - Notes:
268
+ - Reports all non-existent dependencies and self-dependencies without modifying files
269
+ - Provides detailed statistics on task dependency state
270
+ - Use before fix-dependencies to audit your task structure
271
+
272
+ - **Command Reference: fix-dependencies**
273
+ - Legacy Syntax: `node scripts/dev.js fix-dependencies [options]`
274
+ - CLI Syntax: `task-master fix-dependencies [options]`
275
+ - Description: Finds and fixes all invalid dependencies in tasks.json and task files
276
+ - Parameters:
277
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
278
+ - Example: `task-master fix-dependencies`
279
+ - Notes:
280
+ - Removes references to non-existent tasks and subtasks
281
+ - Eliminates self-dependencies (tasks depending on themselves)
282
+ - Regenerates task files with corrected dependencies
283
+ - Provides detailed report of all fixes made
284
+
285
+ - **Command Reference: complexity-report**
286
+ - Legacy Syntax: `node scripts/dev.js complexity-report [options]`
287
+ - CLI Syntax: `task-master complexity-report [options]`
288
+ - Description: Displays the task complexity analysis report in a formatted, easy-to-read way
289
+ - Parameters:
290
+ - `--file=<path>, -f`: Path to the complexity report file (default: 'scripts/task-complexity-report.json')
291
+ - Example: `task-master complexity-report`
292
+ - Notes:
293
+ - Shows tasks organized by complexity score with recommended actions
294
+ - Provides complexity distribution statistics
295
+ - Displays ready-to-use expansion commands for complex tasks
296
+ - If no report exists, offers to generate one interactively
297
+
298
+ - **Command Reference: add-task**
299
+ - CLI Syntax: `task-master add-task [options]`
300
+ - Description: Add a new task to tasks.json using AI
301
+ - Parameters:
302
+ - `--file=<path>, -f`: Path to the tasks file (default: 'tasks/tasks.json')
303
+ - `--prompt=<text>, -p`: Description of the task to add (required)
304
+ - `--dependencies=<ids>, -d`: Comma-separated list of task IDs this task depends on
305
+ - `--priority=<priority>`: Task priority (high, medium, low) (default: 'medium')
306
+ - Example: `task-master add-task --prompt="Create user authentication using Auth0"`
307
+ - Notes: Uses AI to convert description into structured task with appropriate details
308
+
309
+ - **Command Reference: init**
310
+ - CLI Syntax: `task-master init`
311
+ - Description: Initialize a new project with Task Master structure
312
+ - Parameters: None
313
+ - Example: `task-master init`
314
+ - Notes:
315
+ - Creates initial project structure with required files
316
+ - Prompts for project settings if not provided
317
+ - Merges with existing files when appropriate
318
+ - Can be used to bootstrap a new Task Master project quickly
319
+
320
+ - **Code Analysis & Refactoring Techniques**
321
+ - **Top-Level Function Search**
322
+ - Use grep pattern matching to find all exported functions across the codebase
323
+ - Command: `grep -E "export (function|const) \w+|function \w+\(|const \w+ = \(|module\.exports" --include="*.js" -r ./`
324
+ - Benefits:
325
+ - Quickly identify all public API functions without reading implementation details
326
+ - Compare functions between files during refactoring (e.g., monolithic to modular structure)
327
+ - Verify all expected functions exist in refactored modules
328
+ - Identify duplicate functionality or naming conflicts
329
+ - Usage examples:
330
+ - When migrating from `scripts/dev.js` to modular structure: `grep -E "function \w+\(" scripts/dev.js`
331
+ - Check function exports in a directory: `grep -E "export (function|const)" scripts/modules/`
332
+ - Find potential naming conflicts: `grep -E "function (get|set|create|update)\w+\(" -r ./`
333
+ - Variations:
334
+ - Add `-n` flag to include line numbers
335
+ - Add `--include="*.ts"` to filter by file extension
336
+ - Use with `| sort` to alphabetize results
337
+ - Integration with refactoring workflow:
338
+ - Start by mapping all functions in the source file
339
+ - Create target module files based on function grouping
340
+ - Verify all functions were properly migrated
341
+ - Check for any unintentional duplications or omissions
342
+
343
+ ---
344
+ WINDSURF_RULES
345
+ ---
346
+ description: Guidelines for creating and maintaining Windsurf rules to ensure consistency and effectiveness.
347
+ globs: .windsurfrules
348
+ filesToApplyRule: .windsurfrules
349
+ alwaysApply: true
350
+ ---
351
+ The below describes how you should be structuring new rule sections in this document.
352
+ - **Required Rule Structure:**
353
+ ```markdown
354
+ ---
355
+ description: Clear, one-line description of what the rule enforces
356
+ globs: path/to/files/*.ext, other/path/**/*
357
+ alwaysApply: boolean
358
+ ---
359
+
360
+ - **Main Points in Bold**
361
+ - Sub-points with details
362
+ - Examples and explanations
363
+ ```
364
+
365
+ - **Section References:**
366
+ - Use `ALL_CAPS_SECTION` to reference files
367
+ - Example: `WINDSURF_RULES`
368
+
369
+ - **Code Examples:**
370
+ - Use language-specific code blocks
371
+ ```typescript
372
+ // ✅ DO: Show good examples
373
+ const goodExample = true;
374
+
375
+ // ❌ DON'T: Show anti-patterns
376
+ const badExample = false;
377
+ ```
378
+
379
+ - **Rule Content Guidelines:**
380
+ - Start with high-level overview
381
+ - Include specific, actionable requirements
382
+ - Show examples of correct implementation
383
+ - Reference existing code when possible
384
+ - Keep rules DRY by referencing other rules
385
+
386
+ - **Rule Maintenance:**
387
+ - Update rules when new patterns emerge
388
+ - Add examples from actual codebase
389
+ - Remove outdated patterns
390
+ - Cross-reference related rules
391
+
392
+ - **Best Practices:**
393
+ - Use bullet points for clarity
394
+ - Keep descriptions concise
395
+ - Include both DO and DON'T examples
396
+ - Reference actual code over theoretical examples
397
+ - Use consistent formatting across rules
398
+
399
+ ---
400
+ SELF_IMPROVE
401
+ ---
402
+ description: Guidelines for continuously improving this rules document based on emerging code patterns and best practices.
403
+ globs: **/*
404
+ filesToApplyRule: **/*
405
+ alwaysApply: true
406
+ ---
407
+
408
+ - **Rule Improvement Triggers:**
409
+ - New code patterns not covered by existing rules
410
+ - Repeated similar implementations across files
411
+ - Common error patterns that could be prevented
412
+ - New libraries or tools being used consistently
413
+ - Emerging best practices in the codebase
414
+
415
+ - **Analysis Process:**
416
+ - Compare new code with existing rules
417
+ - Identify patterns that should be standardized
418
+ - Look for references to external documentation
419
+ - Check for consistent error handling patterns
420
+ - Monitor test patterns and coverage
421
+
422
+ - **Rule Updates:**
423
+ - **Add New Rules When:**
424
+ - A new technology/pattern is used in 3+ files
425
+ - Common bugs could be prevented by a rule
426
+ - Code reviews repeatedly mention the same feedback
427
+ - New security or performance patterns emerge
428
+
429
+ - **Modify Existing Rules When:**
430
+ - Better examples exist in the codebase
431
+ - Additional edge cases are discovered
432
+ - Related rules have been updated
433
+ - Implementation details have changed
434
+
435
+ - **Example Pattern Recognition:**
436
+ ```typescript
437
+ // If you see repeated patterns like:
438
+ const data = await prisma.user.findMany({
439
+ select: { id: true, email: true },
440
+ where: { status: 'ACTIVE' }
441
+ });
442
+
443
+ // Consider adding a PRISMA section in the .windsurfrules:
444
+ // - Standard select fields
445
+ // - Common where conditions
446
+ // - Performance optimization patterns
447
+ ```
448
+
449
+ - **Rule Quality Checks:**
450
+ - Rules should be actionable and specific
451
+ - Examples should come from actual code
452
+ - References should be up to date
453
+ - Patterns should be consistently enforced
454
+
455
+ - **Continuous Improvement:**
456
+ - Monitor code review comments
457
+ - Track common development questions
458
+ - Update rules after major refactors
459
+ - Add links to relevant documentation
460
+ - Cross-reference related rules
461
+
462
+ - **Rule Deprecation:**
463
+ - Mark outdated patterns as deprecated
464
+ - Remove rules that no longer apply
465
+ - Update references to deprecated rules
466
+ - Document migration paths for old patterns
467
+
468
+ - **Documentation Updates:**
469
+ - Keep examples synchronized with code
470
+ - Update references to external docs
471
+ - Maintain links between related rules
472
+ - Document breaking changes
473
+
474
+ Follow WINDSURF_RULES for proper rule formatting and structure of windsurf rule sections.
475
+
476
+ # Added by Task Master - Development Workflow Rules
477
+
478
+ Below you will find a variety of important rules spanning:
479
+ - the dev_workflow
480
+ - the .windsurfrules document self-improvement workflow
481
+ - the template to follow when modifying or adding new sections/rules to this document.
482
+
483
+ ---
484
+ DEV_WORKFLOW
485
+ ---
486
+ description: Guide for using meta-development script (scripts/dev.js) to manage task-driven development workflows
487
+ globs: **/*
488
+ filesToApplyRule: **/*
489
+ alwaysApply: true
490
+ ---
491
+
492
+ - **Global CLI Commands**
493
+ - Task Master now provides a global CLI through the `task-master` command
494
+ - All functionality from `scripts/dev.js` is available through this interface
495
+ - Install globally with `npm install -g claude-task-master` or use locally via `npx`
496
+ - Use `task-master <command>` instead of `node scripts/dev.js <command>`
497
+ - Examples:
498
+ - `task-master list` instead of `node scripts/dev.js list`
499
+ - `task-master next` instead of `node scripts/dev.js next`
500
+ - `task-master expand --id=3` instead of `node scripts/dev.js expand --id=3`
501
+ - All commands accept the same options as their script equivalents
502
+ - The CLI provides additional commands like `task-master init` for project setup
503
+
504
+ - **Development Workflow Process**
505
+ - Start new projects by running `task-master init` or `node scripts/dev.js parse-prd --input=<prd-file.txt>` to generate initial tasks.json
506
+ - Begin coding sessions with `task-master list` to see current tasks, status, and IDs
507
+ - Analyze task complexity with `task-master analyze-complexity --research` before breaking down tasks
508
+ - Select tasks based on dependencies (all marked 'done'), priority level, and ID order
509
+ - Clarify tasks by checking task files in tasks/ directory or asking for user input
510
+ - View specific task details using `task-master show <id>` to understand implementation requirements
511
+ - Break down complex tasks using `task-master expand --id=<id>` with appropriate flags
512
+ - Clear existing subtasks if needed using `task-master clear-subtasks --id=<id>` before regenerating
513
+ - Implement code following task details, dependencies, and project standards
514
+ - Verify tasks according to test strategies before marking as complete
515
+ - Mark completed tasks with `task-master set-status --id=<id> --status=done`
516
+ - Update dependent tasks when implementation differs from original plan
517
+ - Generate task files with `task-master generate` after updating tasks.json
518
+ - Maintain valid dependency structure with `task-master fix-dependencies` when needed
519
+ - Respect dependency chains and task priorities when selecting work
520
+ - Report progress regularly using the list command
521
+
522
+ - **Task Complexity Analysis**
523
+ - Run `node scripts/dev.js analyze-complexity --research` for comprehensive analysis
524
+ - Review complexity report in scripts/task-complexity-report.json
525
+ - Or use `node scripts/dev.js complexity-report` for a formatted, readable version of the report
526
+ - Focus on tasks with highest complexity scores (8-10) for detailed breakdown
527
+ - Use analysis results to determine appropriate subtask allocation
528
+ - Note that reports are automatically used by the expand command
529
+
530
+ - **Task Breakdown Process**
531
+ - For tasks with complexity analysis, use `node scripts/dev.js expand --id=<id>`
532
+ - Otherwise use `node scripts/dev.js expand --id=<id> --subtasks=<number>`
533
+ - Add `--research` flag to leverage Perplexity AI for research-backed expansion
534
+ - Use `--prompt="<context>"` to provide additional context when needed
535
+ - Review and adjust generated subtasks as necessary
536
+ - Use `--all` flag to expand multiple pending tasks at once
537
+ - If subtasks need regeneration, clear them first with `clear-subtasks` command
538
+
539
+ - **Implementation Drift Handling**
540
+ - When implementation differs significantly from planned approach
541
+ - When future tasks need modification due to current implementation choices
542
+ - When new dependencies or requirements emerge
543
+ - Call `node scripts/dev.js update --from=<futureTaskId> --prompt="<explanation>"` to update tasks.json
544
+
545
+ - **Task Status Management**
546
+ - Use 'pending' for tasks ready to be worked on
547
+ - Use 'done' for completed and verified tasks
548
+ - Use 'deferred' for postponed tasks
549
+ - Add custom status values as needed for project-specific workflows
550
+
551
+ - **Task File Format Reference**
552
+ ```
553
+ # Task ID: <id>
554
+ # Title: <title>
555
+ # Status: <status>
556
+ # Dependencies: <comma-separated list of dependency IDs>
557
+ # Priority: <priority>
558
+ # Description: <brief description>
559
+ # Details:
560
+ <detailed implementation notes>
561
+
562
+ # Test Strategy:
563
+ <verification approach>
564
+ ```
565
+
566
+ - **Command Reference: parse-prd**
567
+ - Legacy Syntax: `node scripts/dev.js parse-prd --input=<prd-file.txt>`
568
+ - CLI Syntax: `task-master parse-prd --input=<prd-file.txt>`
569
+ - Description: Parses a PRD document and generates a tasks.json file with structured tasks
570
+ - Parameters:
571
+ - `--input=<file>`: Path to the PRD text file (default: sample-prd.txt)
572
+ - Example: `task-master parse-prd --input=requirements.txt`
573
+ - Notes: Will overwrite existing tasks.json file. Use with caution.
574
+
575
+ - **Command Reference: update**
576
+ - Legacy Syntax: `node scripts/dev.js update --from=<id> --prompt="<prompt>"`
577
+ - CLI Syntax: `task-master update --from=<id> --prompt="<prompt>"`
578
+ - Description: Updates tasks with ID >= specified ID based on the provided prompt
579
+ - Parameters:
580
+ - `--from=<id>`: Task ID from which to start updating (required)
581
+ - `--prompt="<text>"`: Explanation of changes or new context (required)
582
+ - Example: `task-master update --from=4 --prompt="Now we are using Express instead of Fastify."`
583
+ - Notes: Only updates tasks not marked as 'done'. Completed tasks remain unchanged.
584
+
585
+ - **Command Reference: generate**
586
+ - Legacy Syntax: `node scripts/dev.js generate`
587
+ - CLI Syntax: `task-master generate`
588
+ - Description: Generates individual task files in tasks/ directory based on tasks.json
589
+ - Parameters:
590
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
591
+ - `--output=<dir>, -o`: Output directory (default: 'tasks')
592
+ - Example: `task-master generate`
593
+ - Notes: Overwrites existing task files. Creates tasks/ directory if needed.
594
+
595
+ - **Command Reference: set-status**
596
+ - Legacy Syntax: `node scripts/dev.js set-status --id=<id> --status=<status>`
597
+ - CLI Syntax: `task-master set-status --id=<id> --status=<status>`
598
+ - Description: Updates the status of a specific task in tasks.json
599
+ - Parameters:
600
+ - `--id=<id>`: ID of the task to update (required)
601
+ - `--status=<status>`: New status value (required)
602
+ - Example: `task-master set-status --id=3 --status=done`
603
+ - Notes: Common values are 'done', 'pending', and 'deferred', but any string is accepted.
604
+
605
+ - **Command Reference: list**
606
+ - Legacy Syntax: `node scripts/dev.js list`
607
+ - CLI Syntax: `task-master list`
608
+ - Description: Lists all tasks in tasks.json with IDs, titles, and status
609
+ - Parameters:
610
+ - `--status=<status>, -s`: Filter by status
611
+ - `--with-subtasks`: Show subtasks for each task
612
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
613
+ - Example: `task-master list`
614
+ - Notes: Provides quick overview of project progress. Use at start of sessions.
615
+
616
+ - **Command Reference: expand**
617
+ - Legacy Syntax: `node scripts/dev.js expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]`
618
+ - CLI Syntax: `task-master expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]`
619
+ - Description: Expands a task with subtasks for detailed implementation
620
+ - Parameters:
621
+ - `--id=<id>`: ID of task to expand (required unless using --all)
622
+ - `--all`: Expand all pending tasks, prioritized by complexity
623
+ - `--num=<number>`: Number of subtasks to generate (default: from complexity report)
624
+ - `--research`: Use Perplexity AI for research-backed generation
625
+ - `--prompt="<text>"`: Additional context for subtask generation
626
+ - `--force`: Regenerate subtasks even for tasks that already have them
627
+ - Example: `task-master expand --id=3 --num=5 --research --prompt="Focus on security aspects"`
628
+ - Notes: Uses complexity report recommendations if available.
629
+
630
+ - **Command Reference: analyze-complexity**
631
+ - Legacy Syntax: `node scripts/dev.js analyze-complexity [options]`
632
+ - CLI Syntax: `task-master analyze-complexity [options]`
633
+ - Description: Analyzes task complexity and generates expansion recommendations
634
+ - Parameters:
635
+ - `--output=<file>, -o`: Output file path (default: scripts/task-complexity-report.json)
636
+ - `--model=<model>, -m`: Override LLM model to use
637
+ - `--threshold=<number>, -t`: Minimum score for expansion recommendation (default: 5)
638
+ - `--file=<path>, -f`: Use alternative tasks.json file
639
+ - `--research, -r`: Use Perplexity AI for research-backed analysis
640
+ - Example: `task-master analyze-complexity --research`
641
+ - Notes: Report includes complexity scores, recommended subtasks, and tailored prompts.
642
+
643
+ - **Command Reference: clear-subtasks**
644
+ - Legacy Syntax: `node scripts/dev.js clear-subtasks --id=<id>`
645
+ - CLI Syntax: `task-master clear-subtasks --id=<id>`
646
+ - Description: Removes subtasks from specified tasks to allow regeneration
647
+ - Parameters:
648
+ - `--id=<id>`: ID or comma-separated IDs of tasks to clear subtasks from
649
+ - `--all`: Clear subtasks from all tasks
650
+ - Examples:
651
+ - `task-master clear-subtasks --id=3`
652
+ - `task-master clear-subtasks --id=1,2,3`
653
+ - `task-master clear-subtasks --all`
654
+ - Notes:
655
+ - Task files are automatically regenerated after clearing subtasks
656
+ - Can be combined with expand command to immediately generate new subtasks
657
+ - Works with both parent tasks and individual subtasks
658
+
659
+ - **Task Structure Fields**
660
+ - **id**: Unique identifier for the task (Example: `1`)
661
+ - **title**: Brief, descriptive title (Example: `"Initialize Repo"`)
662
+ - **description**: Concise summary of what the task involves (Example: `"Create a new repository, set up initial structure."`)
663
+ - **status**: Current state of the task (Example: `"pending"`, `"done"`, `"deferred"`)
664
+ - **dependencies**: IDs of prerequisite tasks (Example: `[1, 2]`)
665
+ - Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending)
666
+ - This helps quickly identify which prerequisite tasks are blocking work
667
+ - **priority**: Importance level (Example: `"high"`, `"medium"`, `"low"`)
668
+ - **details**: In-depth implementation instructions (Example: `"Use GitHub client ID/secret, handle callback, set session token."`)
669
+ - **testStrategy**: Verification approach (Example: `"Deploy and call endpoint to confirm 'Hello World' response."`)
670
+ - **subtasks**: List of smaller, more specific tasks (Example: `[{"id": 1, "title": "Configure OAuth", ...}]`)
671
+
672
+ - **Environment Variables Configuration**
673
+ - **ANTHROPIC_API_KEY** (Required): Your Anthropic API key for Claude (Example: `ANTHROPIC_API_KEY=sk-ant-api03-...`)
674
+ - **MODEL** (Default: `"claude-3-7-sonnet-20250219"`): Claude model to use (Example: `MODEL=claude-3-opus-20240229`)
675
+ - **MAX_TOKENS** (Default: `"4000"`): Maximum tokens for responses (Example: `MAX_TOKENS=8000`)
676
+ - **TEMPERATURE** (Default: `"0.7"`): Temperature for model responses (Example: `TEMPERATURE=0.5`)
677
+ - **DEBUG** (Default: `"false"`): Enable debug logging (Example: `DEBUG=true`)
678
+ - **LOG_LEVEL** (Default: `"info"`): Console output level (Example: `LOG_LEVEL=debug`)
679
+ - **DEFAULT_SUBTASKS** (Default: `"3"`): Default subtask count (Example: `DEFAULT_SUBTASKS=5`)
680
+ - **DEFAULT_PRIORITY** (Default: `"medium"`): Default priority (Example: `DEFAULT_PRIORITY=high`)
681
+ - **PROJECT_NAME** (Default: `"MCP SaaS MVP"`): Project name in metadata (Example: `PROJECT_NAME=My Awesome Project`)
682
+ - **PROJECT_VERSION** (Default: `"1.0.0"`): Version in metadata (Example: `PROJECT_VERSION=2.1.0`)
683
+ - **PERPLEXITY_API_KEY**: For research-backed features (Example: `PERPLEXITY_API_KEY=pplx-...`)
684
+ - **PERPLEXITY_MODEL** (Default: `"sonar-medium-online"`): Perplexity model (Example: `PERPLEXITY_MODEL=sonar-large-online`)
685
+
686
+ - **Determining the Next Task**
687
+ - Run `task-master next` to show the next task to work on
688
+ - The next command identifies tasks with all dependencies satisfied
689
+ - Tasks are prioritized by priority level, dependency count, and ID
690
+ - The command shows comprehensive task information including:
691
+ - Basic task details and description
692
+ - Implementation details
693
+ - Subtasks (if they exist)
694
+ - Contextual suggested actions
695
+ - Recommended before starting any new development work
696
+ - Respects your project's dependency structure
697
+ - Ensures tasks are completed in the appropriate sequence
698
+ - Provides ready-to-use commands for common task actions
699
+
700
+ - **Viewing Specific Task Details**
701
+ - Run `task-master show <id>` or `task-master show --id=<id>` to view a specific task
702
+ - Use dot notation for subtasks: `task-master show 1.2` (shows subtask 2 of task 1)
703
+ - Displays comprehensive information similar to the next command, but for a specific task
704
+ - For parent tasks, shows all subtasks and their current status
705
+ - For subtasks, shows parent task information and relationship
706
+ - Provides contextual suggested actions appropriate for the specific task
707
+ - Useful for examining task details before implementation or checking status
708
+
709
+ - **Managing Task Dependencies**
710
+ - Use `task-master add-dependency --id=<id> --depends-on=<id>` to add a dependency
711
+ - Use `task-master remove-dependency --id=<id> --depends-on=<id>` to remove a dependency
712
+ - The system prevents circular dependencies and duplicate dependency entries
713
+ - Dependencies are checked for existence before being added or removed
714
+ - Task files are automatically regenerated after dependency changes
715
+ - Dependencies are visualized with status indicators in task listings and files
716
+
717
+ - **Command Reference: add-dependency**
718
+ - Legacy Syntax: `node scripts/dev.js add-dependency --id=<id> --depends-on=<id>`
719
+ - CLI Syntax: `task-master add-dependency --id=<id> --depends-on=<id>`
720
+ - Description: Adds a dependency relationship between two tasks
721
+ - Parameters:
722
+ - `--id=<id>`: ID of task that will depend on another task (required)
723
+ - `--depends-on=<id>`: ID of task that will become a dependency (required)
724
+ - Example: `task-master add-dependency --id=22 --depends-on=21`
725
+ - Notes: Prevents circular dependencies and duplicates; updates task files automatically
726
+
727
+ - **Command Reference: remove-dependency**
728
+ - Legacy Syntax: `node scripts/dev.js remove-dependency --id=<id> --depends-on=<id>`
729
+ - CLI Syntax: `task-master remove-dependency --id=<id> --depends-on=<id>`
730
+ - Description: Removes a dependency relationship between two tasks
731
+ - Parameters:
732
+ - `--id=<id>`: ID of task to remove dependency from (required)
733
+ - `--depends-on=<id>`: ID of task to remove as a dependency (required)
734
+ - Example: `task-master remove-dependency --id=22 --depends-on=21`
735
+ - Notes: Checks if dependency actually exists; updates task files automatically
736
+
737
+ - **Command Reference: validate-dependencies**
738
+ - Legacy Syntax: `node scripts/dev.js validate-dependencies [options]`
739
+ - CLI Syntax: `task-master validate-dependencies [options]`
740
+ - Description: Checks for and identifies invalid dependencies in tasks.json and task files
741
+ - Parameters:
742
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
743
+ - Example: `task-master validate-dependencies`
744
+ - Notes:
745
+ - Reports all non-existent dependencies and self-dependencies without modifying files
746
+ - Provides detailed statistics on task dependency state
747
+ - Use before fix-dependencies to audit your task structure
748
+
749
+ - **Command Reference: fix-dependencies**
750
+ - Legacy Syntax: `node scripts/dev.js fix-dependencies [options]`
751
+ - CLI Syntax: `task-master fix-dependencies [options]`
752
+ - Description: Finds and fixes all invalid dependencies in tasks.json and task files
753
+ - Parameters:
754
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
755
+ - Example: `task-master fix-dependencies`
756
+ - Notes:
757
+ - Removes references to non-existent tasks and subtasks
758
+ - Eliminates self-dependencies (tasks depending on themselves)
759
+ - Regenerates task files with corrected dependencies
760
+ - Provides detailed report of all fixes made
761
+
762
+ - **Command Reference: complexity-report**
763
+ - Legacy Syntax: `node scripts/dev.js complexity-report [options]`
764
+ - CLI Syntax: `task-master complexity-report [options]`
765
+ - Description: Displays the task complexity analysis report in a formatted, easy-to-read way
766
+ - Parameters:
767
+ - `--file=<path>, -f`: Path to the complexity report file (default: 'scripts/task-complexity-report.json')
768
+ - Example: `task-master complexity-report`
769
+ - Notes:
770
+ - Shows tasks organized by complexity score with recommended actions
771
+ - Provides complexity distribution statistics
772
+ - Displays ready-to-use expansion commands for complex tasks
773
+ - If no report exists, offers to generate one interactively
774
+
775
+ - **Command Reference: add-task**
776
+ - CLI Syntax: `task-master add-task [options]`
777
+ - Description: Add a new task to tasks.json using AI
778
+ - Parameters:
779
+ - `--file=<path>, -f`: Path to the tasks file (default: 'tasks/tasks.json')
780
+ - `--prompt=<text>, -p`: Description of the task to add (required)
781
+ - `--dependencies=<ids>, -d`: Comma-separated list of task IDs this task depends on
782
+ - `--priority=<priority>`: Task priority (high, medium, low) (default: 'medium')
783
+ - Example: `task-master add-task --prompt="Create user authentication using Auth0"`
784
+ - Notes: Uses AI to convert description into structured task with appropriate details
785
+
786
+ - **Command Reference: init**
787
+ - CLI Syntax: `task-master init`
788
+ - Description: Initialize a new project with Task Master structure
789
+ - Parameters: None
790
+ - Example: `task-master init`
791
+ - Notes:
792
+ - Creates initial project structure with required files
793
+ - Prompts for project settings if not provided
794
+ - Merges with existing files when appropriate
795
+ - Can be used to bootstrap a new Task Master project quickly
796
+
797
+ - **Code Analysis & Refactoring Techniques**
798
+ - **Top-Level Function Search**
799
+ - Use grep pattern matching to find all exported functions across the codebase
800
+ - Command: `grep -E "export (function|const) \w+|function \w+\(|const \w+ = \(|module\.exports" --include="*.js" -r ./`
801
+ - Benefits:
802
+ - Quickly identify all public API functions without reading implementation details
803
+ - Compare functions between files during refactoring (e.g., monolithic to modular structure)
804
+ - Verify all expected functions exist in refactored modules
805
+ - Identify duplicate functionality or naming conflicts
806
+ - Usage examples:
807
+ - When migrating from `scripts/dev.js` to modular structure: `grep -E "function \w+\(" scripts/dev.js`
808
+ - Check function exports in a directory: `grep -E "export (function|const)" scripts/modules/`
809
+ - Find potential naming conflicts: `grep -E "function (get|set|create|update)\w+\(" -r ./`
810
+ - Variations:
811
+ - Add `-n` flag to include line numbers
812
+ - Add `--include="*.ts"` to filter by file extension
813
+ - Use with `| sort` to alphabetize results
814
+ - Integration with refactoring workflow:
815
+ - Start by mapping all functions in the source file
816
+ - Create target module files based on function grouping
817
+ - Verify all functions were properly migrated
818
+ - Check for any unintentional duplications or omissions
819
+
820
+ ---
821
+ WINDSURF_RULES
822
+ ---
823
+ description: Guidelines for creating and maintaining Windsurf rules to ensure consistency and effectiveness.
824
+ globs: .windsurfrules
825
+ filesToApplyRule: .windsurfrules
826
+ alwaysApply: true
827
+ ---
828
+ The below describes how you should be structuring new rule sections in this document.
829
+ - **Required Rule Structure:**
830
+ ```markdown
831
+ ---
832
+ description: Clear, one-line description of what the rule enforces
833
+ globs: path/to/files/*.ext, other/path/**/*
834
+ alwaysApply: boolean
835
+ ---
836
+
837
+ - **Main Points in Bold**
838
+ - Sub-points with details
839
+ - Examples and explanations
840
+ ```
841
+
842
+ - **Section References:**
843
+ - Use `ALL_CAPS_SECTION` to reference files
844
+ - Example: `WINDSURF_RULES`
845
+
846
+ - **Code Examples:**
847
+ - Use language-specific code blocks
848
+ ```typescript
849
+ // ✅ DO: Show good examples
850
+ const goodExample = true;
851
+
852
+ // ❌ DON'T: Show anti-patterns
853
+ const badExample = false;
854
+ ```
855
+
856
+ - **Rule Content Guidelines:**
857
+ - Start with high-level overview
858
+ - Include specific, actionable requirements
859
+ - Show examples of correct implementation
860
+ - Reference existing code when possible
861
+ - Keep rules DRY by referencing other rules
862
+
863
+ - **Rule Maintenance:**
864
+ - Update rules when new patterns emerge
865
+ - Add examples from actual codebase
866
+ - Remove outdated patterns
867
+ - Cross-reference related rules
868
+
869
+ - **Best Practices:**
870
+ - Use bullet points for clarity
871
+ - Keep descriptions concise
872
+ - Include both DO and DON'T examples
873
+ - Reference actual code over theoretical examples
874
+ - Use consistent formatting across rules
875
+
876
+ ---
877
+ SELF_IMPROVE
878
+ ---
879
+ description: Guidelines for continuously improving this rules document based on emerging code patterns and best practices.
880
+ globs: **/*
881
+ filesToApplyRule: **/*
882
+ alwaysApply: true
883
+ ---
884
+
885
+ - **Rule Improvement Triggers:**
886
+ - New code patterns not covered by existing rules
887
+ - Repeated similar implementations across files
888
+ - Common error patterns that could be prevented
889
+ - New libraries or tools being used consistently
890
+ - Emerging best practices in the codebase
891
+
892
+ - **Analysis Process:**
893
+ - Compare new code with existing rules
894
+ - Identify patterns that should be standardized
895
+ - Look for references to external documentation
896
+ - Check for consistent error handling patterns
897
+ - Monitor test patterns and coverage
898
+
899
+ - **Rule Updates:**
900
+ - **Add New Rules When:**
901
+ - A new technology/pattern is used in 3+ files
902
+ - Common bugs could be prevented by a rule
903
+ - Code reviews repeatedly mention the same feedback
904
+ - New security or performance patterns emerge
905
+
906
+ - **Modify Existing Rules When:**
907
+ - Better examples exist in the codebase
908
+ - Additional edge cases are discovered
909
+ - Related rules have been updated
910
+ - Implementation details have changed
911
+
912
+ - **Example Pattern Recognition:**
913
+ ```typescript
914
+ // If you see repeated patterns like:
915
+ const data = await prisma.user.findMany({
916
+ select: { id: true, email: true },
917
+ where: { status: 'ACTIVE' }
918
+ });
919
+
920
+ // Consider adding a PRISMA section in the .windsurfrules:
921
+ // - Standard select fields
922
+ // - Common where conditions
923
+ // - Performance optimization patterns
924
+ ```
925
+
926
+ - **Rule Quality Checks:**
927
+ - Rules should be actionable and specific
928
+ - Examples should come from actual code
929
+ - References should be up to date
930
+ - Patterns should be consistently enforced
931
+
932
+ - **Continuous Improvement:**
933
+ - Monitor code review comments
934
+ - Track common development questions
935
+ - Update rules after major refactors
936
+ - Add links to relevant documentation
937
+ - Cross-reference related rules
938
+
939
+ - **Rule Deprecation:**
940
+ - Mark outdated patterns as deprecated
941
+ - Remove rules that no longer apply
942
+ - Update references to deprecated rules
943
+ - Document migration paths for old patterns
944
+
945
+ - **Documentation Updates:**
946
+ - Keep examples synchronized with code
947
+ - Update references to external docs
948
+ - Maintain links between related rules
949
+ - Document breaking changes
950
+
951
+ Follow WINDSURF_RULES for proper rule formatting and structure of windsurf rule sections.
952
+
953
+ # Added by Task Master - Development Workflow Rules
954
+
955
+ Below you will find a variety of important rules spanning:
956
+ - the dev_workflow
957
+ - the .windsurfrules document self-improvement workflow
958
+ - the template to follow when modifying or adding new sections/rules to this document.
959
+
960
+ ---
961
+ DEV_WORKFLOW
962
+ ---
963
+ description: Guide for using meta-development script (scripts/dev.js) to manage task-driven development workflows
964
+ globs: **/*
965
+ filesToApplyRule: **/*
966
+ alwaysApply: true
967
+ ---
968
+
969
+ - **Global CLI Commands**
970
+ - Task Master now provides a global CLI through the `task-master` command
971
+ - All functionality from `scripts/dev.js` is available through this interface
972
+ - Install globally with `npm install -g claude-task-master` or use locally via `npx`
973
+ - Use `task-master <command>` instead of `node scripts/dev.js <command>`
974
+ - Examples:
975
+ - `task-master list` instead of `node scripts/dev.js list`
976
+ - `task-master next` instead of `node scripts/dev.js next`
977
+ - `task-master expand --id=3` instead of `node scripts/dev.js expand --id=3`
978
+ - All commands accept the same options as their script equivalents
979
+ - The CLI provides additional commands like `task-master init` for project setup
980
+
981
+ - **Development Workflow Process**
982
+ - Start new projects by running `task-master init` or `node scripts/dev.js parse-prd --input=<prd-file.txt>` to generate initial tasks.json
983
+ - Begin coding sessions with `task-master list` to see current tasks, status, and IDs
984
+ - Analyze task complexity with `task-master analyze-complexity --research` before breaking down tasks
985
+ - Select tasks based on dependencies (all marked 'done'), priority level, and ID order
986
+ - Clarify tasks by checking task files in tasks/ directory or asking for user input
987
+ - View specific task details using `task-master show <id>` to understand implementation requirements
988
+ - Break down complex tasks using `task-master expand --id=<id>` with appropriate flags
989
+ - Clear existing subtasks if needed using `task-master clear-subtasks --id=<id>` before regenerating
990
+ - Implement code following task details, dependencies, and project standards
991
+ - Verify tasks according to test strategies before marking as complete
992
+ - Mark completed tasks with `task-master set-status --id=<id> --status=done`
993
+ - Update dependent tasks when implementation differs from original plan
994
+ - Generate task files with `task-master generate` after updating tasks.json
995
+ - Maintain valid dependency structure with `task-master fix-dependencies` when needed
996
+ - Respect dependency chains and task priorities when selecting work
997
+ - Report progress regularly using the list command
998
+
999
+ - **Task Complexity Analysis**
1000
+ - Run `node scripts/dev.js analyze-complexity --research` for comprehensive analysis
1001
+ - Review complexity report in scripts/task-complexity-report.json
1002
+ - Or use `node scripts/dev.js complexity-report` for a formatted, readable version of the report
1003
+ - Focus on tasks with highest complexity scores (8-10) for detailed breakdown
1004
+ - Use analysis results to determine appropriate subtask allocation
1005
+ - Note that reports are automatically used by the expand command
1006
+
1007
+ - **Task Breakdown Process**
1008
+ - For tasks with complexity analysis, use `node scripts/dev.js expand --id=<id>`
1009
+ - Otherwise use `node scripts/dev.js expand --id=<id> --subtasks=<number>`
1010
+ - Add `--research` flag to leverage Perplexity AI for research-backed expansion
1011
+ - Use `--prompt="<context>"` to provide additional context when needed
1012
+ - Review and adjust generated subtasks as necessary
1013
+ - Use `--all` flag to expand multiple pending tasks at once
1014
+ - If subtasks need regeneration, clear them first with `clear-subtasks` command
1015
+
1016
+ - **Implementation Drift Handling**
1017
+ - When implementation differs significantly from planned approach
1018
+ - When future tasks need modification due to current implementation choices
1019
+ - When new dependencies or requirements emerge
1020
+ - Call `node scripts/dev.js update --from=<futureTaskId> --prompt="<explanation>"` to update tasks.json
1021
+
1022
+ - **Task Status Management**
1023
+ - Use 'pending' for tasks ready to be worked on
1024
+ - Use 'done' for completed and verified tasks
1025
+ - Use 'deferred' for postponed tasks
1026
+ - Add custom status values as needed for project-specific workflows
1027
+
1028
+ - **Task File Format Reference**
1029
+ ```
1030
+ # Task ID: <id>
1031
+ # Title: <title>
1032
+ # Status: <status>
1033
+ # Dependencies: <comma-separated list of dependency IDs>
1034
+ # Priority: <priority>
1035
+ # Description: <brief description>
1036
+ # Details:
1037
+ <detailed implementation notes>
1038
+
1039
+ # Test Strategy:
1040
+ <verification approach>
1041
+ ```
1042
+
1043
+ - **Command Reference: parse-prd**
1044
+ - Legacy Syntax: `node scripts/dev.js parse-prd --input=<prd-file.txt>`
1045
+ - CLI Syntax: `task-master parse-prd --input=<prd-file.txt>`
1046
+ - Description: Parses a PRD document and generates a tasks.json file with structured tasks
1047
+ - Parameters:
1048
+ - `--input=<file>`: Path to the PRD text file (default: sample-prd.txt)
1049
+ - Example: `task-master parse-prd --input=requirements.txt`
1050
+ - Notes: Will overwrite existing tasks.json file. Use with caution.
1051
+
1052
+ - **Command Reference: update**
1053
+ - Legacy Syntax: `node scripts/dev.js update --from=<id> --prompt="<prompt>"`
1054
+ - CLI Syntax: `task-master update --from=<id> --prompt="<prompt>"`
1055
+ - Description: Updates tasks with ID >= specified ID based on the provided prompt
1056
+ - Parameters:
1057
+ - `--from=<id>`: Task ID from which to start updating (required)
1058
+ - `--prompt="<text>"`: Explanation of changes or new context (required)
1059
+ - Example: `task-master update --from=4 --prompt="Now we are using Express instead of Fastify."`
1060
+ - Notes: Only updates tasks not marked as 'done'. Completed tasks remain unchanged.
1061
+
1062
+ - **Command Reference: generate**
1063
+ - Legacy Syntax: `node scripts/dev.js generate`
1064
+ - CLI Syntax: `task-master generate`
1065
+ - Description: Generates individual task files in tasks/ directory based on tasks.json
1066
+ - Parameters:
1067
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
1068
+ - `--output=<dir>, -o`: Output directory (default: 'tasks')
1069
+ - Example: `task-master generate`
1070
+ - Notes: Overwrites existing task files. Creates tasks/ directory if needed.
1071
+
1072
+ - **Command Reference: set-status**
1073
+ - Legacy Syntax: `node scripts/dev.js set-status --id=<id> --status=<status>`
1074
+ - CLI Syntax: `task-master set-status --id=<id> --status=<status>`
1075
+ - Description: Updates the status of a specific task in tasks.json
1076
+ - Parameters:
1077
+ - `--id=<id>`: ID of the task to update (required)
1078
+ - `--status=<status>`: New status value (required)
1079
+ - Example: `task-master set-status --id=3 --status=done`
1080
+ - Notes: Common values are 'done', 'pending', and 'deferred', but any string is accepted.
1081
+
1082
+ - **Command Reference: list**
1083
+ - Legacy Syntax: `node scripts/dev.js list`
1084
+ - CLI Syntax: `task-master list`
1085
+ - Description: Lists all tasks in tasks.json with IDs, titles, and status
1086
+ - Parameters:
1087
+ - `--status=<status>, -s`: Filter by status
1088
+ - `--with-subtasks`: Show subtasks for each task
1089
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
1090
+ - Example: `task-master list`
1091
+ - Notes: Provides quick overview of project progress. Use at start of sessions.
1092
+
1093
+ - **Command Reference: expand**
1094
+ - Legacy Syntax: `node scripts/dev.js expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]`
1095
+ - CLI Syntax: `task-master expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]`
1096
+ - Description: Expands a task with subtasks for detailed implementation
1097
+ - Parameters:
1098
+ - `--id=<id>`: ID of task to expand (required unless using --all)
1099
+ - `--all`: Expand all pending tasks, prioritized by complexity
1100
+ - `--num=<number>`: Number of subtasks to generate (default: from complexity report)
1101
+ - `--research`: Use Perplexity AI for research-backed generation
1102
+ - `--prompt="<text>"`: Additional context for subtask generation
1103
+ - `--force`: Regenerate subtasks even for tasks that already have them
1104
+ - Example: `task-master expand --id=3 --num=5 --research --prompt="Focus on security aspects"`
1105
+ - Notes: Uses complexity report recommendations if available.
1106
+
1107
+ - **Command Reference: analyze-complexity**
1108
+ - Legacy Syntax: `node scripts/dev.js analyze-complexity [options]`
1109
+ - CLI Syntax: `task-master analyze-complexity [options]`
1110
+ - Description: Analyzes task complexity and generates expansion recommendations
1111
+ - Parameters:
1112
+ - `--output=<file>, -o`: Output file path (default: scripts/task-complexity-report.json)
1113
+ - `--model=<model>, -m`: Override LLM model to use
1114
+ - `--threshold=<number>, -t`: Minimum score for expansion recommendation (default: 5)
1115
+ - `--file=<path>, -f`: Use alternative tasks.json file
1116
+ - `--research, -r`: Use Perplexity AI for research-backed analysis
1117
+ - Example: `task-master analyze-complexity --research`
1118
+ - Notes: Report includes complexity scores, recommended subtasks, and tailored prompts.
1119
+
1120
+ - **Command Reference: clear-subtasks**
1121
+ - Legacy Syntax: `node scripts/dev.js clear-subtasks --id=<id>`
1122
+ - CLI Syntax: `task-master clear-subtasks --id=<id>`
1123
+ - Description: Removes subtasks from specified tasks to allow regeneration
1124
+ - Parameters:
1125
+ - `--id=<id>`: ID or comma-separated IDs of tasks to clear subtasks from
1126
+ - `--all`: Clear subtasks from all tasks
1127
+ - Examples:
1128
+ - `task-master clear-subtasks --id=3`
1129
+ - `task-master clear-subtasks --id=1,2,3`
1130
+ - `task-master clear-subtasks --all`
1131
+ - Notes:
1132
+ - Task files are automatically regenerated after clearing subtasks
1133
+ - Can be combined with expand command to immediately generate new subtasks
1134
+ - Works with both parent tasks and individual subtasks
1135
+
1136
+ - **Task Structure Fields**
1137
+ - **id**: Unique identifier for the task (Example: `1`)
1138
+ - **title**: Brief, descriptive title (Example: `"Initialize Repo"`)
1139
+ - **description**: Concise summary of what the task involves (Example: `"Create a new repository, set up initial structure."`)
1140
+ - **status**: Current state of the task (Example: `"pending"`, `"done"`, `"deferred"`)
1141
+ - **dependencies**: IDs of prerequisite tasks (Example: `[1, 2]`)
1142
+ - Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending)
1143
+ - This helps quickly identify which prerequisite tasks are blocking work
1144
+ - **priority**: Importance level (Example: `"high"`, `"medium"`, `"low"`)
1145
+ - **details**: In-depth implementation instructions (Example: `"Use GitHub client ID/secret, handle callback, set session token."`)
1146
+ - **testStrategy**: Verification approach (Example: `"Deploy and call endpoint to confirm 'Hello World' response."`)
1147
+ - **subtasks**: List of smaller, more specific tasks (Example: `[{"id": 1, "title": "Configure OAuth", ...}]`)
1148
+
1149
+ - **Environment Variables Configuration**
1150
+ - **ANTHROPIC_API_KEY** (Required): Your Anthropic API key for Claude (Example: `ANTHROPIC_API_KEY=sk-ant-api03-...`)
1151
+ - **MODEL** (Default: `"claude-3-7-sonnet-20250219"`): Claude model to use (Example: `MODEL=claude-3-opus-20240229`)
1152
+ - **MAX_TOKENS** (Default: `"4000"`): Maximum tokens for responses (Example: `MAX_TOKENS=8000`)
1153
+ - **TEMPERATURE** (Default: `"0.7"`): Temperature for model responses (Example: `TEMPERATURE=0.5`)
1154
+ - **DEBUG** (Default: `"false"`): Enable debug logging (Example: `DEBUG=true`)
1155
+ - **LOG_LEVEL** (Default: `"info"`): Console output level (Example: `LOG_LEVEL=debug`)
1156
+ - **DEFAULT_SUBTASKS** (Default: `"3"`): Default subtask count (Example: `DEFAULT_SUBTASKS=5`)
1157
+ - **DEFAULT_PRIORITY** (Default: `"medium"`): Default priority (Example: `DEFAULT_PRIORITY=high`)
1158
+ - **PROJECT_NAME** (Default: `"MCP SaaS MVP"`): Project name in metadata (Example: `PROJECT_NAME=My Awesome Project`)
1159
+ - **PROJECT_VERSION** (Default: `"1.0.0"`): Version in metadata (Example: `PROJECT_VERSION=2.1.0`)
1160
+ - **PERPLEXITY_API_KEY**: For research-backed features (Example: `PERPLEXITY_API_KEY=pplx-...`)
1161
+ - **PERPLEXITY_MODEL** (Default: `"sonar-medium-online"`): Perplexity model (Example: `PERPLEXITY_MODEL=sonar-large-online`)
1162
+
1163
+ - **Determining the Next Task**
1164
+ - Run `task-master next` to show the next task to work on
1165
+ - The next command identifies tasks with all dependencies satisfied
1166
+ - Tasks are prioritized by priority level, dependency count, and ID
1167
+ - The command shows comprehensive task information including:
1168
+ - Basic task details and description
1169
+ - Implementation details
1170
+ - Subtasks (if they exist)
1171
+ - Contextual suggested actions
1172
+ - Recommended before starting any new development work
1173
+ - Respects your project's dependency structure
1174
+ - Ensures tasks are completed in the appropriate sequence
1175
+ - Provides ready-to-use commands for common task actions
1176
+
1177
+ - **Viewing Specific Task Details**
1178
+ - Run `task-master show <id>` or `task-master show --id=<id>` to view a specific task
1179
+ - Use dot notation for subtasks: `task-master show 1.2` (shows subtask 2 of task 1)
1180
+ - Displays comprehensive information similar to the next command, but for a specific task
1181
+ - For parent tasks, shows all subtasks and their current status
1182
+ - For subtasks, shows parent task information and relationship
1183
+ - Provides contextual suggested actions appropriate for the specific task
1184
+ - Useful for examining task details before implementation or checking status
1185
+
1186
+ - **Managing Task Dependencies**
1187
+ - Use `task-master add-dependency --id=<id> --depends-on=<id>` to add a dependency
1188
+ - Use `task-master remove-dependency --id=<id> --depends-on=<id>` to remove a dependency
1189
+ - The system prevents circular dependencies and duplicate dependency entries
1190
+ - Dependencies are checked for existence before being added or removed
1191
+ - Task files are automatically regenerated after dependency changes
1192
+ - Dependencies are visualized with status indicators in task listings and files
1193
+
1194
+ - **Command Reference: add-dependency**
1195
+ - Legacy Syntax: `node scripts/dev.js add-dependency --id=<id> --depends-on=<id>`
1196
+ - CLI Syntax: `task-master add-dependency --id=<id> --depends-on=<id>`
1197
+ - Description: Adds a dependency relationship between two tasks
1198
+ - Parameters:
1199
+ - `--id=<id>`: ID of task that will depend on another task (required)
1200
+ - `--depends-on=<id>`: ID of task that will become a dependency (required)
1201
+ - Example: `task-master add-dependency --id=22 --depends-on=21`
1202
+ - Notes: Prevents circular dependencies and duplicates; updates task files automatically
1203
+
1204
+ - **Command Reference: remove-dependency**
1205
+ - Legacy Syntax: `node scripts/dev.js remove-dependency --id=<id> --depends-on=<id>`
1206
+ - CLI Syntax: `task-master remove-dependency --id=<id> --depends-on=<id>`
1207
+ - Description: Removes a dependency relationship between two tasks
1208
+ - Parameters:
1209
+ - `--id=<id>`: ID of task to remove dependency from (required)
1210
+ - `--depends-on=<id>`: ID of task to remove as a dependency (required)
1211
+ - Example: `task-master remove-dependency --id=22 --depends-on=21`
1212
+ - Notes: Checks if dependency actually exists; updates task files automatically
1213
+
1214
+ - **Command Reference: validate-dependencies**
1215
+ - Legacy Syntax: `node scripts/dev.js validate-dependencies [options]`
1216
+ - CLI Syntax: `task-master validate-dependencies [options]`
1217
+ - Description: Checks for and identifies invalid dependencies in tasks.json and task files
1218
+ - Parameters:
1219
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
1220
+ - Example: `task-master validate-dependencies`
1221
+ - Notes:
1222
+ - Reports all non-existent dependencies and self-dependencies without modifying files
1223
+ - Provides detailed statistics on task dependency state
1224
+ - Use before fix-dependencies to audit your task structure
1225
+
1226
+ - **Command Reference: fix-dependencies**
1227
+ - Legacy Syntax: `node scripts/dev.js fix-dependencies [options]`
1228
+ - CLI Syntax: `task-master fix-dependencies [options]`
1229
+ - Description: Finds and fixes all invalid dependencies in tasks.json and task files
1230
+ - Parameters:
1231
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
1232
+ - Example: `task-master fix-dependencies`
1233
+ - Notes:
1234
+ - Removes references to non-existent tasks and subtasks
1235
+ - Eliminates self-dependencies (tasks depending on themselves)
1236
+ - Regenerates task files with corrected dependencies
1237
+ - Provides detailed report of all fixes made
1238
+
1239
+ - **Command Reference: complexity-report**
1240
+ - Legacy Syntax: `node scripts/dev.js complexity-report [options]`
1241
+ - CLI Syntax: `task-master complexity-report [options]`
1242
+ - Description: Displays the task complexity analysis report in a formatted, easy-to-read way
1243
+ - Parameters:
1244
+ - `--file=<path>, -f`: Path to the complexity report file (default: 'scripts/task-complexity-report.json')
1245
+ - Example: `task-master complexity-report`
1246
+ - Notes:
1247
+ - Shows tasks organized by complexity score with recommended actions
1248
+ - Provides complexity distribution statistics
1249
+ - Displays ready-to-use expansion commands for complex tasks
1250
+ - If no report exists, offers to generate one interactively
1251
+
1252
+ - **Command Reference: add-task**
1253
+ - CLI Syntax: `task-master add-task [options]`
1254
+ - Description: Add a new task to tasks.json using AI
1255
+ - Parameters:
1256
+ - `--file=<path>, -f`: Path to the tasks file (default: 'tasks/tasks.json')
1257
+ - `--prompt=<text>, -p`: Description of the task to add (required)
1258
+ - `--dependencies=<ids>, -d`: Comma-separated list of task IDs this task depends on
1259
+ - `--priority=<priority>`: Task priority (high, medium, low) (default: 'medium')
1260
+ - Example: `task-master add-task --prompt="Create user authentication using Auth0"`
1261
+ - Notes: Uses AI to convert description into structured task with appropriate details
1262
+
1263
+ - **Command Reference: init**
1264
+ - CLI Syntax: `task-master init`
1265
+ - Description: Initialize a new project with Task Master structure
1266
+ - Parameters: None
1267
+ - Example: `task-master init`
1268
+ - Notes:
1269
+ - Creates initial project structure with required files
1270
+ - Prompts for project settings if not provided
1271
+ - Merges with existing files when appropriate
1272
+ - Can be used to bootstrap a new Task Master project quickly
1273
+
1274
+ - **Code Analysis & Refactoring Techniques**
1275
+ - **Top-Level Function Search**
1276
+ - Use grep pattern matching to find all exported functions across the codebase
1277
+ - Command: `grep -E "export (function|const) \w+|function \w+\(|const \w+ = \(|module\.exports" --include="*.js" -r ./`
1278
+ - Benefits:
1279
+ - Quickly identify all public API functions without reading implementation details
1280
+ - Compare functions between files during refactoring (e.g., monolithic to modular structure)
1281
+ - Verify all expected functions exist in refactored modules
1282
+ - Identify duplicate functionality or naming conflicts
1283
+ - Usage examples:
1284
+ - When migrating from `scripts/dev.js` to modular structure: `grep -E "function \w+\(" scripts/dev.js`
1285
+ - Check function exports in a directory: `grep -E "export (function|const)" scripts/modules/`
1286
+ - Find potential naming conflicts: `grep -E "function (get|set|create|update)\w+\(" -r ./`
1287
+ - Variations:
1288
+ - Add `-n` flag to include line numbers
1289
+ - Add `--include="*.ts"` to filter by file extension
1290
+ - Use with `| sort` to alphabetize results
1291
+ - Integration with refactoring workflow:
1292
+ - Start by mapping all functions in the source file
1293
+ - Create target module files based on function grouping
1294
+ - Verify all functions were properly migrated
1295
+ - Check for any unintentional duplications or omissions
1296
+
1297
+ ---
1298
+ WINDSURF_RULES
1299
+ ---
1300
+ description: Guidelines for creating and maintaining Windsurf rules to ensure consistency and effectiveness.
1301
+ globs: .windsurfrules
1302
+ filesToApplyRule: .windsurfrules
1303
+ alwaysApply: true
1304
+ ---
1305
+ The below describes how you should be structuring new rule sections in this document.
1306
+ - **Required Rule Structure:**
1307
+ ```markdown
1308
+ ---
1309
+ description: Clear, one-line description of what the rule enforces
1310
+ globs: path/to/files/*.ext, other/path/**/*
1311
+ alwaysApply: boolean
1312
+ ---
1313
+
1314
+ - **Main Points in Bold**
1315
+ - Sub-points with details
1316
+ - Examples and explanations
1317
+ ```
1318
+
1319
+ - **Section References:**
1320
+ - Use `ALL_CAPS_SECTION` to reference files
1321
+ - Example: `WINDSURF_RULES`
1322
+
1323
+ - **Code Examples:**
1324
+ - Use language-specific code blocks
1325
+ ```typescript
1326
+ // ✅ DO: Show good examples
1327
+ const goodExample = true;
1328
+
1329
+ // ❌ DON'T: Show anti-patterns
1330
+ const badExample = false;
1331
+ ```
1332
+
1333
+ - **Rule Content Guidelines:**
1334
+ - Start with high-level overview
1335
+ - Include specific, actionable requirements
1336
+ - Show examples of correct implementation
1337
+ - Reference existing code when possible
1338
+ - Keep rules DRY by referencing other rules
1339
+
1340
+ - **Rule Maintenance:**
1341
+ - Update rules when new patterns emerge
1342
+ - Add examples from actual codebase
1343
+ - Remove outdated patterns
1344
+ - Cross-reference related rules
1345
+
1346
+ - **Best Practices:**
1347
+ - Use bullet points for clarity
1348
+ - Keep descriptions concise
1349
+ - Include both DO and DON'T examples
1350
+ - Reference actual code over theoretical examples
1351
+ - Use consistent formatting across rules
1352
+
1353
+ ---
1354
+ SELF_IMPROVE
1355
+ ---
1356
+ description: Guidelines for continuously improving this rules document based on emerging code patterns and best practices.
1357
+ globs: **/*
1358
+ filesToApplyRule: **/*
1359
+ alwaysApply: true
1360
+ ---
1361
+
1362
+ - **Rule Improvement Triggers:**
1363
+ - New code patterns not covered by existing rules
1364
+ - Repeated similar implementations across files
1365
+ - Common error patterns that could be prevented
1366
+ - New libraries or tools being used consistently
1367
+ - Emerging best practices in the codebase
1368
+
1369
+ - **Analysis Process:**
1370
+ - Compare new code with existing rules
1371
+ - Identify patterns that should be standardized
1372
+ - Look for references to external documentation
1373
+ - Check for consistent error handling patterns
1374
+ - Monitor test patterns and coverage
1375
+
1376
+ - **Rule Updates:**
1377
+ - **Add New Rules When:**
1378
+ - A new technology/pattern is used in 3+ files
1379
+ - Common bugs could be prevented by a rule
1380
+ - Code reviews repeatedly mention the same feedback
1381
+ - New security or performance patterns emerge
1382
+
1383
+ - **Modify Existing Rules When:**
1384
+ - Better examples exist in the codebase
1385
+ - Additional edge cases are discovered
1386
+ - Related rules have been updated
1387
+ - Implementation details have changed
1388
+
1389
+ - **Example Pattern Recognition:**
1390
+ ```typescript
1391
+ // If you see repeated patterns like:
1392
+ const data = await prisma.user.findMany({
1393
+ select: { id: true, email: true },
1394
+ where: { status: 'ACTIVE' }
1395
+ });
1396
+
1397
+ // Consider adding a PRISMA section in the .windsurfrules:
1398
+ // - Standard select fields
1399
+ // - Common where conditions
1400
+ // - Performance optimization patterns
1401
+ ```
1402
+
1403
+ - **Rule Quality Checks:**
1404
+ - Rules should be actionable and specific
1405
+ - Examples should come from actual code
1406
+ - References should be up to date
1407
+ - Patterns should be consistently enforced
1408
+
1409
+ - **Continuous Improvement:**
1410
+ - Monitor code review comments
1411
+ - Track common development questions
1412
+ - Update rules after major refactors
1413
+ - Add links to relevant documentation
1414
+ - Cross-reference related rules
1415
+
1416
+ - **Rule Deprecation:**
1417
+ - Mark outdated patterns as deprecated
1418
+ - Remove rules that no longer apply
1419
+ - Update references to deprecated rules
1420
+ - Document migration paths for old patterns
1421
+
1422
+ - **Documentation Updates:**
1423
+ - Keep examples synchronized with code
1424
+ - Update references to external docs
1425
+ - Maintain links between related rules
1426
+ - Document breaking changes
1427
+
1428
+ Follow WINDSURF_RULES for proper rule formatting and structure of windsurf rule sections.
1429
+
1430
+ # Added by Task Master - Development Workflow Rules
1431
+
1432
+ Below you will find a variety of important rules spanning:
1433
+ - the dev_workflow
1434
+ - the .windsurfrules document self-improvement workflow
1435
+ - the template to follow when modifying or adding new sections/rules to this document.
1436
+
1437
+ ---
1438
+ DEV_WORKFLOW
1439
+ ---
1440
+ description: Guide for using meta-development script (scripts/dev.js) to manage task-driven development workflows
1441
+ globs: **/*
1442
+ filesToApplyRule: **/*
1443
+ alwaysApply: true
1444
+ ---
1445
+
1446
+ - **Global CLI Commands**
1447
+ - Task Master now provides a global CLI through the `task-master` command
1448
+ - All functionality from `scripts/dev.js` is available through this interface
1449
+ - Install globally with `npm install -g claude-task-master` or use locally via `npx`
1450
+ - Use `task-master <command>` instead of `node scripts/dev.js <command>`
1451
+ - Examples:
1452
+ - `task-master list` instead of `node scripts/dev.js list`
1453
+ - `task-master next` instead of `node scripts/dev.js next`
1454
+ - `task-master expand --id=3` instead of `node scripts/dev.js expand --id=3`
1455
+ - All commands accept the same options as their script equivalents
1456
+ - The CLI provides additional commands like `task-master init` for project setup
1457
+
1458
+ - **Development Workflow Process**
1459
+ - Start new projects by running `task-master init` or `node scripts/dev.js parse-prd --input=<prd-file.txt>` to generate initial tasks.json
1460
+ - Begin coding sessions with `task-master list` to see current tasks, status, and IDs
1461
+ - Analyze task complexity with `task-master analyze-complexity --research` before breaking down tasks
1462
+ - Select tasks based on dependencies (all marked 'done'), priority level, and ID order
1463
+ - Clarify tasks by checking task files in tasks/ directory or asking for user input
1464
+ - View specific task details using `task-master show <id>` to understand implementation requirements
1465
+ - Break down complex tasks using `task-master expand --id=<id>` with appropriate flags
1466
+ - Clear existing subtasks if needed using `task-master clear-subtasks --id=<id>` before regenerating
1467
+ - Implement code following task details, dependencies, and project standards
1468
+ - Verify tasks according to test strategies before marking as complete
1469
+ - Mark completed tasks with `task-master set-status --id=<id> --status=done`
1470
+ - Update dependent tasks when implementation differs from original plan
1471
+ - Generate task files with `task-master generate` after updating tasks.json
1472
+ - Maintain valid dependency structure with `task-master fix-dependencies` when needed
1473
+ - Respect dependency chains and task priorities when selecting work
1474
+ - Report progress regularly using the list command
1475
+
1476
+ - **Task Complexity Analysis**
1477
+ - Run `node scripts/dev.js analyze-complexity --research` for comprehensive analysis
1478
+ - Review complexity report in scripts/task-complexity-report.json
1479
+ - Or use `node scripts/dev.js complexity-report` for a formatted, readable version of the report
1480
+ - Focus on tasks with highest complexity scores (8-10) for detailed breakdown
1481
+ - Use analysis results to determine appropriate subtask allocation
1482
+ - Note that reports are automatically used by the expand command
1483
+
1484
+ - **Task Breakdown Process**
1485
+ - For tasks with complexity analysis, use `node scripts/dev.js expand --id=<id>`
1486
+ - Otherwise use `node scripts/dev.js expand --id=<id> --subtasks=<number>`
1487
+ - Add `--research` flag to leverage Perplexity AI for research-backed expansion
1488
+ - Use `--prompt="<context>"` to provide additional context when needed
1489
+ - Review and adjust generated subtasks as necessary
1490
+ - Use `--all` flag to expand multiple pending tasks at once
1491
+ - If subtasks need regeneration, clear them first with `clear-subtasks` command
1492
+
1493
+ - **Implementation Drift Handling**
1494
+ - When implementation differs significantly from planned approach
1495
+ - When future tasks need modification due to current implementation choices
1496
+ - When new dependencies or requirements emerge
1497
+ - Call `node scripts/dev.js update --from=<futureTaskId> --prompt="<explanation>"` to update tasks.json
1498
+
1499
+ - **Task Status Management**
1500
+ - Use 'pending' for tasks ready to be worked on
1501
+ - Use 'done' for completed and verified tasks
1502
+ - Use 'deferred' for postponed tasks
1503
+ - Add custom status values as needed for project-specific workflows
1504
+
1505
+ - **Task File Format Reference**
1506
+ ```
1507
+ # Task ID: <id>
1508
+ # Title: <title>
1509
+ # Status: <status>
1510
+ # Dependencies: <comma-separated list of dependency IDs>
1511
+ # Priority: <priority>
1512
+ # Description: <brief description>
1513
+ # Details:
1514
+ <detailed implementation notes>
1515
+
1516
+ # Test Strategy:
1517
+ <verification approach>
1518
+ ```
1519
+
1520
+ - **Command Reference: parse-prd**
1521
+ - Legacy Syntax: `node scripts/dev.js parse-prd --input=<prd-file.txt>`
1522
+ - CLI Syntax: `task-master parse-prd --input=<prd-file.txt>`
1523
+ - Description: Parses a PRD document and generates a tasks.json file with structured tasks
1524
+ - Parameters:
1525
+ - `--input=<file>`: Path to the PRD text file (default: sample-prd.txt)
1526
+ - Example: `task-master parse-prd --input=requirements.txt`
1527
+ - Notes: Will overwrite existing tasks.json file. Use with caution.
1528
+
1529
+ - **Command Reference: update**
1530
+ - Legacy Syntax: `node scripts/dev.js update --from=<id> --prompt="<prompt>"`
1531
+ - CLI Syntax: `task-master update --from=<id> --prompt="<prompt>"`
1532
+ - Description: Updates tasks with ID >= specified ID based on the provided prompt
1533
+ - Parameters:
1534
+ - `--from=<id>`: Task ID from which to start updating (required)
1535
+ - `--prompt="<text>"`: Explanation of changes or new context (required)
1536
+ - Example: `task-master update --from=4 --prompt="Now we are using Express instead of Fastify."`
1537
+ - Notes: Only updates tasks not marked as 'done'. Completed tasks remain unchanged.
1538
+
1539
+ - **Command Reference: generate**
1540
+ - Legacy Syntax: `node scripts/dev.js generate`
1541
+ - CLI Syntax: `task-master generate`
1542
+ - Description: Generates individual task files in tasks/ directory based on tasks.json
1543
+ - Parameters:
1544
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
1545
+ - `--output=<dir>, -o`: Output directory (default: 'tasks')
1546
+ - Example: `task-master generate`
1547
+ - Notes: Overwrites existing task files. Creates tasks/ directory if needed.
1548
+
1549
+ - **Command Reference: set-status**
1550
+ - Legacy Syntax: `node scripts/dev.js set-status --id=<id> --status=<status>`
1551
+ - CLI Syntax: `task-master set-status --id=<id> --status=<status>`
1552
+ - Description: Updates the status of a specific task in tasks.json
1553
+ - Parameters:
1554
+ - `--id=<id>`: ID of the task to update (required)
1555
+ - `--status=<status>`: New status value (required)
1556
+ - Example: `task-master set-status --id=3 --status=done`
1557
+ - Notes: Common values are 'done', 'pending', and 'deferred', but any string is accepted.
1558
+
1559
+ - **Command Reference: list**
1560
+ - Legacy Syntax: `node scripts/dev.js list`
1561
+ - CLI Syntax: `task-master list`
1562
+ - Description: Lists all tasks in tasks.json with IDs, titles, and status
1563
+ - Parameters:
1564
+ - `--status=<status>, -s`: Filter by status
1565
+ - `--with-subtasks`: Show subtasks for each task
1566
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
1567
+ - Example: `task-master list`
1568
+ - Notes: Provides quick overview of project progress. Use at start of sessions.
1569
+
1570
+ - **Command Reference: expand**
1571
+ - Legacy Syntax: `node scripts/dev.js expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]`
1572
+ - CLI Syntax: `task-master expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]`
1573
+ - Description: Expands a task with subtasks for detailed implementation
1574
+ - Parameters:
1575
+ - `--id=<id>`: ID of task to expand (required unless using --all)
1576
+ - `--all`: Expand all pending tasks, prioritized by complexity
1577
+ - `--num=<number>`: Number of subtasks to generate (default: from complexity report)
1578
+ - `--research`: Use Perplexity AI for research-backed generation
1579
+ - `--prompt="<text>"`: Additional context for subtask generation
1580
+ - `--force`: Regenerate subtasks even for tasks that already have them
1581
+ - Example: `task-master expand --id=3 --num=5 --research --prompt="Focus on security aspects"`
1582
+ - Notes: Uses complexity report recommendations if available.
1583
+
1584
+ - **Command Reference: analyze-complexity**
1585
+ - Legacy Syntax: `node scripts/dev.js analyze-complexity [options]`
1586
+ - CLI Syntax: `task-master analyze-complexity [options]`
1587
+ - Description: Analyzes task complexity and generates expansion recommendations
1588
+ - Parameters:
1589
+ - `--output=<file>, -o`: Output file path (default: scripts/task-complexity-report.json)
1590
+ - `--model=<model>, -m`: Override LLM model to use
1591
+ - `--threshold=<number>, -t`: Minimum score for expansion recommendation (default: 5)
1592
+ - `--file=<path>, -f`: Use alternative tasks.json file
1593
+ - `--research, -r`: Use Perplexity AI for research-backed analysis
1594
+ - Example: `task-master analyze-complexity --research`
1595
+ - Notes: Report includes complexity scores, recommended subtasks, and tailored prompts.
1596
+
1597
+ - **Command Reference: clear-subtasks**
1598
+ - Legacy Syntax: `node scripts/dev.js clear-subtasks --id=<id>`
1599
+ - CLI Syntax: `task-master clear-subtasks --id=<id>`
1600
+ - Description: Removes subtasks from specified tasks to allow regeneration
1601
+ - Parameters:
1602
+ - `--id=<id>`: ID or comma-separated IDs of tasks to clear subtasks from
1603
+ - `--all`: Clear subtasks from all tasks
1604
+ - Examples:
1605
+ - `task-master clear-subtasks --id=3`
1606
+ - `task-master clear-subtasks --id=1,2,3`
1607
+ - `task-master clear-subtasks --all`
1608
+ - Notes:
1609
+ - Task files are automatically regenerated after clearing subtasks
1610
+ - Can be combined with expand command to immediately generate new subtasks
1611
+ - Works with both parent tasks and individual subtasks
1612
+
1613
+ - **Task Structure Fields**
1614
+ - **id**: Unique identifier for the task (Example: `1`)
1615
+ - **title**: Brief, descriptive title (Example: `"Initialize Repo"`)
1616
+ - **description**: Concise summary of what the task involves (Example: `"Create a new repository, set up initial structure."`)
1617
+ - **status**: Current state of the task (Example: `"pending"`, `"done"`, `"deferred"`)
1618
+ - **dependencies**: IDs of prerequisite tasks (Example: `[1, 2]`)
1619
+ - Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending)
1620
+ - This helps quickly identify which prerequisite tasks are blocking work
1621
+ - **priority**: Importance level (Example: `"high"`, `"medium"`, `"low"`)
1622
+ - **details**: In-depth implementation instructions (Example: `"Use GitHub client ID/secret, handle callback, set session token."`)
1623
+ - **testStrategy**: Verification approach (Example: `"Deploy and call endpoint to confirm 'Hello World' response."`)
1624
+ - **subtasks**: List of smaller, more specific tasks (Example: `[{"id": 1, "title": "Configure OAuth", ...}]`)
1625
+
1626
+ - **Environment Variables Configuration**
1627
+ - **ANTHROPIC_API_KEY** (Required): Your Anthropic API key for Claude (Example: `ANTHROPIC_API_KEY=sk-ant-api03-...`)
1628
+ - **MODEL** (Default: `"claude-3-7-sonnet-20250219"`): Claude model to use (Example: `MODEL=claude-3-opus-20240229`)
1629
+ - **MAX_TOKENS** (Default: `"4000"`): Maximum tokens for responses (Example: `MAX_TOKENS=8000`)
1630
+ - **TEMPERATURE** (Default: `"0.7"`): Temperature for model responses (Example: `TEMPERATURE=0.5`)
1631
+ - **DEBUG** (Default: `"false"`): Enable debug logging (Example: `DEBUG=true`)
1632
+ - **LOG_LEVEL** (Default: `"info"`): Console output level (Example: `LOG_LEVEL=debug`)
1633
+ - **DEFAULT_SUBTASKS** (Default: `"3"`): Default subtask count (Example: `DEFAULT_SUBTASKS=5`)
1634
+ - **DEFAULT_PRIORITY** (Default: `"medium"`): Default priority (Example: `DEFAULT_PRIORITY=high`)
1635
+ - **PROJECT_NAME** (Default: `"MCP SaaS MVP"`): Project name in metadata (Example: `PROJECT_NAME=My Awesome Project`)
1636
+ - **PROJECT_VERSION** (Default: `"1.0.0"`): Version in metadata (Example: `PROJECT_VERSION=2.1.0`)
1637
+ - **PERPLEXITY_API_KEY**: For research-backed features (Example: `PERPLEXITY_API_KEY=pplx-...`)
1638
+ - **PERPLEXITY_MODEL** (Default: `"sonar-medium-online"`): Perplexity model (Example: `PERPLEXITY_MODEL=sonar-large-online`)
1639
+
1640
+ - **Determining the Next Task**
1641
+ - Run `task-master next` to show the next task to work on
1642
+ - The next command identifies tasks with all dependencies satisfied
1643
+ - Tasks are prioritized by priority level, dependency count, and ID
1644
+ - The command shows comprehensive task information including:
1645
+ - Basic task details and description
1646
+ - Implementation details
1647
+ - Subtasks (if they exist)
1648
+ - Contextual suggested actions
1649
+ - Recommended before starting any new development work
1650
+ - Respects your project's dependency structure
1651
+ - Ensures tasks are completed in the appropriate sequence
1652
+ - Provides ready-to-use commands for common task actions
1653
+
1654
+ - **Viewing Specific Task Details**
1655
+ - Run `task-master show <id>` or `task-master show --id=<id>` to view a specific task
1656
+ - Use dot notation for subtasks: `task-master show 1.2` (shows subtask 2 of task 1)
1657
+ - Displays comprehensive information similar to the next command, but for a specific task
1658
+ - For parent tasks, shows all subtasks and their current status
1659
+ - For subtasks, shows parent task information and relationship
1660
+ - Provides contextual suggested actions appropriate for the specific task
1661
+ - Useful for examining task details before implementation or checking status
1662
+
1663
+ - **Managing Task Dependencies**
1664
+ - Use `task-master add-dependency --id=<id> --depends-on=<id>` to add a dependency
1665
+ - Use `task-master remove-dependency --id=<id> --depends-on=<id>` to remove a dependency
1666
+ - The system prevents circular dependencies and duplicate dependency entries
1667
+ - Dependencies are checked for existence before being added or removed
1668
+ - Task files are automatically regenerated after dependency changes
1669
+ - Dependencies are visualized with status indicators in task listings and files
1670
+
1671
+ - **Command Reference: add-dependency**
1672
+ - Legacy Syntax: `node scripts/dev.js add-dependency --id=<id> --depends-on=<id>`
1673
+ - CLI Syntax: `task-master add-dependency --id=<id> --depends-on=<id>`
1674
+ - Description: Adds a dependency relationship between two tasks
1675
+ - Parameters:
1676
+ - `--id=<id>`: ID of task that will depend on another task (required)
1677
+ - `--depends-on=<id>`: ID of task that will become a dependency (required)
1678
+ - Example: `task-master add-dependency --id=22 --depends-on=21`
1679
+ - Notes: Prevents circular dependencies and duplicates; updates task files automatically
1680
+
1681
+ - **Command Reference: remove-dependency**
1682
+ - Legacy Syntax: `node scripts/dev.js remove-dependency --id=<id> --depends-on=<id>`
1683
+ - CLI Syntax: `task-master remove-dependency --id=<id> --depends-on=<id>`
1684
+ - Description: Removes a dependency relationship between two tasks
1685
+ - Parameters:
1686
+ - `--id=<id>`: ID of task to remove dependency from (required)
1687
+ - `--depends-on=<id>`: ID of task to remove as a dependency (required)
1688
+ - Example: `task-master remove-dependency --id=22 --depends-on=21`
1689
+ - Notes: Checks if dependency actually exists; updates task files automatically
1690
+
1691
+ - **Command Reference: validate-dependencies**
1692
+ - Legacy Syntax: `node scripts/dev.js validate-dependencies [options]`
1693
+ - CLI Syntax: `task-master validate-dependencies [options]`
1694
+ - Description: Checks for and identifies invalid dependencies in tasks.json and task files
1695
+ - Parameters:
1696
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
1697
+ - Example: `task-master validate-dependencies`
1698
+ - Notes:
1699
+ - Reports all non-existent dependencies and self-dependencies without modifying files
1700
+ - Provides detailed statistics on task dependency state
1701
+ - Use before fix-dependencies to audit your task structure
1702
+
1703
+ - **Command Reference: fix-dependencies**
1704
+ - Legacy Syntax: `node scripts/dev.js fix-dependencies [options]`
1705
+ - CLI Syntax: `task-master fix-dependencies [options]`
1706
+ - Description: Finds and fixes all invalid dependencies in tasks.json and task files
1707
+ - Parameters:
1708
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
1709
+ - Example: `task-master fix-dependencies`
1710
+ - Notes:
1711
+ - Removes references to non-existent tasks and subtasks
1712
+ - Eliminates self-dependencies (tasks depending on themselves)
1713
+ - Regenerates task files with corrected dependencies
1714
+ - Provides detailed report of all fixes made
1715
+
1716
+ - **Command Reference: complexity-report**
1717
+ - Legacy Syntax: `node scripts/dev.js complexity-report [options]`
1718
+ - CLI Syntax: `task-master complexity-report [options]`
1719
+ - Description: Displays the task complexity analysis report in a formatted, easy-to-read way
1720
+ - Parameters:
1721
+ - `--file=<path>, -f`: Path to the complexity report file (default: 'scripts/task-complexity-report.json')
1722
+ - Example: `task-master complexity-report`
1723
+ - Notes:
1724
+ - Shows tasks organized by complexity score with recommended actions
1725
+ - Provides complexity distribution statistics
1726
+ - Displays ready-to-use expansion commands for complex tasks
1727
+ - If no report exists, offers to generate one interactively
1728
+
1729
+ - **Command Reference: add-task**
1730
+ - CLI Syntax: `task-master add-task [options]`
1731
+ - Description: Add a new task to tasks.json using AI
1732
+ - Parameters:
1733
+ - `--file=<path>, -f`: Path to the tasks file (default: 'tasks/tasks.json')
1734
+ - `--prompt=<text>, -p`: Description of the task to add (required)
1735
+ - `--dependencies=<ids>, -d`: Comma-separated list of task IDs this task depends on
1736
+ - `--priority=<priority>`: Task priority (high, medium, low) (default: 'medium')
1737
+ - Example: `task-master add-task --prompt="Create user authentication using Auth0"`
1738
+ - Notes: Uses AI to convert description into structured task with appropriate details
1739
+
1740
+ - **Command Reference: init**
1741
+ - CLI Syntax: `task-master init`
1742
+ - Description: Initialize a new project with Task Master structure
1743
+ - Parameters: None
1744
+ - Example: `task-master init`
1745
+ - Notes:
1746
+ - Creates initial project structure with required files
1747
+ - Prompts for project settings if not provided
1748
+ - Merges with existing files when appropriate
1749
+ - Can be used to bootstrap a new Task Master project quickly
1750
+
1751
+ - **Code Analysis & Refactoring Techniques**
1752
+ - **Top-Level Function Search**
1753
+ - Use grep pattern matching to find all exported functions across the codebase
1754
+ - Command: `grep -E "export (function|const) \w+|function \w+\(|const \w+ = \(|module\.exports" --include="*.js" -r ./`
1755
+ - Benefits:
1756
+ - Quickly identify all public API functions without reading implementation details
1757
+ - Compare functions between files during refactoring (e.g., monolithic to modular structure)
1758
+ - Verify all expected functions exist in refactored modules
1759
+ - Identify duplicate functionality or naming conflicts
1760
+ - Usage examples:
1761
+ - When migrating from `scripts/dev.js` to modular structure: `grep -E "function \w+\(" scripts/dev.js`
1762
+ - Check function exports in a directory: `grep -E "export (function|const)" scripts/modules/`
1763
+ - Find potential naming conflicts: `grep -E "function (get|set|create|update)\w+\(" -r ./`
1764
+ - Variations:
1765
+ - Add `-n` flag to include line numbers
1766
+ - Add `--include="*.ts"` to filter by file extension
1767
+ - Use with `| sort` to alphabetize results
1768
+ - Integration with refactoring workflow:
1769
+ - Start by mapping all functions in the source file
1770
+ - Create target module files based on function grouping
1771
+ - Verify all functions were properly migrated
1772
+ - Check for any unintentional duplications or omissions
1773
+
1774
+ ---
1775
+ WINDSURF_RULES
1776
+ ---
1777
+ description: Guidelines for creating and maintaining Windsurf rules to ensure consistency and effectiveness.
1778
+ globs: .windsurfrules
1779
+ filesToApplyRule: .windsurfrules
1780
+ alwaysApply: true
1781
+ ---
1782
+ The below describes how you should be structuring new rule sections in this document.
1783
+ - **Required Rule Structure:**
1784
+ ```markdown
1785
+ ---
1786
+ description: Clear, one-line description of what the rule enforces
1787
+ globs: path/to/files/*.ext, other/path/**/*
1788
+ alwaysApply: boolean
1789
+ ---
1790
+
1791
+ - **Main Points in Bold**
1792
+ - Sub-points with details
1793
+ - Examples and explanations
1794
+ ```
1795
+
1796
+ - **Section References:**
1797
+ - Use `ALL_CAPS_SECTION` to reference files
1798
+ - Example: `WINDSURF_RULES`
1799
+
1800
+ - **Code Examples:**
1801
+ - Use language-specific code blocks
1802
+ ```typescript
1803
+ // ✅ DO: Show good examples
1804
+ const goodExample = true;
1805
+
1806
+ // ❌ DON'T: Show anti-patterns
1807
+ const badExample = false;
1808
+ ```
1809
+
1810
+ - **Rule Content Guidelines:**
1811
+ - Start with high-level overview
1812
+ - Include specific, actionable requirements
1813
+ - Show examples of correct implementation
1814
+ - Reference existing code when possible
1815
+ - Keep rules DRY by referencing other rules
1816
+
1817
+ - **Rule Maintenance:**
1818
+ - Update rules when new patterns emerge
1819
+ - Add examples from actual codebase
1820
+ - Remove outdated patterns
1821
+ - Cross-reference related rules
1822
+
1823
+ - **Best Practices:**
1824
+ - Use bullet points for clarity
1825
+ - Keep descriptions concise
1826
+ - Include both DO and DON'T examples
1827
+ - Reference actual code over theoretical examples
1828
+ - Use consistent formatting across rules
1829
+
1830
+ ---
1831
+ SELF_IMPROVE
1832
+ ---
1833
+ description: Guidelines for continuously improving this rules document based on emerging code patterns and best practices.
1834
+ globs: **/*
1835
+ filesToApplyRule: **/*
1836
+ alwaysApply: true
1837
+ ---
1838
+
1839
+ - **Rule Improvement Triggers:**
1840
+ - New code patterns not covered by existing rules
1841
+ - Repeated similar implementations across files
1842
+ - Common error patterns that could be prevented
1843
+ - New libraries or tools being used consistently
1844
+ - Emerging best practices in the codebase
1845
+
1846
+ - **Analysis Process:**
1847
+ - Compare new code with existing rules
1848
+ - Identify patterns that should be standardized
1849
+ - Look for references to external documentation
1850
+ - Check for consistent error handling patterns
1851
+ - Monitor test patterns and coverage
1852
+
1853
+ - **Rule Updates:**
1854
+ - **Add New Rules When:**
1855
+ - A new technology/pattern is used in 3+ files
1856
+ - Common bugs could be prevented by a rule
1857
+ - Code reviews repeatedly mention the same feedback
1858
+ - New security or performance patterns emerge
1859
+
1860
+ - **Modify Existing Rules When:**
1861
+ - Better examples exist in the codebase
1862
+ - Additional edge cases are discovered
1863
+ - Related rules have been updated
1864
+ - Implementation details have changed
1865
+
1866
+ - **Example Pattern Recognition:**
1867
+ ```typescript
1868
+ // If you see repeated patterns like:
1869
+ const data = await prisma.user.findMany({
1870
+ select: { id: true, email: true },
1871
+ where: { status: 'ACTIVE' }
1872
+ });
1873
+
1874
+ // Consider adding a PRISMA section in the .windsurfrules:
1875
+ // - Standard select fields
1876
+ // - Common where conditions
1877
+ // - Performance optimization patterns
1878
+ ```
1879
+
1880
+ - **Rule Quality Checks:**
1881
+ - Rules should be actionable and specific
1882
+ - Examples should come from actual code
1883
+ - References should be up to date
1884
+ - Patterns should be consistently enforced
1885
+
1886
+ - **Continuous Improvement:**
1887
+ - Monitor code review comments
1888
+ - Track common development questions
1889
+ - Update rules after major refactors
1890
+ - Add links to relevant documentation
1891
+ - Cross-reference related rules
1892
+
1893
+ - **Rule Deprecation:**
1894
+ - Mark outdated patterns as deprecated
1895
+ - Remove rules that no longer apply
1896
+ - Update references to deprecated rules
1897
+ - Document migration paths for old patterns
1898
+
1899
+ - **Documentation Updates:**
1900
+ - Keep examples synchronized with code
1901
+ - Update references to external docs
1902
+ - Maintain links between related rules
1903
+ - Document breaking changes
1904
+
1905
+ Follow WINDSURF_RULES for proper rule formatting and structure of windsurf rule sections.
1906
+
1907
+ # Added by Task Master - Development Workflow Rules
1908
+
1909
+ Below you will find a variety of important rules spanning:
1910
+ - the dev_workflow
1911
+ - the .windsurfrules document self-improvement workflow
1912
+ - the template to follow when modifying or adding new sections/rules to this document.
1913
+
1914
+ ---
1915
+ DEV_WORKFLOW
1916
+ ---
1917
+ description: Guide for using meta-development script (scripts/dev.js) to manage task-driven development workflows
1918
+ globs: **/*
1919
+ filesToApplyRule: **/*
1920
+ alwaysApply: true
1921
+ ---
1922
+
1923
+ - **Global CLI Commands**
1924
+ - Task Master now provides a global CLI through the `task-master` command
1925
+ - All functionality from `scripts/dev.js` is available through this interface
1926
+ - Install globally with `npm install -g claude-task-master` or use locally via `npx`
1927
+ - Use `task-master <command>` instead of `node scripts/dev.js <command>`
1928
+ - Examples:
1929
+ - `task-master list` instead of `node scripts/dev.js list`
1930
+ - `task-master next` instead of `node scripts/dev.js next`
1931
+ - `task-master expand --id=3` instead of `node scripts/dev.js expand --id=3`
1932
+ - All commands accept the same options as their script equivalents
1933
+ - The CLI provides additional commands like `task-master init` for project setup
1934
+
1935
+ - **Development Workflow Process**
1936
+ - Start new projects by running `task-master init` or `node scripts/dev.js parse-prd --input=<prd-file.txt>` to generate initial tasks.json
1937
+ - Begin coding sessions with `task-master list` to see current tasks, status, and IDs
1938
+ - Analyze task complexity with `task-master analyze-complexity --research` before breaking down tasks
1939
+ - Select tasks based on dependencies (all marked 'done'), priority level, and ID order
1940
+ - Clarify tasks by checking task files in tasks/ directory or asking for user input
1941
+ - View specific task details using `task-master show <id>` to understand implementation requirements
1942
+ - Break down complex tasks using `task-master expand --id=<id>` with appropriate flags
1943
+ - Clear existing subtasks if needed using `task-master clear-subtasks --id=<id>` before regenerating
1944
+ - Implement code following task details, dependencies, and project standards
1945
+ - Verify tasks according to test strategies before marking as complete
1946
+ - Mark completed tasks with `task-master set-status --id=<id> --status=done`
1947
+ - Update dependent tasks when implementation differs from original plan
1948
+ - Generate task files with `task-master generate` after updating tasks.json
1949
+ - Maintain valid dependency structure with `task-master fix-dependencies` when needed
1950
+ - Respect dependency chains and task priorities when selecting work
1951
+ - Report progress regularly using the list command
1952
+
1953
+ - **Task Complexity Analysis**
1954
+ - Run `node scripts/dev.js analyze-complexity --research` for comprehensive analysis
1955
+ - Review complexity report in scripts/task-complexity-report.json
1956
+ - Or use `node scripts/dev.js complexity-report` for a formatted, readable version of the report
1957
+ - Focus on tasks with highest complexity scores (8-10) for detailed breakdown
1958
+ - Use analysis results to determine appropriate subtask allocation
1959
+ - Note that reports are automatically used by the expand command
1960
+
1961
+ - **Task Breakdown Process**
1962
+ - For tasks with complexity analysis, use `node scripts/dev.js expand --id=<id>`
1963
+ - Otherwise use `node scripts/dev.js expand --id=<id> --subtasks=<number>`
1964
+ - Add `--research` flag to leverage Perplexity AI for research-backed expansion
1965
+ - Use `--prompt="<context>"` to provide additional context when needed
1966
+ - Review and adjust generated subtasks as necessary
1967
+ - Use `--all` flag to expand multiple pending tasks at once
1968
+ - If subtasks need regeneration, clear them first with `clear-subtasks` command
1969
+
1970
+ - **Implementation Drift Handling**
1971
+ - When implementation differs significantly from planned approach
1972
+ - When future tasks need modification due to current implementation choices
1973
+ - When new dependencies or requirements emerge
1974
+ - Call `node scripts/dev.js update --from=<futureTaskId> --prompt="<explanation>"` to update tasks.json
1975
+
1976
+ - **Task Status Management**
1977
+ - Use 'pending' for tasks ready to be worked on
1978
+ - Use 'done' for completed and verified tasks
1979
+ - Use 'deferred' for postponed tasks
1980
+ - Add custom status values as needed for project-specific workflows
1981
+
1982
+ - **Task File Format Reference**
1983
+ ```
1984
+ # Task ID: <id>
1985
+ # Title: <title>
1986
+ # Status: <status>
1987
+ # Dependencies: <comma-separated list of dependency IDs>
1988
+ # Priority: <priority>
1989
+ # Description: <brief description>
1990
+ # Details:
1991
+ <detailed implementation notes>
1992
+
1993
+ # Test Strategy:
1994
+ <verification approach>
1995
+ ```
1996
+
1997
+ - **Command Reference: parse-prd**
1998
+ - Legacy Syntax: `node scripts/dev.js parse-prd --input=<prd-file.txt>`
1999
+ - CLI Syntax: `task-master parse-prd --input=<prd-file.txt>`
2000
+ - Description: Parses a PRD document and generates a tasks.json file with structured tasks
2001
+ - Parameters:
2002
+ - `--input=<file>`: Path to the PRD text file (default: sample-prd.txt)
2003
+ - Example: `task-master parse-prd --input=requirements.txt`
2004
+ - Notes: Will overwrite existing tasks.json file. Use with caution.
2005
+
2006
+ - **Command Reference: update**
2007
+ - Legacy Syntax: `node scripts/dev.js update --from=<id> --prompt="<prompt>"`
2008
+ - CLI Syntax: `task-master update --from=<id> --prompt="<prompt>"`
2009
+ - Description: Updates tasks with ID >= specified ID based on the provided prompt
2010
+ - Parameters:
2011
+ - `--from=<id>`: Task ID from which to start updating (required)
2012
+ - `--prompt="<text>"`: Explanation of changes or new context (required)
2013
+ - Example: `task-master update --from=4 --prompt="Now we are using Express instead of Fastify."`
2014
+ - Notes: Only updates tasks not marked as 'done'. Completed tasks remain unchanged.
2015
+
2016
+ - **Command Reference: generate**
2017
+ - Legacy Syntax: `node scripts/dev.js generate`
2018
+ - CLI Syntax: `task-master generate`
2019
+ - Description: Generates individual task files in tasks/ directory based on tasks.json
2020
+ - Parameters:
2021
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
2022
+ - `--output=<dir>, -o`: Output directory (default: 'tasks')
2023
+ - Example: `task-master generate`
2024
+ - Notes: Overwrites existing task files. Creates tasks/ directory if needed.
2025
+
2026
+ - **Command Reference: set-status**
2027
+ - Legacy Syntax: `node scripts/dev.js set-status --id=<id> --status=<status>`
2028
+ - CLI Syntax: `task-master set-status --id=<id> --status=<status>`
2029
+ - Description: Updates the status of a specific task in tasks.json
2030
+ - Parameters:
2031
+ - `--id=<id>`: ID of the task to update (required)
2032
+ - `--status=<status>`: New status value (required)
2033
+ - Example: `task-master set-status --id=3 --status=done`
2034
+ - Notes: Common values are 'done', 'pending', and 'deferred', but any string is accepted.
2035
+
2036
+ - **Command Reference: list**
2037
+ - Legacy Syntax: `node scripts/dev.js list`
2038
+ - CLI Syntax: `task-master list`
2039
+ - Description: Lists all tasks in tasks.json with IDs, titles, and status
2040
+ - Parameters:
2041
+ - `--status=<status>, -s`: Filter by status
2042
+ - `--with-subtasks`: Show subtasks for each task
2043
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
2044
+ - Example: `task-master list`
2045
+ - Notes: Provides quick overview of project progress. Use at start of sessions.
2046
+
2047
+ - **Command Reference: expand**
2048
+ - Legacy Syntax: `node scripts/dev.js expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]`
2049
+ - CLI Syntax: `task-master expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]`
2050
+ - Description: Expands a task with subtasks for detailed implementation
2051
+ - Parameters:
2052
+ - `--id=<id>`: ID of task to expand (required unless using --all)
2053
+ - `--all`: Expand all pending tasks, prioritized by complexity
2054
+ - `--num=<number>`: Number of subtasks to generate (default: from complexity report)
2055
+ - `--research`: Use Perplexity AI for research-backed generation
2056
+ - `--prompt="<text>"`: Additional context for subtask generation
2057
+ - `--force`: Regenerate subtasks even for tasks that already have them
2058
+ - Example: `task-master expand --id=3 --num=5 --research --prompt="Focus on security aspects"`
2059
+ - Notes: Uses complexity report recommendations if available.
2060
+
2061
+ - **Command Reference: analyze-complexity**
2062
+ - Legacy Syntax: `node scripts/dev.js analyze-complexity [options]`
2063
+ - CLI Syntax: `task-master analyze-complexity [options]`
2064
+ - Description: Analyzes task complexity and generates expansion recommendations
2065
+ - Parameters:
2066
+ - `--output=<file>, -o`: Output file path (default: scripts/task-complexity-report.json)
2067
+ - `--model=<model>, -m`: Override LLM model to use
2068
+ - `--threshold=<number>, -t`: Minimum score for expansion recommendation (default: 5)
2069
+ - `--file=<path>, -f`: Use alternative tasks.json file
2070
+ - `--research, -r`: Use Perplexity AI for research-backed analysis
2071
+ - Example: `task-master analyze-complexity --research`
2072
+ - Notes: Report includes complexity scores, recommended subtasks, and tailored prompts.
2073
+
2074
+ - **Command Reference: clear-subtasks**
2075
+ - Legacy Syntax: `node scripts/dev.js clear-subtasks --id=<id>`
2076
+ - CLI Syntax: `task-master clear-subtasks --id=<id>`
2077
+ - Description: Removes subtasks from specified tasks to allow regeneration
2078
+ - Parameters:
2079
+ - `--id=<id>`: ID or comma-separated IDs of tasks to clear subtasks from
2080
+ - `--all`: Clear subtasks from all tasks
2081
+ - Examples:
2082
+ - `task-master clear-subtasks --id=3`
2083
+ - `task-master clear-subtasks --id=1,2,3`
2084
+ - `task-master clear-subtasks --all`
2085
+ - Notes:
2086
+ - Task files are automatically regenerated after clearing subtasks
2087
+ - Can be combined with expand command to immediately generate new subtasks
2088
+ - Works with both parent tasks and individual subtasks
2089
+
2090
+ - **Task Structure Fields**
2091
+ - **id**: Unique identifier for the task (Example: `1`)
2092
+ - **title**: Brief, descriptive title (Example: `"Initialize Repo"`)
2093
+ - **description**: Concise summary of what the task involves (Example: `"Create a new repository, set up initial structure."`)
2094
+ - **status**: Current state of the task (Example: `"pending"`, `"done"`, `"deferred"`)
2095
+ - **dependencies**: IDs of prerequisite tasks (Example: `[1, 2]`)
2096
+ - Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending)
2097
+ - This helps quickly identify which prerequisite tasks are blocking work
2098
+ - **priority**: Importance level (Example: `"high"`, `"medium"`, `"low"`)
2099
+ - **details**: In-depth implementation instructions (Example: `"Use GitHub client ID/secret, handle callback, set session token."`)
2100
+ - **testStrategy**: Verification approach (Example: `"Deploy and call endpoint to confirm 'Hello World' response."`)
2101
+ - **subtasks**: List of smaller, more specific tasks (Example: `[{"id": 1, "title": "Configure OAuth", ...}]`)
2102
+
2103
+ - **Environment Variables Configuration**
2104
+ - **ANTHROPIC_API_KEY** (Required): Your Anthropic API key for Claude (Example: `ANTHROPIC_API_KEY=sk-ant-api03-...`)
2105
+ - **MODEL** (Default: `"claude-3-7-sonnet-20250219"`): Claude model to use (Example: `MODEL=claude-3-opus-20240229`)
2106
+ - **MAX_TOKENS** (Default: `"4000"`): Maximum tokens for responses (Example: `MAX_TOKENS=8000`)
2107
+ - **TEMPERATURE** (Default: `"0.7"`): Temperature for model responses (Example: `TEMPERATURE=0.5`)
2108
+ - **DEBUG** (Default: `"false"`): Enable debug logging (Example: `DEBUG=true`)
2109
+ - **LOG_LEVEL** (Default: `"info"`): Console output level (Example: `LOG_LEVEL=debug`)
2110
+ - **DEFAULT_SUBTASKS** (Default: `"3"`): Default subtask count (Example: `DEFAULT_SUBTASKS=5`)
2111
+ - **DEFAULT_PRIORITY** (Default: `"medium"`): Default priority (Example: `DEFAULT_PRIORITY=high`)
2112
+ - **PROJECT_NAME** (Default: `"MCP SaaS MVP"`): Project name in metadata (Example: `PROJECT_NAME=My Awesome Project`)
2113
+ - **PROJECT_VERSION** (Default: `"1.0.0"`): Version in metadata (Example: `PROJECT_VERSION=2.1.0`)
2114
+ - **PERPLEXITY_API_KEY**: For research-backed features (Example: `PERPLEXITY_API_KEY=pplx-...`)
2115
+ - **PERPLEXITY_MODEL** (Default: `"sonar-medium-online"`): Perplexity model (Example: `PERPLEXITY_MODEL=sonar-large-online`)
2116
+
2117
+ - **Determining the Next Task**
2118
+ - Run `task-master next` to show the next task to work on
2119
+ - The next command identifies tasks with all dependencies satisfied
2120
+ - Tasks are prioritized by priority level, dependency count, and ID
2121
+ - The command shows comprehensive task information including:
2122
+ - Basic task details and description
2123
+ - Implementation details
2124
+ - Subtasks (if they exist)
2125
+ - Contextual suggested actions
2126
+ - Recommended before starting any new development work
2127
+ - Respects your project's dependency structure
2128
+ - Ensures tasks are completed in the appropriate sequence
2129
+ - Provides ready-to-use commands for common task actions
2130
+
2131
+ - **Viewing Specific Task Details**
2132
+ - Run `task-master show <id>` or `task-master show --id=<id>` to view a specific task
2133
+ - Use dot notation for subtasks: `task-master show 1.2` (shows subtask 2 of task 1)
2134
+ - Displays comprehensive information similar to the next command, but for a specific task
2135
+ - For parent tasks, shows all subtasks and their current status
2136
+ - For subtasks, shows parent task information and relationship
2137
+ - Provides contextual suggested actions appropriate for the specific task
2138
+ - Useful for examining task details before implementation or checking status
2139
+
2140
+ - **Managing Task Dependencies**
2141
+ - Use `task-master add-dependency --id=<id> --depends-on=<id>` to add a dependency
2142
+ - Use `task-master remove-dependency --id=<id> --depends-on=<id>` to remove a dependency
2143
+ - The system prevents circular dependencies and duplicate dependency entries
2144
+ - Dependencies are checked for existence before being added or removed
2145
+ - Task files are automatically regenerated after dependency changes
2146
+ - Dependencies are visualized with status indicators in task listings and files
2147
+
2148
+ - **Command Reference: add-dependency**
2149
+ - Legacy Syntax: `node scripts/dev.js add-dependency --id=<id> --depends-on=<id>`
2150
+ - CLI Syntax: `task-master add-dependency --id=<id> --depends-on=<id>`
2151
+ - Description: Adds a dependency relationship between two tasks
2152
+ - Parameters:
2153
+ - `--id=<id>`: ID of task that will depend on another task (required)
2154
+ - `--depends-on=<id>`: ID of task that will become a dependency (required)
2155
+ - Example: `task-master add-dependency --id=22 --depends-on=21`
2156
+ - Notes: Prevents circular dependencies and duplicates; updates task files automatically
2157
+
2158
+ - **Command Reference: remove-dependency**
2159
+ - Legacy Syntax: `node scripts/dev.js remove-dependency --id=<id> --depends-on=<id>`
2160
+ - CLI Syntax: `task-master remove-dependency --id=<id> --depends-on=<id>`
2161
+ - Description: Removes a dependency relationship between two tasks
2162
+ - Parameters:
2163
+ - `--id=<id>`: ID of task to remove dependency from (required)
2164
+ - `--depends-on=<id>`: ID of task to remove as a dependency (required)
2165
+ - Example: `task-master remove-dependency --id=22 --depends-on=21`
2166
+ - Notes: Checks if dependency actually exists; updates task files automatically
2167
+
2168
+ - **Command Reference: validate-dependencies**
2169
+ - Legacy Syntax: `node scripts/dev.js validate-dependencies [options]`
2170
+ - CLI Syntax: `task-master validate-dependencies [options]`
2171
+ - Description: Checks for and identifies invalid dependencies in tasks.json and task files
2172
+ - Parameters:
2173
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
2174
+ - Example: `task-master validate-dependencies`
2175
+ - Notes:
2176
+ - Reports all non-existent dependencies and self-dependencies without modifying files
2177
+ - Provides detailed statistics on task dependency state
2178
+ - Use before fix-dependencies to audit your task structure
2179
+
2180
+ - **Command Reference: fix-dependencies**
2181
+ - Legacy Syntax: `node scripts/dev.js fix-dependencies [options]`
2182
+ - CLI Syntax: `task-master fix-dependencies [options]`
2183
+ - Description: Finds and fixes all invalid dependencies in tasks.json and task files
2184
+ - Parameters:
2185
+ - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
2186
+ - Example: `task-master fix-dependencies`
2187
+ - Notes:
2188
+ - Removes references to non-existent tasks and subtasks
2189
+ - Eliminates self-dependencies (tasks depending on themselves)
2190
+ - Regenerates task files with corrected dependencies
2191
+ - Provides detailed report of all fixes made
2192
+
2193
+ - **Command Reference: complexity-report**
2194
+ - Legacy Syntax: `node scripts/dev.js complexity-report [options]`
2195
+ - CLI Syntax: `task-master complexity-report [options]`
2196
+ - Description: Displays the task complexity analysis report in a formatted, easy-to-read way
2197
+ - Parameters:
2198
+ - `--file=<path>, -f`: Path to the complexity report file (default: 'scripts/task-complexity-report.json')
2199
+ - Example: `task-master complexity-report`
2200
+ - Notes:
2201
+ - Shows tasks organized by complexity score with recommended actions
2202
+ - Provides complexity distribution statistics
2203
+ - Displays ready-to-use expansion commands for complex tasks
2204
+ - If no report exists, offers to generate one interactively
2205
+
2206
+ - **Command Reference: add-task**
2207
+ - CLI Syntax: `task-master add-task [options]`
2208
+ - Description: Add a new task to tasks.json using AI
2209
+ - Parameters:
2210
+ - `--file=<path>, -f`: Path to the tasks file (default: 'tasks/tasks.json')
2211
+ - `--prompt=<text>, -p`: Description of the task to add (required)
2212
+ - `--dependencies=<ids>, -d`: Comma-separated list of task IDs this task depends on
2213
+ - `--priority=<priority>`: Task priority (high, medium, low) (default: 'medium')
2214
+ - Example: `task-master add-task --prompt="Create user authentication using Auth0"`
2215
+ - Notes: Uses AI to convert description into structured task with appropriate details
2216
+
2217
+ - **Command Reference: init**
2218
+ - CLI Syntax: `task-master init`
2219
+ - Description: Initialize a new project with Task Master structure
2220
+ - Parameters: None
2221
+ - Example: `task-master init`
2222
+ - Notes:
2223
+ - Creates initial project structure with required files
2224
+ - Prompts for project settings if not provided
2225
+ - Merges with existing files when appropriate
2226
+ - Can be used to bootstrap a new Task Master project quickly
2227
+
2228
+ - **Code Analysis & Refactoring Techniques**
2229
+ - **Top-Level Function Search**
2230
+ - Use grep pattern matching to find all exported functions across the codebase
2231
+ - Command: `grep -E "export (function|const) \w+|function \w+\(|const \w+ = \(|module\.exports" --include="*.js" -r ./`
2232
+ - Benefits:
2233
+ - Quickly identify all public API functions without reading implementation details
2234
+ - Compare functions between files during refactoring (e.g., monolithic to modular structure)
2235
+ - Verify all expected functions exist in refactored modules
2236
+ - Identify duplicate functionality or naming conflicts
2237
+ - Usage examples:
2238
+ - When migrating from `scripts/dev.js` to modular structure: `grep -E "function \w+\(" scripts/dev.js`
2239
+ - Check function exports in a directory: `grep -E "export (function|const)" scripts/modules/`
2240
+ - Find potential naming conflicts: `grep -E "function (get|set|create|update)\w+\(" -r ./`
2241
+ - Variations:
2242
+ - Add `-n` flag to include line numbers
2243
+ - Add `--include="*.ts"` to filter by file extension
2244
+ - Use with `| sort` to alphabetize results
2245
+ - Integration with refactoring workflow:
2246
+ - Start by mapping all functions in the source file
2247
+ - Create target module files based on function grouping
2248
+ - Verify all functions were properly migrated
2249
+ - Check for any unintentional duplications or omissions
2250
+
2251
+ ---
2252
+ WINDSURF_RULES
2253
+ ---
2254
+ description: Guidelines for creating and maintaining Windsurf rules to ensure consistency and effectiveness.
2255
+ globs: .windsurfrules
2256
+ filesToApplyRule: .windsurfrules
2257
+ alwaysApply: true
2258
+ ---
2259
+ The below describes how you should be structuring new rule sections in this document.
2260
+ - **Required Rule Structure:**
2261
+ ```markdown
2262
+ ---
2263
+ description: Clear, one-line description of what the rule enforces
2264
+ globs: path/to/files/*.ext, other/path/**/*
2265
+ alwaysApply: boolean
2266
+ ---
2267
+
2268
+ - **Main Points in Bold**
2269
+ - Sub-points with details
2270
+ - Examples and explanations
2271
+ ```
2272
+
2273
+ - **Section References:**
2274
+ - Use `ALL_CAPS_SECTION` to reference files
2275
+ - Example: `WINDSURF_RULES`
2276
+
2277
+ - **Code Examples:**
2278
+ - Use language-specific code blocks
2279
+ ```typescript
2280
+ // ✅ DO: Show good examples
2281
+ const goodExample = true;
2282
+
2283
+ // ❌ DON'T: Show anti-patterns
2284
+ const badExample = false;
2285
+ ```
2286
+
2287
+ - **Rule Content Guidelines:**
2288
+ - Start with high-level overview
2289
+ - Include specific, actionable requirements
2290
+ - Show examples of correct implementation
2291
+ - Reference existing code when possible
2292
+ - Keep rules DRY by referencing other rules
2293
+
2294
+ - **Rule Maintenance:**
2295
+ - Update rules when new patterns emerge
2296
+ - Add examples from actual codebase
2297
+ - Remove outdated patterns
2298
+ - Cross-reference related rules
2299
+
2300
+ - **Best Practices:**
2301
+ - Use bullet points for clarity
2302
+ - Keep descriptions concise
2303
+ - Include both DO and DON'T examples
2304
+ - Reference actual code over theoretical examples
2305
+ - Use consistent formatting across rules
2306
+
2307
+ ---
2308
+ SELF_IMPROVE
2309
+ ---
2310
+ description: Guidelines for continuously improving this rules document based on emerging code patterns and best practices.
2311
+ globs: **/*
2312
+ filesToApplyRule: **/*
2313
+ alwaysApply: true
2314
+ ---
2315
+
2316
+ - **Rule Improvement Triggers:**
2317
+ - New code patterns not covered by existing rules
2318
+ - Repeated similar implementations across files
2319
+ - Common error patterns that could be prevented
2320
+ - New libraries or tools being used consistently
2321
+ - Emerging best practices in the codebase
2322
+
2323
+ - **Analysis Process:**
2324
+ - Compare new code with existing rules
2325
+ - Identify patterns that should be standardized
2326
+ - Look for references to external documentation
2327
+ - Check for consistent error handling patterns
2328
+ - Monitor test patterns and coverage
2329
+
2330
+ - **Rule Updates:**
2331
+ - **Add New Rules When:**
2332
+ - A new technology/pattern is used in 3+ files
2333
+ - Common bugs could be prevented by a rule
2334
+ - Code reviews repeatedly mention the same feedback
2335
+ - New security or performance patterns emerge
2336
+
2337
+ - **Modify Existing Rules When:**
2338
+ - Better examples exist in the codebase
2339
+ - Additional edge cases are discovered
2340
+ - Related rules have been updated
2341
+ - Implementation details have changed
2342
+
2343
+ - **Example Pattern Recognition:**
2344
+ ```typescript
2345
+ // If you see repeated patterns like:
2346
+ const data = await prisma.user.findMany({
2347
+ select: { id: true, email: true },
2348
+ where: { status: 'ACTIVE' }
2349
+ });
2350
+
2351
+ // Consider adding a PRISMA section in the .windsurfrules:
2352
+ // - Standard select fields
2353
+ // - Common where conditions
2354
+ // - Performance optimization patterns
2355
+ ```
2356
+
2357
+ - **Rule Quality Checks:**
2358
+ - Rules should be actionable and specific
2359
+ - Examples should come from actual code
2360
+ - References should be up to date
2361
+ - Patterns should be consistently enforced
2362
+
2363
+ - **Continuous Improvement:**
2364
+ - Monitor code review comments
2365
+ - Track common development questions
2366
+ - Update rules after major refactors
2367
+ - Add links to relevant documentation
2368
+ - Cross-reference related rules
2369
+
2370
+ - **Rule Deprecation:**
2371
+ - Mark outdated patterns as deprecated
2372
+ - Remove rules that no longer apply
2373
+ - Update references to deprecated rules
2374
+ - Document migration paths for old patterns
2375
+
2376
+ - **Documentation Updates:**
2377
+ - Keep examples synchronized with code
2378
+ - Update references to external docs
2379
+ - Maintain links between related rules
2380
+ - Document breaking changes
2381
+
2382
+ Follow WINDSURF_RULES for proper rule formatting and structure of windsurf rule sections.