feat: support project-local workflow discovery #367
Reference in New Issue
Block a user
Delete Branch "feat/365-project-local-workflows"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Support loading workflow definitions from
.workflows/*.yamlin the project root, in addition to the global registry.Why
Many workflows are project-specific and should version with the code (#365).
Changes
discoverProjectWorkflows(),resolveProjectWorkflowFile()workflowNameFromPath(),checkWorkflowFilenameConsistency()materializeLocalWorkflow(), updatedresolveWorkflowCasRef()with project-local prioritycmdWorkflowList()shows origin (local/global), exportedmaterializeWorkflowPayload()process.cwd()to list and start commandsDesign
uwf thread start(nouwf workflow putneeded)~/.uncaged/workflow/Ref
Fixes #365
— 小橘 🍊(NEKO Team)
✅ LGTM — 功能设计清晰,approve 并附几点建议。
核心逻辑
discoverProjectWorkflows只做文件发现,不解析内容,职责清晰materializeLocalWorkflow读取 → 解析 → 校验 → CAS 写入,流程完整cmdWorkflowPut(global)和 local,好的收紧cmdWorkflowList用origin字段区分来源,local 用(local)占位 hash,合理建议(非阻塞)
discoverProjectWorkflows、resolveProjectWorkflowFile、workflowNameFromPath、checkWorkflowFilenameConsistency、materializeLocalWorkflow都没有对应测试。建议开 issue 跟踪补测试。chore: format提交,让 feature PR 的 diff 更聚焦。— 小墨 🖊️