@vibeflow-tools/cli 0.5.1 → 0.6.1

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 (109) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +199 -81
  3. package/dist/chunk-D6KVQU62.js +7 -0
  4. package/dist/{cli/chunk-QULSJOW5.js → chunk-NRMCK2HM.js} +4 -4
  5. package/dist/cli/chunk-D6KVQU62.js +7 -0
  6. package/dist/{chunk-QULSJOW5.js → cli/chunk-NRMCK2HM.js} +4 -4
  7. package/dist/cli/{files-H2UIFEPJ.js → files-GOVXPMB5.js} +1 -1
  8. package/dist/cli/{files-MIDXKOAF.js → files-TKEFFLPI.js} +1 -1
  9. package/dist/cli/index.js +88 -27952
  10. package/dist/client/kanban-browser.js +15 -15
  11. package/dist/client/kanban.css +1 -1
  12. package/dist/{files-H2UIFEPJ.js → files-GOVXPMB5.js} +1 -1
  13. package/dist/{files-MIDXKOAF.js → files-TKEFFLPI.js} +1 -1
  14. package/dist/index.js +88 -27952
  15. package/package.json +8 -3
  16. package/dist/chunk-252RNKHM.js +0 -2
  17. package/dist/chunk-43MUGU6Z.js +0 -67
  18. package/dist/chunk-4Y62J4KR.js +0 -438
  19. package/dist/chunk-6ABTC7IA.js +0 -482
  20. package/dist/chunk-7K2VHAWF.js +0 -569
  21. package/dist/chunk-BKTZSHJS.js +0 -2
  22. package/dist/chunk-BQLZVQ4E.js +0 -2
  23. package/dist/chunk-F57OXWVU.js +0 -33
  24. package/dist/chunk-I2OSZY66.js +0 -803
  25. package/dist/chunk-IZB3AHO6.js +0 -6
  26. package/dist/chunk-JKC6MUZ4.js +0 -558
  27. package/dist/chunk-KKBXVPTJ.js +0 -2
  28. package/dist/chunk-LK3IGDR6.js +0 -438
  29. package/dist/chunk-MKOKIWTN.js +0 -569
  30. package/dist/chunk-MW4OS3IK.js +0 -438
  31. package/dist/chunk-NRPOXSY6.js +0 -568
  32. package/dist/chunk-NUM3G22J.js +0 -569
  33. package/dist/chunk-O564QSMS.js +0 -569
  34. package/dist/chunk-OAGEPYIT.js +0 -535
  35. package/dist/chunk-PHBHAIHA.js +0 -33
  36. package/dist/chunk-PK737AKV.js +0 -560
  37. package/dist/chunk-TPDIOJDI.js +0 -7
  38. package/dist/chunk-TWAAPROG.js +0 -822
  39. package/dist/chunk-XF2CNPE4.js +0 -803
  40. package/dist/cli/chunk-252RNKHM.js +0 -2
  41. package/dist/cli/chunk-43MUGU6Z.js +0 -67
  42. package/dist/cli/chunk-4Y62J4KR.js +0 -438
  43. package/dist/cli/chunk-6ABTC7IA.js +0 -482
  44. package/dist/cli/chunk-7K2VHAWF.js +0 -569
  45. package/dist/cli/chunk-BKTZSHJS.js +0 -2
  46. package/dist/cli/chunk-BQLZVQ4E.js +0 -2
  47. package/dist/cli/chunk-F57OXWVU.js +0 -33
  48. package/dist/cli/chunk-I2OSZY66.js +0 -803
  49. package/dist/cli/chunk-IZB3AHO6.js +0 -6
  50. package/dist/cli/chunk-JKC6MUZ4.js +0 -558
  51. package/dist/cli/chunk-KKBXVPTJ.js +0 -2
  52. package/dist/cli/chunk-LK3IGDR6.js +0 -438
  53. package/dist/cli/chunk-MKOKIWTN.js +0 -569
  54. package/dist/cli/chunk-MW4OS3IK.js +0 -438
  55. package/dist/cli/chunk-NRPOXSY6.js +0 -568
  56. package/dist/cli/chunk-NUM3G22J.js +0 -569
  57. package/dist/cli/chunk-O564QSMS.js +0 -569
  58. package/dist/cli/chunk-OAGEPYIT.js +0 -535
  59. package/dist/cli/chunk-PHBHAIHA.js +0 -33
  60. package/dist/cli/chunk-PK737AKV.js +0 -560
  61. package/dist/cli/chunk-TPDIOJDI.js +0 -7
  62. package/dist/cli/chunk-TWAAPROG.js +0 -822
  63. package/dist/cli/chunk-XF2CNPE4.js +0 -803
  64. package/dist/cli/files-27OYPA7W.js +0 -20
  65. package/dist/cli/files-2TK74THO.js +0 -22
  66. package/dist/cli/files-3RDDXUOS.js +0 -2
  67. package/dist/cli/files-7275M2PW.js +0 -20
  68. package/dist/cli/files-D3YPV7QT.js +0 -20
  69. package/dist/cli/files-FER4UZ4X.js +0 -22
  70. package/dist/cli/files-H4FRDKJV.js +0 -22
  71. package/dist/cli/files-IJZVMROA.js +0 -22
  72. package/dist/cli/files-IX5QZQHC.js +0 -2
  73. package/dist/cli/files-JPVPKRMX.js +0 -2
  74. package/dist/cli/files-KH3UEFN7.js +0 -20
  75. package/dist/cli/files-LTDT5ZFT.js +0 -22
  76. package/dist/cli/files-O4WJLFMU.js +0 -2
  77. package/dist/cli/files-OYO6A6MZ.js +0 -22
  78. package/dist/cli/files-R6QHQBH4.js +0 -22
  79. package/dist/cli/files-UCALOYWZ.js +0 -22
  80. package/dist/cli/files-UWZP7P6B.js +0 -2
  81. package/dist/cli/files-VIDLQM7Y.js +0 -20
  82. package/dist/cli/files-X2RDLF3W.js +0 -22
  83. package/dist/cli/files-XVDNOAZB.js +0 -22
  84. package/dist/cli/workspace-NB6BACZA.js +0 -12
  85. package/dist/cli/workspace-X2NGGGTQ.js +0 -12
  86. package/dist/cli/workspace-X4QXECQQ.js +0 -12
  87. package/dist/files-27OYPA7W.js +0 -20
  88. package/dist/files-2TK74THO.js +0 -22
  89. package/dist/files-3RDDXUOS.js +0 -2
  90. package/dist/files-7275M2PW.js +0 -20
  91. package/dist/files-D3YPV7QT.js +0 -20
  92. package/dist/files-FER4UZ4X.js +0 -22
  93. package/dist/files-H4FRDKJV.js +0 -22
  94. package/dist/files-IJZVMROA.js +0 -22
  95. package/dist/files-IX5QZQHC.js +0 -2
  96. package/dist/files-JPVPKRMX.js +0 -2
  97. package/dist/files-KH3UEFN7.js +0 -20
  98. package/dist/files-LTDT5ZFT.js +0 -22
  99. package/dist/files-O4WJLFMU.js +0 -2
  100. package/dist/files-OYO6A6MZ.js +0 -22
  101. package/dist/files-R6QHQBH4.js +0 -22
  102. package/dist/files-UCALOYWZ.js +0 -22
  103. package/dist/files-UWZP7P6B.js +0 -2
  104. package/dist/files-VIDLQM7Y.js +0 -20
  105. package/dist/files-X2RDLF3W.js +0 -22
  106. package/dist/files-XVDNOAZB.js +0 -22
  107. package/dist/workspace-NB6BACZA.js +0 -12
  108. package/dist/workspace-X2NGGGTQ.js +0 -12
  109. package/dist/workspace-X4QXECQQ.js +0 -12
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import{readdirSync as M,writeFileSync as J,readFileSync as K,unlinkSync as b,statSync as F,mkdirSync as q,existsSync as c}from"fs";import{join as m,basename as v}from"path";var g=".vibeflow",$="tasks",S="tasks/files",R="tasks/screenshots",Z="config.json";import{existsSync as f,readFileSync as O,writeFileSync as _,mkdirSync as p,readdirSync as h,unlinkSync as E,renameSync as A}from"fs";import{join as u,extname as I}from"path";import{randomBytes as z}from"crypto";var V=["backlog","todo","in-progress","review","done"];function W(){return z(15).toString("hex")}function k(e){return u(e,g,$)}function j(e){let s=u(e,g),n=u(s,"files"),i=u(s,S),o=u(s,"screenshots"),t=u(s,R);if(f(n)){p(i,{recursive:!0});for(let r of h(n)){let a=u(n,r),l=u(i,r);if(!f(l))try{A(a,l)}catch{}}}if(f(o)){p(t,{recursive:!0});for(let r of h(o)){let a=u(o,r),l=u(t,r);if(!f(l))try{A(a,l)}catch{}}}}function re(e){j(e),p(k(e),{recursive:!0}),p(u(e,g,R),{recursive:!0})}function D(e){return e.slice(0,10)}function U(e,s,n){let i=k(e);return n?u(i,D(n),`${s}.json`):u(i,`${s}.json`)}function T(e,s){let n=k(e);if(!f(n))return null;for(let i of h(n,{withFileTypes:!0}))if(i.isDirectory()){let o=u(n,i.name,`${s}.json`);if(f(o))return o}else if(i.name===`${s}.json`)return u(n,i.name);return null}function H(e){let s=(()=>{if(typeof e.type!="string")return;let n=e.type.trim();if(!(!n||n==="[object Object]"))return n})();return{id:String(e.id??""),title:String(e.title??"Untitled"),description:String(e.description??""),status:V.includes(e.status)?e.status:"todo",url:e.url?String(e.url):void 0,selector:(()=>{let n=String(e.selector??"/");return e.file&&!e.cssSelector&&n.startsWith(String(e.file))?e.url?String(e.url):"/":n})(),cssSelector:e.cssSelector&&String(e.cssSelector)!==String(e.selector??"/")?String(e.cssSelector):void 0,file:e.file?String(e.file):void 0,line:e.line!=null?Number(e.line):void 0,col:e.col!=null?Number(e.col):void 0,component:e.component?String(e.component):void 0,type:s,priority:e.priority?String(e.priority):void 0,...e.reportBack===!0&&{reportBack:!0},agent:e.agent?String(e.agent):void 0,model:e.model?String(e.model):void 0,author:e.author?String(e.author):void 0,commits:Array.isArray(e.commits)?e.commits.map(n=>({sha:String(n.sha??""),message:String(n.message??""),timestamp:String(n.timestamp??new Date().toISOString())})):void 0,created:String(e.created??new Date().toISOString()),updated:e.updated?String(e.updated):void 0,comments:Array.isArray(e.comments)?e.comments.map(n=>({...n,text:n.text??n.content??""})):[],files:Array.isArray(e.files)?e.files.map(n=>typeof n=="string"?{name:n,addedAt:new Date().toISOString()}:{name:String(n.name??""),addedAt:String(n.addedAt??new Date().toISOString()),linkedPath:n.linkedPath?String(n.linkedPath):void 0,mimeType:n.mimeType?String(n.mimeType):void 0}).filter(n=>n.name):[],screenshot:e.screenshot?String(e.screenshot):void 0,annotatedElementText:e.annotatedElementText?String(e.annotatedElementText):void 0,tags:Array.isArray(e.tags)?e.tags.filter(n=>typeof n=="string"&&n.length>0):void 0}}function w(e,s){let n=u(k(e),D(s.created));p(n,{recursive:!0});let i=u(n,`${s.id}.json`),o=i+".tmp";_(o,JSON.stringify(s,null,2),"utf-8"),A(o,i)}function oe(e,s){let n=(()=>{let o=(s.priority??"").trim().toLowerCase();return o==="critical"?"Critical":o==="high"?"High":o==="low"?"Low":"Medium"})(),i={...s,priority:n,id:W(),created:new Date().toISOString(),comments:[],files:[]};return w(e,i),i}function y(e){try{let s=O(e,"utf-8");if(e.endsWith(".json")){let n=JSON.parse(s);return!n||typeof n!="object"||!("id"in n)?null:H(n)}return null}catch{return null}}function L(e){let s=k(e);if(!f(s))return[];let n=[];for(let i of h(s,{withFileTypes:!0}))if(i.isDirectory()){let o=u(s,i.name);for(let t of h(o))if(I(t)===".json"){let r=u(o,t),a=y(r);a&&n.push({task:a,filePath:r})}}else if(I(i.name)===".json"){let o=u(s,i.name),t=y(o);t&&n.push({task:t,filePath:o})}return n}function ae(e){return L(e).map(({task:s})=>s)}function ue(e){return L(e).map(({task:s,filePath:n})=>({...s,filePath:n}))}function N(e,s,n){let i=T(e,s),o=i?y(i):null;if(!o)return null;let t={...o,...n,updated:new Date().toISOString()};if(w(e,t),i&&i!==U(e,s,t.created))try{E(i)}catch{}return t}function le(e,s){let n=T(e,s);return n?(E(n),!0):!1}function ce(e,s,n){return{id:e.id,status:e.status,title:e.title,description:e.description,...e.url&&{url:e.url},selector:e.selector,...e.file&&{file:e.file},...e.line!=null&&{line:e.line},...e.col!=null&&{col:e.col},...e.component&&{component:e.component},...e.type&&{type:e.type},...e.priority&&{priority:e.priority},...s&&s.length>0&&{structuredComments:s},...n&&n.length>0&&{linkedFiles:n},...e.reportBack&&{reportBack:!0},created:e.created}}function me(e,s,n,i,o){let t=[];if(t.push(`[${e.status}] ${e.title}`),t.push(` id: ${e.id}`),t.push(` file: ${s}`),e.file&&t.push(` source: ${e.file}${e.line!=null?`:${e.line}`:""}${e.col!=null?`:${e.col}`:""}`),e.component&&t.push(` component: ${e.component}`),t.push(` selector: ${e.selector??"/"}`),e.cssSelector&&t.push(` css: ${e.cssSelector}`),e.url&&t.push(` url: ${e.url}`),e.commits&&e.commits.length>0)if(e.commits.length===1)t.push(` commit: ${e.commits[0].sha}`);else{t.push(` commits (${e.commits.length}):`);for(let r of e.commits)t.push(` ${r.sha.slice(0,8)} ${r.timestamp} ${r.message.slice(0,60)}`)}if(t.push(` created: ${e.created}`),e.type&&t.push(` type: ${e.type}`),e.priority&&t.push(` priority: ${e.priority}`),e.author&&t.push(` author: ${e.author}`),e.description){t.push(" description:");for(let r of e.description.split(`
2
+ import{readdirSync as W,writeFileSync as J,readFileSync as V,unlinkSync as x,statSync as v,mkdirSync as q,existsSync as c}from"fs";import{join as m,basename as P}from"path";var g=".vibeflow",C="tasks",k="tasks/files",A="tasks/screenshots",Z="config.json";import{existsSync as f,readFileSync as O,writeFileSync as _,mkdirSync as p,readdirSync as h,unlinkSync as D,renameSync as F}from"fs";import{join as u,extname as I}from"path";import{randomBytes as z}from"crypto";var j=["backlog","todo","in-progress","review","done"];function H(){return z(15).toString("hex")}function S(e){return u(e,g,C)}function K(e){let i=u(e,g),n=u(i,"files"),s=u(i,k),o=u(i,"screenshots"),t=u(i,A);if(f(n)){p(s,{recursive:!0});for(let r of h(n)){let a=u(n,r),l=u(s,r);if(!f(l))try{F(a,l)}catch{}}}if(f(o)){p(t,{recursive:!0});for(let r of h(o)){let a=u(o,r),l=u(t,r);if(!f(l))try{F(a,l)}catch{}}}}function re(e){K(e),p(S(e),{recursive:!0}),p(u(e,g,A),{recursive:!0})}function E(e){return e.slice(0,10)}function U(e,i,n){let s=S(e);return n?u(s,E(n),`${i}.json`):u(s,`${i}.json`)}function T(e,i){let n=S(e);if(!f(n))return null;for(let s of h(n,{withFileTypes:!0}))if(s.isDirectory()){let o=u(n,s.name,`${i}.json`);if(f(o))return o}else if(s.name===`${i}.json`)return u(n,s.name);return null}function M(e){let i=(()=>{if(typeof e.type!="string")return;let n=e.type.trim();if(!(!n||n==="[object Object]"))return n})();return{id:String(e.id??""),title:String(e.title??"Untitled"),description:String(e.description??""),status:j.includes(e.status)?e.status:"todo",url:e.url?String(e.url):void 0,selector:(()=>{let n=String(e.selector??"/");return e.file&&!e.cssSelector&&n.startsWith(String(e.file))?e.url?String(e.url):"/":n})(),cssSelector:e.cssSelector&&String(e.cssSelector)!==String(e.selector??"/")?String(e.cssSelector):void 0,file:e.file?String(e.file):void 0,line:e.line!=null?Number(e.line):void 0,col:e.col!=null?Number(e.col):void 0,component:e.component?String(e.component):void 0,type:i,priority:e.priority?String(e.priority):void 0,...e.reportBack===!0&&{reportBack:!0},agent:e.agent?String(e.agent):void 0,model:e.model?String(e.model):void 0,author:e.author?String(e.author):void 0,commits:Array.isArray(e.commits)?e.commits.map(n=>({sha:String(n.sha??""),message:String(n.message??""),timestamp:String(n.timestamp??new Date().toISOString())})):void 0,created:String(e.created??new Date().toISOString()),updated:e.updated?String(e.updated):void 0,comments:Array.isArray(e.comments)?e.comments.map(n=>({...n,text:n.text??n.content??""})):[],files:Array.isArray(e.files)?e.files.map(n=>typeof n=="string"?{name:n,addedAt:new Date().toISOString()}:{name:String(n.name??""),addedAt:String(n.addedAt??new Date().toISOString()),linkedPath:n.linkedPath?String(n.linkedPath):void 0,mimeType:n.mimeType?String(n.mimeType):void 0}).filter(n=>n.name):[],screenshot:e.screenshot?String(e.screenshot):void 0,annotatedElementText:e.annotatedElementText?String(e.annotatedElementText):void 0,tags:Array.isArray(e.tags)?e.tags.filter(n=>typeof n=="string"&&n.length>0):void 0,sortKey:e.sortKey?String(e.sortKey):void 0}}function w(e,i){let n=u(S(e),E(i.created));p(n,{recursive:!0});let s=u(n,`${i.id}.json`),o=s+".tmp";_(o,JSON.stringify(i,null,2),"utf-8"),F(o,s)}function oe(e,i){let n=(()=>{let o=(i.priority??"").trim().toLowerCase();return o==="critical"?"Critical":o==="high"?"High":o==="low"?"Low":"Medium"})(),s={...i,priority:n,id:H(),created:new Date().toISOString(),comments:[],files:[]};return w(e,s),s}function y(e){try{let i=O(e,"utf-8");if(e.endsWith(".json")){let n=JSON.parse(i);return!n||typeof n!="object"||!("id"in n)?null:M(n)}return null}catch{return null}}function L(e){let i=S(e);if(!f(i))return[];let n=[];for(let s of h(i,{withFileTypes:!0}))if(s.isDirectory()){let o=u(i,s.name);for(let t of h(o))if(I(t)===".json"){let r=u(o,t),a=y(r);a&&n.push({task:a,filePath:r})}}else if(I(s.name)===".json"){let o=u(i,s.name),t=y(o);t&&n.push({task:t,filePath:o})}return n}function ae(e){return L(e).map(({task:i})=>i)}function ue(e){return L(e).map(({task:i,filePath:n})=>({...i,filePath:n}))}function N(e,i,n){let s=T(e,i),o=s?y(s):null;if(!o)return null;let t={...o,...n,updated:new Date().toISOString()};if(w(e,t),s&&s!==U(e,i,t.created))try{D(s)}catch{}return t}function le(e,i){let n=T(e,i);return n?(D(n),!0):!1}function ce(e,i,n){return{id:e.id,status:e.status,title:e.title,description:e.description,...e.url&&{url:e.url},selector:e.selector,...e.file&&{file:e.file},...e.line!=null&&{line:e.line},...e.col!=null&&{col:e.col},...e.component&&{component:e.component},...e.type&&{type:e.type},...e.priority&&{priority:e.priority},...i&&i.length>0&&{structuredComments:i},...n&&n.length>0&&{linkedFiles:n},...e.reportBack&&{reportBack:!0},created:e.created}}function me(e,i,n,s,o){let t=[];if(t.push(`[${e.status}] ${e.title}`),t.push(` id: ${e.id}`),t.push(` file: ${i}`),e.file&&t.push(` source: ${e.file}${e.line!=null?`:${e.line}`:""}${e.col!=null?`:${e.col}`:""}`),e.component&&t.push(` component: ${e.component}`),t.push(` selector: ${e.selector??"/"}`),e.cssSelector&&t.push(` css: ${e.cssSelector}`),e.url&&t.push(` url: ${e.url}`),e.commits&&e.commits.length>0)if(e.commits.length===1)t.push(` commit: ${e.commits[0].sha}`);else{t.push(` commits (${e.commits.length}):`);for(let r of e.commits)t.push(` ${r.sha.slice(0,8)} ${r.timestamp} ${r.message.slice(0,60)}`)}if(t.push(` created: ${e.created}`),e.type&&t.push(` type: ${e.type}`),e.priority&&t.push(` priority: ${e.priority}`),e.author&&t.push(` author: ${e.author}`),e.description){t.push(" description:");for(let r of e.description.split(`
3
3
  `))t.push(` ${r}`)}if(e.annotatedElementText&&t.push(` element text: ${e.annotatedElementText}`),n.length>0){t.push(` comments (${n.length}):`);for(let r of n){let a=r.updatedAt?` (edited ${r.updatedAt})`:"";t.push(` [${r.author??"user"}] ${r.createdAt}${a}`);for(let l of r.text.split(`
4
- `))t.push(` ${l}`)}}if(i.length>0){t.push(` linked files (${i.length}):`);for(let r of i){t.push(` - ${r.name} ${r.url}`);let a=r.linkedPath??u(o,".vibeflow","files",e.id,r.name);if(/\.(md|txt)$/i.test(r.name)&&r.size<1e5&&f(a))try{let l=O(a,"utf-8");t.push(" \u250C\u2500\u2500 content \u2500\u2500");for(let B of l.split(`
4
+ `))t.push(` ${l}`)}}if(s.length>0){t.push(` linked files (${s.length}):`);for(let r of s){t.push(` - ${r.name} ${r.url}`);let a=r.linkedPath??u(o,".vibeflow","files",e.id,r.name);if(/\.(md|txt)$/i.test(r.name)&&r.size<1e5&&f(a))try{let l=O(a,"utf-8");t.push(" \u250C\u2500\u2500 content \u2500\u2500");for(let B of l.split(`
5
5
  `))t.push(` \u2502 ${B}`);t.push(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")}catch{}}}return t.join(`
6
- `)}function fe(e){let{autoCommit:s,autoPush:n,autoComment:i,createBranch:o}=e,t=[];if(t.push("Agent instructions (concise):"),t.push(" Discover: vibeflow tasks --status todo | vibeflow tasks --type Research | vibeflow tasks --user <email> | vibeflow tasks --tag <tag>"),t.push(" Details: vibeflow tasks --get <id> (full task info with comments and files)"),t.push(' Create: vibeflow tasks --add --title "..." --description "..."'),t.push(""),t.push(" Workflow:"),t.push(" \u26A0 IMMEDIATELY set in-progress BEFORE any implementation work:"),t.push(" 1. vibeflow tasks --edit <id> --set-status in-progress \u2190 DO THIS FIRST"),t.push(" 2. <implement the change>"),s){t.push(" 3. git add <files> (stage your changes first)");let r=["--set-status review"];s&&r.push('--commit-message "<one-line summary>"'),i&&r.push('--comment "<report>"'),t.push(` 4. vibeflow tasks --edit <id> ${r.join(" ")}`),t.push(" CLI will commit staged changes and link the commit SHA automatically.")}else{t.push(' 3. git add <files> && vibeflow tasks --commit --task <id> --message "<one-line summary>"');let r=["--set-status review"];i&&r.push('--comment "<report>"'),t.push(` 4. vibeflow tasks --edit <id> ${r.join(" ")}`)}return i&&(t.push(""),t.push(" Comment format (--comment):"),t.push(" \xB7 Plain text for concise one-liners."),t.push(" \xB7 Markdown for multi-section reports. Use **bold**, bullet lists, code fences."),t.push(" \xB7 Must cover: what changed, why, key decisions, anything future agents should know."),t.push(" \xB7 For long reports, attach a .md file and reference it in the comment.")),t.push(""),s&&t.push(" [setting] Auto-commit ON: provide --commit-message when setting status to review; CLI commits."),n&&t.push(" [setting] Auto-push ON: CLI pushes after the commit automatically."),i&&t.push(" [setting] Auto-comment ON: --comment is required when setting status to review."),o&&(t.push(" [setting] Create branch ON: after ALL tasks in this session are done, create and push a descriptive branch:"),t.push(" git checkout -b <short-name> (e.g. fix/annotation-errors, feat/eye-toggle, chore/cleanup-extension)"),t.push(" git push -u origin HEAD"),t.push(" Branch name rules: lowercase, kebab-case, 2-5 words, prefix fix/feat/chore/docs."),t.push(" Describe the WORK done (not dates). Bad: agent/2026-04-16. Good: fix/bug-errors-visibility.")),e.hasResearchTasks&&(t.push(" Research tasks: NEVER generate code \u2014 research only."),t.push(" Attach a .md report before marking Research tasks as review."),t.push(" CLI ENFORCES: cannot mark Research as review without an attached .md report."),t.push(" Use --report-file <path> to upload your .md report when marking as review:"),t.push(' vibeflow tasks --edit <id> --set-status review --report-file ./report.md --comment "..."'),t.push(" The file is uploaded to the task and deleted from the local filesystem automatically.")),e.hasBugTasks&&(t.push(" Bug tasks: Include error logs / stack traces in the commit comment."),t.push(" Describe: the symptom, the console error, what triggered it, and how it was fixed.")),t.push(" CRITICAL: NEVER edit .vibeflow/ task files directly."),t.push(" All task operations (status, comments, commits) must go through CLI commands."),t.push(" CRITICAL: Set in-progress BEFORE reading/planning. Other agents may pick the same task."),t.push(" The in-progress transition signals ownership. Skip it and another agent may duplicate your work."),t.push(" Sequence: discover tasks \u2192 pick one \u2192 set in-progress \u2192 THEN read details and implement."),t.push(' CRITICAL: NEVER set a task status to "done".'),t.push(' When your implementation is complete, set the status to "review" \u2014 not "done".'),t.push(" Only humans can mark tasks as done after reviewing the work."),t.push(" The CLI will warn you and still allow the change \u2014 but agents must not use it."),t.push(""),t.join(`
7
- `)}var P=".linked.json";function d(e,s){return m(e,g,S,s)}function G(e,s){q(d(e,s),{recursive:!0})}function Y(e,s){let n=m(d(e,s),P);if(!c(n))return[];try{return JSON.parse(K(n,"utf-8"))}catch{return[]}}function Q(e,s){let n=T(e,s),i=n?y(n):null;return!i?.files||i.files.length===0?[]:i.files}function C(e,s,n){N(e,s,{files:n})}function x(e,s){let n=Q(e,s),i=m(d(e,s),P);if(!c(i))return n;let o=Y(e,s);if(o.length===0){try{b(i)}catch{}return n}let t=n.slice(),r=!1;for(let a of o)t.find(l=>l.linkedPath===a.path||l.name===a.name&&l.linkedPath)||(t.push({name:a.name,linkedPath:a.path,addedAt:new Date().toISOString()}),r=!0);r&&C(e,s,t);try{b(i)}catch{}return t}function X(e,s){let n=d(e,s),i=x(e,s),o=new Map;for(let t of i){if(t.linkedPath&&c(t.linkedPath)){let a=F(t.linkedPath);o.set(t.name,{name:t.name,size:a.size,url:`/api/tasks/${s}/files/${encodeURIComponent(t.name)}`,linkedPath:t.linkedPath,createdAt:a.mtime.toISOString()});continue}let r=m(n,t.name);if(c(r)){let a=F(r);o.set(t.name,{name:t.name,size:a.size,url:`/api/tasks/${s}/files/${encodeURIComponent(t.name)}`,createdAt:a.mtime.toISOString()})}}if(c(n))for(let t of M(n,{withFileTypes:!0})){if(!t.isFile()||t.name===P||o.has(t.name))continue;let r=m(n,t.name),a=F(r);o.set(t.name,{name:t.name,size:a.size,url:`/api/tasks/${s}/files/${encodeURIComponent(t.name)}`,createdAt:a.mtime.toISOString()})}return Array.from(o.values())}function Se(e,s,n,i){let o=v(n);G(e,s),J(m(d(e,s),o),i);let t=x(e,s);return t.find(r=>r.name===o&&!r.linkedPath)||(t.push({name:o,addedAt:new Date().toISOString()}),C(e,s,t)),{name:o,size:i.length,url:`/api/tasks/${s}/files/${encodeURIComponent(o)}`}}function Te(e,s,n){let i=v(n),o=x(e,s),t=o.findIndex(a=>a.name===i);if(t!==-1){let[a]=o.splice(t,1);if(C(e,s,o),a&&!a.linkedPath){let l=m(d(e,s),i);c(l)&&b(l)}return!0}let r=m(d(e,s),i);return c(r)?(b(r),!0):!1}function be(e,s,n){let i=v(n),o=x(e,s).find(r=>r.name===i&&r.linkedPath);if(o?.linkedPath&&c(o.linkedPath))return o.linkedPath;let t=m(d(e,s),i);return c(t)?t:null}function xe(e,s){return X(e,s).length}export{g as a,$ as b,R as c,Z as d,W as e,re as f,U as g,T as h,oe as i,y as j,ae as k,ue as l,N as m,le as n,ce as o,me as p,fe as q,d as r,G as s,X as t,Se as u,Te as v,be as w,xe as x};
6
+ `)}function fe(e){let{autoCommit:i,autoPush:n,autoComment:s,createBranch:o}=e,t=[];if(t.push("Agent instructions (concise):"),t.push(" Discover: vibeflow tasks --status todo | vibeflow tasks --type Research | vibeflow tasks --user <email> | vibeflow tasks --tag <tag>"),t.push(" Details: vibeflow tasks --get <id> (full task info with comments and files)"),t.push(' Create: vibeflow tasks --add --title "..." --description "..."'),t.push(""),t.push(" Workflow:"),t.push(" \u26A0 IMMEDIATELY set in-progress BEFORE any implementation work:"),t.push(" 1. vibeflow tasks --edit <id> --set-status in-progress \u2190 DO THIS FIRST"),t.push(" 2. <implement the change>"),i){t.push(" 3. git add <files> (stage your changes first)");let r=["--set-status review"];i&&r.push('--commit-message "<one-line summary>"'),s&&r.push('--comment "<report>"'),t.push(` 4. vibeflow tasks --edit <id> ${r.join(" ")}`),t.push(" CLI will commit staged changes and link the commit SHA automatically.")}else{t.push(' 3. git add <files> && vibeflow tasks --commit --task <id> --message "<one-line summary>"');let r=["--set-status review"];s&&r.push('--comment "<report>"'),t.push(` 4. vibeflow tasks --edit <id> ${r.join(" ")}`)}return s&&(t.push(""),t.push(" Comment format (--comment):"),t.push(" \xB7 Plain text for concise one-liners."),t.push(" \xB7 Markdown for multi-section reports. Use **bold**, bullet lists, code fences."),t.push(" \xB7 Must cover: what changed, why, key decisions, anything future agents should know."),t.push(" \xB7 For long reports, attach a .md file and reference it in the comment.")),t.push(""),i&&t.push(" [setting] Auto-commit ON: provide --commit-message when setting status to review; CLI commits."),n&&t.push(" [setting] Auto-push ON: CLI pushes after the commit automatically."),s&&t.push(" [setting] Auto-comment ON: --comment is required when setting status to review."),o&&(t.push(" [setting] Create branch ON: after ALL tasks in this session are done, create and push a descriptive branch:"),t.push(" git checkout -b <short-name> (e.g. fix/annotation-errors, feat/eye-toggle, chore/cleanup-extension)"),t.push(" git push -u origin HEAD"),t.push(" Branch name rules: lowercase, kebab-case, 2-5 words, prefix fix/feat/chore/docs."),t.push(" Describe the WORK done (not dates). Bad: agent/2026-04-16. Good: fix/bug-errors-visibility.")),e.hasResearchTasks&&(t.push(" Research tasks: NEVER generate code \u2014 research only."),t.push(" Attach a .md report before marking Research tasks as review."),t.push(" CLI ENFORCES: cannot mark Research as review without an attached .md report."),t.push(" Use --report-file <path> to upload your .md report when marking as review:"),t.push(' vibeflow tasks --edit <id> --set-status review --report-file ./report.md --comment "..."'),t.push(" The file is uploaded to the task and deleted from the local filesystem automatically.")),e.hasBugTasks&&(t.push(" Bug tasks: Include error logs / stack traces in the commit comment."),t.push(" Describe: the symptom, the console error, what triggered it, and how it was fixed.")),t.push(" CRITICAL: NEVER edit .vibeflow/ task files directly."),t.push(" All task operations (status, comments, commits) must go through CLI commands."),t.push(" CRITICAL: Set in-progress BEFORE reading/planning. Other agents may pick the same task."),t.push(" The in-progress transition signals ownership. Skip it and another agent may duplicate your work."),t.push(" Sequence: discover tasks \u2192 pick one \u2192 set in-progress \u2192 THEN read details and implement."),t.push(' CRITICAL: NEVER set a task status to "done".'),t.push(' When your implementation is complete, set the status to "review" \u2014 not "done".'),t.push(" Only humans can mark tasks as done after reviewing the work."),t.push(" The CLI will warn you and still allow the change \u2014 but agents must not use it."),t.push(""),t.join(`
7
+ `)}var R=".linked.json";function d(e,i){return m(e,g,k,i)}function G(e,i){q(d(e,i),{recursive:!0})}function Y(e,i){let n=m(d(e,i),R);if(!c(n))return[];try{return JSON.parse(V(n,"utf-8"))}catch{return[]}}function Q(e,i){let n=T(e,i),s=n?y(n):null;return!s?.files||s.files.length===0?[]:s.files}function $(e,i,n){N(e,i,{files:n})}function b(e,i){let n=Q(e,i),s=m(d(e,i),R);if(!c(s))return n;let o=Y(e,i);if(o.length===0){try{x(s)}catch{}return n}let t=n.slice(),r=!1;for(let a of o)t.find(l=>l.linkedPath===a.path||l.name===a.name&&l.linkedPath)||(t.push({name:a.name,linkedPath:a.path,addedAt:new Date().toISOString()}),r=!0);r&&$(e,i,t);try{x(s)}catch{}return t}function X(e,i){let n=d(e,i),s=b(e,i),o=new Map;for(let t of s){if(t.linkedPath&&c(t.linkedPath)){let a=v(t.linkedPath);o.set(t.name,{name:t.name,size:a.size,url:`/api/tasks/${i}/files/${encodeURIComponent(t.name)}`,linkedPath:t.linkedPath,createdAt:a.mtime.toISOString()});continue}let r=m(n,t.name);if(c(r)){let a=v(r);o.set(t.name,{name:t.name,size:a.size,url:`/api/tasks/${i}/files/${encodeURIComponent(t.name)}`,createdAt:a.mtime.toISOString()})}}if(c(n))for(let t of W(n,{withFileTypes:!0})){if(!t.isFile()||t.name===R||o.has(t.name))continue;let r=m(n,t.name),a=v(r);o.set(t.name,{name:t.name,size:a.size,url:`/api/tasks/${i}/files/${encodeURIComponent(t.name)}`,createdAt:a.mtime.toISOString()})}return Array.from(o.values())}function ke(e,i,n,s){let o=P(n);G(e,i),J(m(d(e,i),o),s);let t=b(e,i);return t.find(r=>r.name===o&&!r.linkedPath)||(t.push({name:o,addedAt:new Date().toISOString()}),$(e,i,t)),{name:o,size:s.length,url:`/api/tasks/${i}/files/${encodeURIComponent(o)}`}}function Te(e,i,n){let s=P(n),o=b(e,i),t=o.findIndex(a=>a.name===s);if(t!==-1){let[a]=o.splice(t,1);if($(e,i,o),a&&!a.linkedPath){let l=m(d(e,i),s);c(l)&&x(l)}return!0}let r=m(d(e,i),s);return c(r)?(x(r),!0):!1}function xe(e,i,n){let s=P(n),o=b(e,i).find(r=>r.name===s&&r.linkedPath);if(o?.linkedPath&&c(o.linkedPath))return o.linkedPath;let t=m(d(e,i),s);return c(t)?t:null}function be(e,i){return X(e,i).length}export{g as a,C as b,A as c,Z as d,H as e,re as f,U as g,T as h,oe as i,y as j,ae as k,ue as l,N as m,le as n,ce as o,me as p,fe as q,d as r,G as s,X as t,ke as u,Te as v,xe as w,be as x};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as a,s as b,t as c,u as d,v as e,w as f,x as g}from"./chunk-TPDIOJDI.js";export{e as deleteFile,b as ensureFilesDir,g as getFileCount,f as getFilePath,a as getFilesDir,c as listFiles,d as saveFile};
2
+ import{r as a,s as b,t as c,u as d,v as e,w as f,x as g}from"./chunk-NRMCK2HM.js";export{e as deleteFile,b as ensureFilesDir,g as getFileCount,f as getFilePath,a as getFilesDir,c as listFiles,d as saveFile};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as a,s as b,t as c,u as d,v as e,w as f,x as g}from"./chunk-QULSJOW5.js";export{e as deleteFile,b as ensureFilesDir,g as getFileCount,f as getFilePath,a as getFilesDir,c as listFiles,d as saveFile};
2
+ import{r as a,s as b,t as c,u as d,v as e,w as f,x as g}from"./chunk-D6KVQU62.js";export{e as deleteFile,b as ensureFilesDir,g as getFileCount,f as getFilePath,a as getFilesDir,c as listFiles,d as saveFile};