prjct-cli 1.38.4 → 1.38.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.38.5] - 2026-02-14
4
+
5
+ ### Bug Fixes
6
+
7
+ - skip diff preview in non-interactive sync mode (#191)
8
+
9
+
3
10
  ## [1.38.4] - 2026-02-14
4
11
 
5
12
  ### Bug Fixes
@@ -1210,7 +1210,7 @@ ${o}`)}return n&&(n.endLine=e.length-1,t.push(n)),t}function Pd(r){return r.incl
1210
1210
  `)}var ow=y(()=>{"use strict";Vn();$i();jn();ar();Yt();ft();l(Td,"showSyncResult");l(tw,"getSessionActivity");l(Ho,"formatTokens");l(Ed,"formatDuration");l(nw,"generateSparkline");l(sw,"generateStatsMarkdown");l(rw,"generateAnalysisSummary")});var wh={};Ce(wh,{AnalysisCommands:()=>Rs});import Ad from"node:fs/promises";import iw from"node:path";import*as js from"@clack/prompts";var Rs,Ta=y(()=>{"use strict";tr();eg();Vn();$i();jn();Xl();qy();ew();ho();ue();vd();yo();N();ir();ar();Yt();ow();ft();Rs=class extends je{static{l(this,"AnalysisCommands")}async analyze(e={},t=process.cwd()){try{await this.initializeAgent(),console.log(`\u{1F50D} Analyzing repository...
1211
1211
  `),st.init(t);let n=await At.build(t,e),s={packageJson:await st.readPackageJson(),cargoToml:await st.readCargoToml(),goMod:await st.readGoMod(),requirements:await st.readRequirements(),directories:await st.listDirectories(),fileCount:await st.countFiles(),gitStats:await st.getGitStats(),gitLog:await st.getGitLog(20),hasDockerfile:await st.fileExists("Dockerfile"),hasDockerCompose:await st.fileExists("docker-compose.yml"),hasReadme:await st.fileExists("README.md"),hasTsconfig:await st.fileExists("tsconfig.json"),hasViteConfig:await st.fileExists("vite.config.ts")||await st.fileExists("vite.config.js"),hasNextConfig:await st.fileExists("next.config.js")||await st.fileExists("next.config.mjs")},o=rw(s,t),i=await $.getProjectId(t),a=n.paths.analysis||E.getFilePath(i,"analysis","repo-summary.md");await ct.get("Write")(a,o),await this.logToMemory(t,"repository_analyzed",{timestamp:B.getTimestamp(),fileCount:s.fileCount,gitCommits:s.gitStats.totalCommits});let u=await(Ke(),Ft(vt)).getActiveProvider(),d=await $e.installGlobalConfig();return d.success&&console.log(`\u{1F4DD} Updated ${E.getDisplayPath(d.path)}`),console.log(`\u2705 Analysis complete!
1212
1212
  `),console.log("\u{1F4C4} Full report: analysis/repo-summary.md"),console.log(`\u{1F4DD} Context: ~/.prjct-cli/projects/${i}/${u.contextFile}
1213
- `),console.log("Next steps:"),console.log("\u2022 /p:sync \u2192 Generate agents based on stack"),console.log("\u2022 /p:feature \u2192 Add a new feature"),{success:!0,summaryPath:a,data:s}}catch(n){return console.error("\u274C Error:",w(n)),{success:!1,error:w(n)}}}async sync(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return h.failWithHint("NO_PROJECT_ID"),{success:!1,error:"No project ID found"};let o=E.getGlobalProjectPath(s),i=Date.now();if(t.package){let m=await E.detectMonorepo(e);if(!m.isMonorepo)return{success:!1,error:"Not a monorepo. --package flag only works in monorepos."};let p=m.packages.find(f=>f.name===t.package||f.relativePath===t.package);if(!p){let f=m.packages.map(k=>k.name).join(", ");return{success:!1,error:`Package "${t.package}" not found. Available: ${f}`}}let g=await Sn.sync(e,{aiTools:t.aiTools,packagePath:p.path,packageName:p.name});return t.json?console.log(JSON.stringify({success:g.success,package:p.name,path:p.relativePath})):t.md?console.log(H(Te(`Synced package: ${p.name}`))):h.done(`Synced package: ${p.name}`),{success:g.success}}let a=iw.join(o,"context","CLAUDE.md"),c=null;try{c=await Ad.readFile(a,"utf-8")}catch{}let u=!process.stdin.isTTY||t.json||t.md;if(c&&!t.yes){u||h.spin("Analyzing changes...");let m=await Sn.sync(e,{aiTools:t.aiTools,full:t.full});if(!m.success)return t.md?(console.log(H("## \u274C Sync Failed",`> ${m.error||"Unknown error"}`)),{success:!1,error:m.error}):u?(console.log(JSON.stringify({success:!1,error:m.error||"Sync failed"})),{success:!1,error:m.error}):(h.fail(m.error||"Sync failed"),{success:!1,error:m.error});let p;try{p=await Ad.readFile(a,"utf-8")}catch{p=""}let g=Yy(c,p);if(u||h.stop(),!g.hasChanges)return t.md?(console.log(H(Te("No changes detected","Context is up to date."))),{success:!0,message:"No changes"}):u?(console.log(JSON.stringify({success:!0,action:"no_changes",message:"No changes detected (context is up to date)"})),{success:!0,message:"No changes"}):(h.done("No changes detected (context is up to date)"),{success:!0,message:"No changes"});let f=l(async()=>{c!=null&&await Ad.writeFile(a,c,"utf-8")},"restoreOriginal");if(t.md){await f();let S=[];for(let v of g.added)S.push(`Added: ${v.name} (${v.lineCount} lines)`);for(let v of g.modified)S.push(`Modified: ${v.name} (${v.lineCount} lines)`);for(let v of g.removed)S.push(`Removed: ${v.name} (${v.lineCount} lines)`);let R=H("## \u26A1 Sync Preview",S.length>0?ie("Changes",De(S)):"No section changes.",Tt({"Tokens before":g.tokensBefore,"Tokens after":g.tokensAfter,"Token delta":g.tokenDelta>0?`+${g.tokenDelta}`:String(g.tokenDelta)}),"> Run `prjct sync --yes` to apply changes.");return console.log(R),{success:!0,isPreview:!0,diff:g,message:"Preview complete (awaiting confirmation)"}}if(u){await f();let S={added:g.added.map(R=>({name:R.name,lineCount:R.lineCount})),modified:g.modified.map(R=>({name:R.name,lineCount:R.lineCount})),removed:g.removed.map(R=>({name:R.name,lineCount:R.lineCount})),preserved:g.preserved,tokensBefore:g.tokensBefore,tokensAfter:g.tokensAfter,tokenDelta:g.tokenDelta};return console.log(JSON.stringify({success:!0,action:"confirm_required",message:"Changes detected. Confirmation required to apply.",diff:S,fullDiff:t.preview?{added:g.added,modified:g.modified,removed:g.removed}:void 0,hint:"Run `prjct sync --yes` to apply changes"})),{success:!0,isPreview:!0,diff:g,message:"Preview complete (awaiting confirmation)"}}if(console.log(Qy(g)),t.preview)return await f(),{success:!0,isPreview:!0,diff:g,message:"Preview complete (no changes applied)"};let k=await js.select({message:"Apply these changes?",options:[{label:"Yes, apply changes",value:"apply"},{label:"No, cancel",value:"cancel"},{label:"Show full diff",value:"diff"}]});if(js.isCancel(k)||k==="cancel")return await f(),h.warn("Sync cancelled \u2014 no changes applied"),{success:!1,message:"Cancelled by user"};if(k==="diff"){console.log(`
1213
+ `),console.log("Next steps:"),console.log("\u2022 /p:sync \u2192 Generate agents based on stack"),console.log("\u2022 /p:feature \u2192 Add a new feature"),{success:!0,summaryPath:a,data:s}}catch(n){return console.error("\u274C Error:",w(n)),{success:!1,error:w(n)}}}async sync(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return h.failWithHint("NO_PROJECT_ID"),{success:!1,error:"No project ID found"};let o=E.getGlobalProjectPath(s),i=Date.now();if(t.package){let m=await E.detectMonorepo(e);if(!m.isMonorepo)return{success:!1,error:"Not a monorepo. --package flag only works in monorepos."};let p=m.packages.find(f=>f.name===t.package||f.relativePath===t.package);if(!p){let f=m.packages.map(k=>k.name).join(", ");return{success:!1,error:`Package "${t.package}" not found. Available: ${f}`}}let g=await Sn.sync(e,{aiTools:t.aiTools,packagePath:p.path,packageName:p.name});return t.json?console.log(JSON.stringify({success:g.success,package:p.name,path:p.relativePath})):t.md?console.log(H(Te(`Synced package: ${p.name}`))):h.done(`Synced package: ${p.name}`),{success:g.success}}let a=iw.join(o,"context","CLAUDE.md"),c=null;try{c=await Ad.readFile(a,"utf-8")}catch{}let u=!process.stdin.isTTY||t.json||t.md;if(c&&!t.yes&&!u){u||h.spin("Analyzing changes...");let m=await Sn.sync(e,{aiTools:t.aiTools,full:t.full});if(!m.success)return t.md?(console.log(H("## \u274C Sync Failed",`> ${m.error||"Unknown error"}`)),{success:!1,error:m.error}):u?(console.log(JSON.stringify({success:!1,error:m.error||"Sync failed"})),{success:!1,error:m.error}):(h.fail(m.error||"Sync failed"),{success:!1,error:m.error});let p;try{p=await Ad.readFile(a,"utf-8")}catch{p=""}let g=Yy(c,p);if(u||h.stop(),!g.hasChanges)return t.md?(console.log(H(Te("No changes detected","Context is up to date."))),{success:!0,message:"No changes"}):u?(console.log(JSON.stringify({success:!0,action:"no_changes",message:"No changes detected (context is up to date)"})),{success:!0,message:"No changes"}):(h.done("No changes detected (context is up to date)"),{success:!0,message:"No changes"});let f=l(async()=>{c!=null&&await Ad.writeFile(a,c,"utf-8")},"restoreOriginal");if(t.md){await f();let S=[];for(let v of g.added)S.push(`Added: ${v.name} (${v.lineCount} lines)`);for(let v of g.modified)S.push(`Modified: ${v.name} (${v.lineCount} lines)`);for(let v of g.removed)S.push(`Removed: ${v.name} (${v.lineCount} lines)`);let R=H("## \u26A1 Sync Preview",S.length>0?ie("Changes",De(S)):"No section changes.",Tt({"Tokens before":g.tokensBefore,"Tokens after":g.tokensAfter,"Token delta":g.tokenDelta>0?`+${g.tokenDelta}`:String(g.tokenDelta)}),"> Run `prjct sync --yes` to apply changes.");return console.log(R),{success:!0,isPreview:!0,diff:g,message:"Preview complete (awaiting confirmation)"}}if(u){await f();let S={added:g.added.map(R=>({name:R.name,lineCount:R.lineCount})),modified:g.modified.map(R=>({name:R.name,lineCount:R.lineCount})),removed:g.removed.map(R=>({name:R.name,lineCount:R.lineCount})),preserved:g.preserved,tokensBefore:g.tokensBefore,tokensAfter:g.tokensAfter,tokenDelta:g.tokenDelta};return console.log(JSON.stringify({success:!0,action:"confirm_required",message:"Changes detected. Confirmation required to apply.",diff:S,fullDiff:t.preview?{added:g.added,modified:g.modified,removed:g.removed}:void 0,hint:"Run `prjct sync --yes` to apply changes"})),{success:!0,isPreview:!0,diff:g,message:"Preview complete (awaiting confirmation)"}}if(console.log(Qy(g)),t.preview)return await f(),{success:!0,isPreview:!0,diff:g,message:"Preview complete (no changes applied)"};let k=await js.select({message:"Apply these changes?",options:[{label:"Yes, apply changes",value:"apply"},{label:"No, cancel",value:"cancel"},{label:"Show full diff",value:"diff"}]});if(js.isCancel(k)||k==="cancel")return await f(),h.warn("Sync cancelled \u2014 no changes applied"),{success:!1,message:"Cancelled by user"};if(k==="diff"){console.log(`
1214
1214
  ${Zy(g)}`);let S=await js.confirm({message:"Apply these changes?",initialValue:!0});if(js.isCancel(S)||!S)return await f(),h.warn("Sync cancelled \u2014 no changes applied"),{success:!1,message:"Cancelled by user"}}return h.done("Changes applied"),Td(m,i)}t.md||h.spin("Syncing project...");let d=await Sn.sync(e,{aiTools:t.aiTools,full:t.full});if(!d.success)return t.md?console.log(H("## \u274C Sync Failed",`> ${d.error||"Unknown error"}`)):h.fail(d.error||"Sync failed"),{success:!1,error:d.error};if(t.md||h.stop(),t.md){let m=Date.now()-i,p=d.contextFiles.length+(d.aiTools?.filter(R=>R.success).length||0),g=d.agents.length,f=null;try{let R=await Ze.diff(s);R?.hasChanges&&(f=Kl(R))}catch{}let k=ea("sync"),S=H(Te("Sync Complete"),Tt({Duration:`${(m/1e3).toFixed(1)}s`,Agents:`${g} generated`,"Files indexed":d.stats.fileCount,"Context files":p}),f,d.git.hasChanges?Yg("Uncommitted changes detected"):null,ye(k.map(R=>({label:R.desc,command:R.cmd}))));return console.log(S),{success:!0,data:d,metrics:{elapsed:m,contextFilesCount:p,agentCount:g,fileCount:d.stats.fileCount}}}return Td(d,i)}catch(n){return t.md?console.log(H("## \u274C Sync Failed",`> ${w(n)}`)):h.fail(w(n)),{success:!1,error:w(n)}}}async analysisPayload(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return{success:!1,error:"No project ID found"};let o=await Sn.sync(e,{aiTools:[]});if(!o.success)return{success:!1,error:o.error||"Failed to gather project data"};let i=o.git.recentCommits[0]?.hash??null;if(i&&yr.isCurrent(s,i))return t.md?console.log(H(Te("LLM analysis is current"),"> No re-analysis needed.")):console.log(JSON.stringify({success:!0,action:"skip",message:"Analysis is current"})),{success:!0,message:"Analysis is current"};let a=await Jy(s,e,o.git,o.stats);return t.md?console.log(H("## \u{1F50D} Analysis Payload","> Analyze this project data and produce structured findings.","","```json",JSON.stringify(a,null,2),"```","","> After analyzing, call: `prjct analysis save-llm --json '{...}'`")):console.log(JSON.stringify({success:!0,payload:a})),{success:!0,data:a}}catch(n){return{success:!1,error:w(n)}}}async saveLlmAnalysis(e,t=process.cwd(),n={}){try{let s=await this.ensureProjectInit(t);if(!s.success)return s;let o=await $.getProjectId(t);if(!o)return{success:!1,error:"No project ID found"};let i=JSON.parse(e);return!i.version||!i.architecture||!i.patterns?{success:!1,error:"Invalid LLM analysis format. Missing required fields."}:(yr.save(o,i),n.md?console.log(H(Te("LLM Analysis Saved"),Tt({Architecture:i.architecture.style,Patterns:i.patterns.length,"Anti-patterns":i.antiPatterns?.length||0,"Tech debt items":i.techDebt?.length||0,"Risk areas":i.riskAreas?.length||0,Conventions:i.conventions?.length||0}))):console.log(JSON.stringify({success:!0,message:"LLM analysis saved",stats:{patterns:i.patterns.length,antiPatterns:i.antiPatterns?.length||0,techDebt:i.techDebt?.length||0}})),{success:!0})}catch(s){return{success:!1,error:w(s)}}}async getLlmAnalysis(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return{success:!1,error:"No project ID found"};let o=yr.getActive(s);if(!o)return t.md?console.log(H("## No LLM Analysis","> Run `prjct sync` to generate.")):console.log(JSON.stringify({success:!1,message:"No LLM analysis found"})),{success:!1,message:"No LLM analysis found"};if(t.md){let i=[Te(`LLM Analysis (${o.architecture.style})`),""];o.architecture.insights.length>0&&i.push(ie("Architecture Insights",De(o.architecture.insights))),o.patterns.length>0&&i.push(ie("Patterns",De(o.patterns.map(a=>`**${a.name}** \u2014 ${a.description} (${a.category})`)))),o.antiPatterns.length>0&&i.push(ie("Anti-Patterns",De(o.antiPatterns.map(a=>`[${a.severity}] ${a.issue} \u2014 ${a.suggestion}`)))),o.techDebt.length>0&&i.push(ie("Tech Debt",De(o.techDebt.map(a=>`[${a.priority}/${a.effort}] ${a.description}`)))),o.conventions.length>0&&i.push(ie("Conventions",De(o.conventions.map(a=>`**${a.category}**: ${a.rule}`)))),console.log(H(...i))}else console.log(JSON.stringify({success:!0,analysis:o}));return{success:!0,data:o}}catch(n){return{success:!1,error:w(n)}}}async stats(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return{success:!1,error:"No project ID found"};let o=await An.getSummary(s),i=await An.getDailyStats(s,30),a=await tw(s),c=await Qe.getPatternsSummary(s);if(t.json){let p={session:a,patterns:c,totalTokensSaved:o.totalTokensSaved,estimatedCostSaved:o.estimatedCostSaved,compressionRate:o.compressionRate,syncCount:o.syncCount,avgSyncDuration:o.avgSyncDuration,topAgents:o.topAgents,last30DaysTokens:o.last30DaysTokens,trend:o.trend,dailyStats:i};return console.log(JSON.stringify(p,null,2)),{success:!0,data:p}}let u="Unknown";try{u=I.getDoc(s,"project")?.name||"Unknown"}catch{}let d=await An.read(s),m=d.firstSync?new Date(d.firstSync).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"N/A";if(console.log(""),console.log("\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E"),console.log("\u2502 \u{1F4CA} prjct-cli Stats Dashboard \u2502"),console.log(`\u2502 Project: ${u.padEnd(20).slice(0,20)} | Since: ${m.padEnd(12).slice(0,12)} \u2502`),console.log("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"),console.log(""),console.log("\u{1F3AF} TODAY'S ACTIVITY"),a.sessionDuration&&console.log(` Duration: ${a.sessionDuration}`),console.log(` Tasks completed: ${a.tasksCompleted}`),console.log(` Features shipped: ${a.featuresShipped}`),a.agentsUsed.length>0){let p=a.agentsUsed.slice(0,3).map(g=>`${g.name} (${g.count}\xD7)`).join(", ");console.log(` Agents used: ${p}`)}if(console.log(""),(c.decisions>0||c.preferences>0)&&(console.log("\u{1F9E0} PATTERNS LEARNED"),console.log(` Decisions: ${c.learnedDecisions} confirmed (${c.decisions} total)`),console.log(` Preferences: ${c.preferences} saved`),console.log(` Workflows: ${c.workflows} tracked`),console.log("")),console.log("\u{1F4B0} TOKEN SAVINGS"),console.log(` Total saved: ${Ho(o.totalTokensSaved)} tokens`),console.log(` Compression: ${(o.compressionRate*100).toFixed(0)}% average reduction`),console.log(` Estimated cost: ${Di(o.estimatedCostSaved)} saved`),console.log(""),console.log("\u26A1 PERFORMANCE"),console.log(` Syncs completed: ${o.syncCount.toLocaleString()}`),console.log(` Avg sync time: ${Ed(o.avgSyncDuration)}`),console.log(""),o.topAgents.length>0){console.log("\u{1F916} AGENT USAGE (all time)");let p=o.topAgents.reduce((g,f)=>g+f.usageCount,0);for(let g of o.topAgents){let f=p>0?(g.usageCount/p*100).toFixed(0):0;console.log(` ${g.agentName.padEnd(12)}: ${f}% (${g.usageCount} uses)`)}console.log("")}if(i.length>0){console.log("\u{1F4C8} TREND (last 30 days)");let p=nw(i);if(console.log(` ${p} ${Ho(o.last30DaysTokens)} tokens saved`),o.trend!==0){let g=o.trend>0?"\u2191":"\u2193",f=o.trend>0?"+":"";console.log(` ${g} ${f}${o.trend.toFixed(0)}% vs previous 30 days`)}console.log("")}if(console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),console.log("Export: prjct stats --export > stats.md"),console.log(""),t.export){let p=sw(o,i,u,m,a,c);return console.log(p),{success:!0,data:{markdown:p}}}return{success:!0,data:{...o,session:a,patterns:c}}}catch(n){return console.error("\u274C Error:",w(n)),{success:!1,error:w(n)}}}async status(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return t.json?console.log(JSON.stringify({success:!1,error:"No project ID found"})):h.fail("No project ID found"),{success:!1,error:"No project ID found"};let o=Ro(e),i=await o.check(s),a=await o.getSessionInfo(s),c=await Ze.getStatus(s);if(t.json)return console.log(JSON.stringify({success:!0,...i,session:a,analysis:c})),{success:!0,data:{...i,session:a,analysis:c}};if(t.md){let u=iw.basename(e),d=i.isStale?"stale":"fresh",m=i.daysSinceSync>0?`${i.daysSinceSync} day${i.daysSinceSync!==1?"s":""} ago`:"today",p=[];c.hasSealed&&p.push(`Sealed: ${c.sealedCommit} (${c.sealedAt})`),c.hasDraft&&p.push(`Draft: ${c.draftCommit} (pending seal)`),c.hasPreviousSealed&&p.push(`Previous: ${c.previousSealedCommit} (rollback available)`);let g=H(`## \u26A1 Status: ${u}`,Tt({Staleness:d,"Last sync":m,"Commits since sync":i.commitsSinceSync,Reason:i.reason}),p.length>0?ie("Analysis",De(p)):null);return console.log(g),{success:!0,data:{...i,session:a,analysis:c}}}return console.log(""),console.log(o.formatStatus(i)),console.log(""),console.log(o.formatSessionInfo(a)),(c.hasSealed||c.hasDraft)&&(console.log(""),console.log("Analysis:"),c.hasSealed&&console.log(` Sealed: ${c.sealedCommit} (${c.sealedAt})`),c.hasDraft&&console.log(` Draft: ${c.draftCommit} (pending seal)`),c.hasPreviousSealed&&console.log(` Previous: ${c.previousSealedCommit} (rollback available)`)),console.log(""),{success:!0,data:{...i,session:a,analysis:c}}}catch(n){let s=w(n);return t.json?console.log(JSON.stringify({success:!1,error:s})):h.fail(s),{success:!1,error:s}}}async diff(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return t.json&&console.log(JSON.stringify({success:!1,error:"No project ID found"})),{success:!1,error:"No project ID found"};let o=await Ze.diff(s);if(!o){let i="Cannot compute diff: need both a sealed and a draft analysis. Run `p. sync` to create a draft.";return t.json?console.log(JSON.stringify({success:!1,error:i})):t.md?console.log(H("## Analysis Diff",`> ${i}`)):h.warn(i),{success:!1,error:i}}if(t.json)return console.log(JSON.stringify({success:!0,...o})),{success:!0,data:o};if(t.md)return console.log(H(Kl(o))),{success:!0,data:o};if(!o.hasChanges)h.done("No changes between draft and sealed analysis");else{h.section("Analysis Diff"),console.log(Wg(o)),console.log("");let i=[];o.summary.added>0&&i.push(`${o.summary.added} added`),o.summary.removed>0&&i.push(`${o.summary.removed} removed`),o.summary.changed>0&&i.push(`${o.summary.changed} changed`),h.done(i.join(", "))}return console.log(""),{success:!0,data:o}}catch(n){let s=w(n);return t.json?console.log(JSON.stringify({success:!1,error:s})):t.md?console.log(H("## \u274C Diff Failed",`> ${s}`)):h.fail(s),{success:!1,error:s}}}async seal(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return t.json&&console.log(JSON.stringify({success:!1,error:"No project ID found"})),{success:!1,error:"No project ID found"};let o=await Ze.seal(s);return t.json?(console.log(JSON.stringify({success:o.success,signature:o.signature,error:o.error})),{success:o.success,error:o.error}):o.success?(h.done("Analysis sealed"),console.log(` Signature: ${o.signature?.substring(0,16)}...`),console.log(""),{success:!0,data:{signature:o.signature}}):(h.fail(o.error||"Seal failed"),{success:!1,error:o.error})}catch(n){let s=w(n);return t.json?console.log(JSON.stringify({success:!1,error:s})):h.fail(s),{success:!1,error:s}}}async rollback(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return t.json&&console.log(JSON.stringify({success:!1,error:"No project ID found"})),{success:!1,error:"No project ID found"};let o=await Ze.rollback(s);return t.json?(console.log(JSON.stringify({success:o.success,restoredSignature:o.restoredSignature,error:o.error})),{success:o.success,error:o.error}):t.md?o.success?(console.log(H(Te("Analysis Rolled Back"),Tt({"Restored signature":`${o.restoredSignature?.substring(0,16)}...`,Note:"Previous sealed version is now active. Current version moved to draft."}))),{success:!0,data:{restoredSignature:o.restoredSignature}}):(console.log(H("## \u274C Rollback Failed",`> ${o.error}`)),{success:!1,error:o.error}):o.success?(h.done("Analysis rolled back to previous sealed version"),console.log(` Restored signature: ${o.restoredSignature?.substring(0,16)}...`),console.log(" Previous sealed version demoted to draft"),console.log(""),{success:!0,data:{restoredSignature:o.restoredSignature}}):(h.fail(o.error||"Rollback failed"),{success:!1,error:o.error})}catch(n){let s=w(n);return t.json?console.log(JSON.stringify({success:!1,error:s})):t.md?console.log(H("## \u274C Rollback Failed",`> ${s}`)):h.fail(s),{success:!1,error:s}}}async verify(e=process.cwd(),t={}){if(t.semantic)return this.semanticVerify(e,t);try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return{success:!1,error:"No project ID found"};let o=await Ze.verify(s);return t.json?(console.log(JSON.stringify(o)),{success:o.valid}):(o.valid?h.done(o.message):h.fail(o.message),console.log(""),{success:o.valid,data:o})}catch(n){let s=w(n);return h.fail(s),{success:!1,error:s}}}async semanticVerify(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return t.json?console.log(JSON.stringify({success:!1,error:"No project ID found"})):h.fail("No project ID found"),{success:!1,error:"No project ID found"};let o=e;try{o=I.getDoc(s,"project")?.repoPath||e}catch{}let i=await Ze.semanticVerify(s,o);if(t.json)return console.log(JSON.stringify(i)),{success:i.passed,data:i};console.log(""),i.passed?(h.done("Semantic verification passed"),console.log(` ${i.passedCount}/${i.checks.length} checks passed (${i.totalMs}ms)`)):(h.fail("Semantic verification failed"),console.log(` ${i.failedCount}/${i.checks.length} checks failed`)),console.log(""),console.log("Check Results:");for(let a of i.checks){let c=a.passed?"\u2713":"\u2717",u=a.passed?`${a.output} (${a.durationMs}ms)`:a.error||"Failed";console.log(` ${c} ${a.name}: ${u}`)}return console.log(""),{success:i.passed,data:i}}catch(n){let s=w(n);return t.json?console.log(JSON.stringify({success:!1,error:s})):h.fail(s),{success:!1,error:s}}}}});var Wa,W,wr=y(()=>{"use strict";tt();xe();N();le();Wa=class{static{l(this,"CommandRegistry")}handlers=new Map;handlerFns=new Map;metadata=new Map;categories=new Map;noProjectCommands=new Set(["init","setup","start","migrateAll","sessions"]);register(e,t){this.handlers.set(e.name,e),this.setMeta(e.name,t)}registerFn(e,t,n){this.handlerFns.set(e,t),this.setMeta(e,n)}setMeta(e,t){let n=t?.requiresProject??!this.noProjectCommands.has(e);this.metadata.set(e,{name:e,group:t?.group??"unknown",description:t?.description??"",requiresProject:n,usage:t?.usage??{claude:null,terminal:null},implemented:t?.implemented??!0,hasTemplate:t?.hasTemplate??!1,params:t?.params,blockingRules:t?.blockingRules,features:t?.features,isOptional:t?.isOptional,deprecated:t?.deprecated,replacedBy:t?.replacedBy})}registerCategory(e,t){this.categories.set(e,t)}registerMethod(e,t,n,s){let o=t[n];if(typeof o!="function")throw new Error(`${String(n)} is not a function`);let i=l(async(a,c)=>a!=null?o.call(t,a,c.projectPath):o.call(t,c.projectPath),"wrapper");this.handlerFns.set(e,i),this.setMeta(e,s)}has(e){return this.handlers.has(e)||this.handlerFns.has(e)}list(){return[...this.handlers.keys(),...this.handlerFns.keys()]}listByGroup(e){return Array.from(this.metadata.entries()).filter(([,t])=>t.group===e).map(([t])=>t)}getGroups(){let e=new Set;for(let t of this.metadata.values())e.add(t.group);return Array.from(e)}getMeta(e){return this.metadata.get(e)}getAll(){return Array.from(this.metadata.values())}getByName(e){return this.metadata.get(e)}getByCategory(e){return this.getAll().filter(t=>t.group===e)}getAllImplemented(){return this.getAll().filter(e=>e.implemented)}getAllWithTemplates(){return this.getAll().filter(e=>e.hasTemplate)}getClaudeCommands(){return this.getAll().filter(e=>e.usage.claude!==null)}getTerminalCommands(){return this.getAll().filter(e=>e.usage.terminal!==null)}getAllCategories(){return new Map(this.categories)}getCategory(e){return this.categories.get(e)}getRequiresInit(){return this.getAll().filter(e=>e.requiresProject)}getWithBlockingRules(){return this.getAll().filter(e=>e.blockingRules!==void 0)}getOptionalCommands(){return this.getAll().filter(e=>e.isOptional)}getDeprecatedCommands(){return this.getAll().filter(e=>e.deprecated)}getStats(){let e=this.getAll(),t={};for(let n of this.categories.keys())t[n]=e.filter(s=>s.group===n).length;return{total:e.length,implemented:e.filter(n=>n.implemented).length,withTemplates:e.filter(n=>n.hasTemplate).length,claudeOnly:e.filter(n=>n.usage.claude&&!n.usage.terminal).length,terminalOnly:e.filter(n=>!n.usage.claude&&n.usage.terminal).length,both:e.filter(n=>n.usage.claude&&n.usage.terminal).length,requiresInit:e.filter(n=>n.requiresProject).length,byCategory:t}}validate(){let e=[],t=this.getAll(),n=t.map(a=>a.name),s=n.filter((a,c)=>n.indexOf(a)!==c);s.length>0&&e.push(`Duplicate command names: ${s.join(", ")}`);let o=t.filter(a=>a.hasTemplate&&!a.implemented);o.length>0&&e.push(`Commands with templates but not implemented: ${o.map(a=>a.name).join(", ")}`);let i=Array.from(this.categories.keys());if(i.length>0){let a=t.filter(c=>!i.includes(c.group));a.length>0&&e.push(`Invalid categories: ${a.map(c=>`${c.name}:${c.group}`).join(", ")}`)}return{valid:e.length===0,issues:e}}async buildContext(e){let t=await $.getProjectId(e);if(!t)throw new Error("No prjct project found. Run /p:init first.");return{projectId:t,projectPath:e,globalPath:E.getGlobalProjectPath(t),timestamp:C()}}async execute(e,t,n=process.cwd()){let s=this.metadata.get(e),o;if(s?.requiresProject===!1)o={projectId:"",projectPath:n,globalPath:"",timestamp:C()};else try{o=await this.buildContext(n)}catch(c){return{success:!1,error:w(c)}}let i=this.handlers.get(e);if(i)return i.execute(t,o);let a=this.handlerFns.get(e);return a?a(t,o):{success:!1,error:`Command not found: ${e}`}}async executeWithoutProject(e,t,n=process.cwd()){let s=this.handlers.get(e);if(s){let i={projectId:"",projectPath:n,globalPath:"",timestamp:C()};return s.execute(t,i)}let o=this.handlerFns.get(e);if(o){let i={projectId:"",projectPath:n,globalPath:"",timestamp:C()};return o(t,i)}return{success:!1,error:`Command not found: ${e}`}}clear(){this.handlers.clear(),this.handlerFns.clear(),this.metadata.clear(),this.categories.clear()}},W=new Wa});import DA from"node:path";var kr,Id=y(()=>{"use strict";jn();nn();N();ir();ft();wr();kr=class extends je{static{l(this,"AnalyticsCommands")}async dash(e="default",t=process.cwd(),n={}){try{let s=await this.ensureProjectInit(t);if(!s.success)return s;let o=await $.getProjectId(t);if(!o)return h.failWithHint("NO_PROJECT_ID"),{success:!1,error:"No project ID found"};let i=DA.basename(t),a=await L.getCurrentTask(o),c=await Pe.getActiveTasks(o),u=await xt.getRecent(o,5),d=await ot.getPending(o);if(e==="compact"){let m=a?`\u{1F3AF} ${a.description.slice(0,30)}`:"\u{1F4A4} idle",p=`\u{1F4CB} ${c.length}`,g=`\u{1F680} ${u.length}`;return h.done(`${m} | ${p} | ${g}`),{success:!0,view:"compact"}}if(e==="week"||e==="month"){let m=e==="week"?7:30,p=B.getDaysAgo(m),g=[];try{let S=p.toISOString();g=I.query(o,"SELECT data, timestamp FROM events WHERE type LIKE ? AND timestamp >= ? ORDER BY id DESC","memory.%",S).map(v=>({...JSON.parse(v.data),timestamp:v.timestamp}))}catch{g=[]}let f={tasksCompleted:g.filter(S=>S.action==="task_completed").length,featuresShipped:g.filter(S=>S.action==="feature_shipped").length,totalActions:g.length};console.log(`
1215
1215
  \u{1F4CA} ${e.toUpperCase()} PROGRESS - ${i}
1216
1216
  `),console.log("\u2550".repeat(50)),console.log(` Tasks completed: ${f.tasksCompleted}`),console.log(` Features shipped: ${f.featuresShipped}`),console.log(` Total actions: ${f.totalActions}`),console.log("\u2550".repeat(50));let k=this._generateSparkline(g,m);return console.log(`
@@ -1656,7 +1656,7 @@ ${X.yellow(`Command '${r}' not found.`)}
1656
1656
 
1657
1657
  Run 'prjct help' to see all available commands.
1658
1658
  `}function gk(){let r=[];r.push(""),r.push(X.cyan.bold("All Commands")),r.push("");let e=Object.entries(Uo).sort((t,n)=>t[1].order-n[1].order);for(let[t,n]of e){let s=Dr.filter(o=>o.group===t);if(s.length!==0){r.push(`${X.bold(n.title)} ${X.dim(`(${s.length} commands)`)}`),r.push(X.dim(n.description)),r.push("");for(let o of s){let i=`p. ${o.name}`.padEnd(18),a=o.description.length>45?`${o.description.slice(0,42)}...`:o.description;r.push(` ${i} ${a}`)}r.push("")}}return r.push(X.dim("Run 'prjct help <command>' for detailed help on a specific command.")),r.push(""),r.join(`
1659
- `)}function Mj(r){return r?r==="commands"||r==="all"?gk():mk(r):uk()}var lk,$j,hk=y(()=>{"use strict";ip();rt();lk=[{name:"start",description:"First-time setup wizard",example:"prjct start"},{name:"init",description:"Initialize project in current directory",example:"prjct init"},{name:"sync",description:"Sync project state and update context files",example:"prjct sync"},{name:"watch",description:"Auto-sync on file changes",example:"prjct watch",options:["--verbose","--debounce=<ms>","--interval=<sec>"]},{name:"hooks",description:"Manage git hooks for auto-sync",example:"prjct hooks install",subcommands:["install","uninstall","status"]},{name:"doctor",description:"Check system health and dependencies",example:"prjct doctor"},{name:"serve",description:"Start web dashboard server",example:"prjct serve [port]"},{name:"context",description:"Smart context filtering tools for AI",example:'prjct context files "add auth"',subcommands:["files","signatures","imports","recent","summary"]},{name:"linear",description:"Linear issue tracker CLI",example:"prjct linear list",subcommands:["list","get","create","update"]},{name:"uninstall",description:"Complete system removal of prjct",example:"prjct uninstall --backup",options:["--force","--backup","--dry-run","--keep-package"]}],$j=[{flag:"-q, --quiet",description:"Suppress all output (errors to stderr only)"},{flag:"-v, --version",description:"Show version and provider status"},{flag:"-h, --help",description:"Show this help message"}];l(uk,"formatMainHelp");l(dk,"formatTerminalCommandHelp");l(pk,"formatAgentCommandHelp");l(mk,"formatCommandHelp");l(gk,"formatCommandList");l(Mj,"getHelp")});var yk=Ik((x3,Oj)=>{Oj.exports={name:"prjct-cli",version:"1.38.4",description:"Context layer for AI agents. Project context for Claude Code, Gemini CLI, and more.",main:"dist/bin/prjct.mjs",bin:{prjct:"bin/prjct"},publishConfig:{access:"public",registry:"https://registry.npmjs.org"},scripts:{build:"node scripts/build.js","build:node":"node scripts/build.js",release:"node scripts/release.js","release:patch":"node scripts/release.js patch","release:minor":"node scripts/release.js minor","release:major":"node scripts/release.js major",postinstall:"node scripts/postinstall.js",prepare:"lefthook install","update-commands":`bun -e "const installer = require('./core/infrastructure/command-installer'); installer.syncCommands().then(r => console.log('Commands updated:', r)).catch(e => console.error('Error:', e.message))"`,"install-global":"./scripts/install.sh",update:"./scripts/update.sh",test:"bun test","test:watch":"bun test --watch","test:coverage":"bun test --coverage",typecheck:"tsc --noEmit -p core/tsconfig.json","typecheck:watch":"tsc --noEmit -p core/tsconfig.json --watch",validate:"bun scripts/validate-commands.js",lint:"biome lint .","lint:fix":"biome lint --write .","lint:meta":"bun core/cli/lint-meta-commentary.ts",format:"biome format --write .","format:check":"biome format .",check:"biome check .","check:fix":"biome check --write ."},keywords:["claude-code","gemini-cli","ai-agents","context-layer","developer-tools","ai-assistant","productivity","mcp","llm","coding-agents"],author:"prjct.app",license:"MIT",dependencies:{"@clack/prompts":"^1.0.0","@hono/node-server":"^1.13.7","@linear/sdk":"^29.0.0","better-sqlite3":"^12.6.2",chalk:"^4.1.2",chokidar:"^5.0.0","date-fns":"^4.1.0",glob:"^13.0.1",hono:"^4.11.3","jsonc-parser":"^3.3.1",zod:"^3.24.1"},devDependencies:{"@biomejs/biome":"^2.3.13","@types/better-sqlite3":"^7.6.13","@types/bun":"latest","@types/chokidar":"^2.1.7",esbuild:"^0.25.0",lefthook:"^2.1.0",typescript:"^5.9.3"},repository:{type:"git",url:"git+https://github.com/jlopezlira/prjct-cli.git"},bugs:{url:"https://github.com/jlopezlira/prjct-cli/issues"},homepage:"https://prjct.app",packageManager:"bun@1.2.23",engines:{node:">=18.0.0",bun:">=1.0.0"},files:["assets/","bin/prjct","dist/","scripts/postinstall.js","scripts/install.sh","LICENSE","README.md","CHANGELOG.md"],prepublishOnly:"node scripts/build.js",trustedDependencies:["chalk"]}});var Wj={};import wk from"node:os";import uc from"node:path";import Le from"chalk";async function Fj(){let[r,...e]=process.argv.slice(2);if(["-v","--version","version"].includes(r)){let t=await Promise.resolve().then(()=>jk(yk()));await Uj(t.version),process.exit(0)}["-h","--help",void 0].includes(r)&&(Gj(),process.exit(0)),h.start();try{let t=W.getByName(r);if(!t){let d=_j(r),m=d?`Did you mean 'prjct ${d}'? Run 'prjct --help' for all commands`:"Run 'prjct --help' to see available commands";h.failWithHint(cs("UNKNOWN_COMMAND",{message:`Unknown command: ${r}`,hint:m})),h.end(),process.exit(1)}if(t.deprecated){let d=t.replacedBy?`Use 'prjct ${t.replacedBy}' instead`:"Run 'prjct --help' to see available commands";h.failWithHint({message:`Command '${r}' is deprecated`,hint:d}),h.end(),process.exit(1)}t.implemented||(h.failWithHint({message:`Command '${r}' is not yet implemented`,hint:"Run 'prjct --help' to see available commands",docs:"https://github.com/jlopezlira/prjct-cli"}),h.end(),process.exit(1));let{parsedArgs:n,options:s}=Hj(t,e),o=Nj(t,n);o&&(h.failWithHint(o),h.end(),process.exit(1));let i=null,a=Date.now();try{i=await $.getProjectId(process.cwd()),i&&(await zn.expireIfStale(i),await zn.touch(i))}catch{}let c=new Mn,u;if(r==="design"){let d=n.join(" ");u=await c.design(d,s)}else if(r==="analyze")u=await c.analyze(s);else if(r==="cleanup")u=await c.cleanup(s);else if(r==="setup")u=await c.setup(s);else if(r==="update")u=await c.update(s);else{let d=n.join(" ")||null,m=s.md===!0,g={task:l(f=>c.task(f,process.cwd(),{md:m}),"task"),done:l(()=>c.done(process.cwd(),{md:m}),"done"),next:l(()=>c.next(process.cwd(),{md:m}),"next"),pause:l(f=>c.pause(f||"",process.cwd(),{md:m}),"pause"),resume:l(f=>c.resume(f,process.cwd(),{md:m}),"resume"),init:l(f=>c.init(f),"init"),bug:l(f=>c.bug(f||"",process.cwd(),{md:m}),"bug"),idea:l(f=>c.idea(f||"",process.cwd(),{md:m}),"idea"),spec:l(f=>c.spec(f),"spec"),ship:l(f=>c.ship(f,process.cwd(),{md:m}),"ship"),workflow:l(f=>c.workflowPrefs(f,process.cwd(),{md:m}),"workflow"),sessions:l(()=>c.sessions(process.cwd(),{md:m,cleanup:s.cleanup===!0}),"sessions"),dash:l(f=>c.dash(f||"default",process.cwd(),{md:m}),"dash"),stats:l(()=>c.stats(process.cwd(),{json:s.json===!0,export:s.export===!0}),"stats"),status:l(()=>c.status(process.cwd(),{json:s.json===!0,md:m}),"status"),help:l(f=>c.help(f||""),"help"),perf:l(f=>c.perf(f||"7"),"perf"),velocity:l(f=>c.velocity(f||"0"),"velocity"),recover:l(()=>c.recover(),"recover"),undo:l(()=>c.undo(),"undo"),redo:l(()=>c.redo(),"redo"),history:l(()=>c.history(),"history"),sync:l(()=>c.sync(process.cwd(),{aiTools:s.agents?String(s.agents).split(","):void 0,preview:s.preview===!0||s["dry-run"]===!0,yes:s.yes===!0,json:s.json===!0,md:m,package:s.package?String(s.package):void 0,full:s.full===!0}),"sync"),diff:l(()=>c.diff(process.cwd(),{json:s.json===!0,md:m}),"diff"),seal:l(()=>c.seal(process.cwd(),{json:s.json===!0}),"seal"),rollback:l(()=>c.rollback(process.cwd(),{json:s.json===!0,md:m}),"rollback"),verify:l(()=>c.verify(process.cwd(),{json:s.json===!0,semantic:s.semantic===!0}),"verify"),"analysis-payload":l(()=>c.analysisPayload(process.cwd(),{json:s.json===!0,md:m}),"analysis-payload"),"analysis-save-llm":l(f=>c.saveLlmAnalysis(f||"",process.cwd(),{md:m}),"analysis-save-llm"),"analysis-llm":l(()=>c.getLlmAnalysis(process.cwd(),{json:s.json===!0,md:m}),"analysis-llm"),start:l(()=>c.start(),"start"),context:l(f=>c.context(f),"context")}[r];if(g)u=await g(d);else throw new Error(`Command '${r}' has no handler`)}if(i){let d=Date.now()-a;try{await zn.trackCommand(i,r,d)}catch{}try{await ls.recordTiming(i,"command_duration",d,{command:r});let m=globalThis.__perfStartNs;if(m){let p=Number(process.hrtime.bigint()-m)/1e6;await ls.recordTiming(i,"startup_time",p)}await ls.recordMemory(i,{command:r})}catch{}}u?.message&&console.log(u.message),h.end(),process.exit(u?.success?0:1)}catch(t){console.error("Error:",w(t)),process.env.DEBUG&&console.error(Jo(t)),h.end(),process.exit(1)}}function Nj(r,e){if(!r.params)return null;let t=r.params.match(/<[^>]+>/g);if(!t||t.length===0)return null;if(e.length<t.length){let n=t.map(o=>o.slice(1,-1)).join(", "),s=r.usage.terminal||`prjct ${r.name} ${r.params}`;return cs("MISSING_PARAM",{message:`Missing required parameter: ${n}`,hint:`Usage: ${s}`})}return null}function _j(r){let e=W.getAll().map(s=>s.name),t=null,n=1/0;for(let s of e){let o=Lj(r.toLowerCase(),s.toLowerCase());o<n&&(n=o,t=s)}return n<=2?t:null}function Lj(r,e){let t=r.length,n=e.length,s=Array.from({length:t+1},()=>Array(n+1).fill(0));for(let o=0;o<=t;o++)s[o][0]=o;for(let o=0;o<=n;o++)s[0][o]=o;for(let o=1;o<=t;o++)for(let i=1;i<=n;i++)s[o][i]=r[o-1]===e[i-1]?s[o-1][i-1]:1+Math.min(s[o-1][i],s[o][i-1],s[o-1][i-1]);return s[t][n]}function Hj(r,e){let t=[],n={};for(let s=0;s<e.length;s++){let o=e[s];if(o.startsWith("--")){let i=o.slice(2);s+1<e.length&&!e[s+1].startsWith("--")?n[i]=e[++s]:n[i]=!0}else t.push(o)}return{parsedArgs:t,options:n}}async function Uj(r){let e=await xn(),t=uc.join(wk.homedir(),".claude","commands","p.md"),n=uc.join(wk.homedir(),".gemini","commands","p.toml"),[s,o,i,a]=await Promise.all([P(t),P(n),P(uc.join(process.cwd(),".cursor","commands","sync.md")),P(uc.join(process.cwd(),".cursor"))]),c=await _s();if(console.log(`
1659
+ `)}function Mj(r){return r?r==="commands"||r==="all"?gk():mk(r):uk()}var lk,$j,hk=y(()=>{"use strict";ip();rt();lk=[{name:"start",description:"First-time setup wizard",example:"prjct start"},{name:"init",description:"Initialize project in current directory",example:"prjct init"},{name:"sync",description:"Sync project state and update context files",example:"prjct sync"},{name:"watch",description:"Auto-sync on file changes",example:"prjct watch",options:["--verbose","--debounce=<ms>","--interval=<sec>"]},{name:"hooks",description:"Manage git hooks for auto-sync",example:"prjct hooks install",subcommands:["install","uninstall","status"]},{name:"doctor",description:"Check system health and dependencies",example:"prjct doctor"},{name:"serve",description:"Start web dashboard server",example:"prjct serve [port]"},{name:"context",description:"Smart context filtering tools for AI",example:'prjct context files "add auth"',subcommands:["files","signatures","imports","recent","summary"]},{name:"linear",description:"Linear issue tracker CLI",example:"prjct linear list",subcommands:["list","get","create","update"]},{name:"uninstall",description:"Complete system removal of prjct",example:"prjct uninstall --backup",options:["--force","--backup","--dry-run","--keep-package"]}],$j=[{flag:"-q, --quiet",description:"Suppress all output (errors to stderr only)"},{flag:"-v, --version",description:"Show version and provider status"},{flag:"-h, --help",description:"Show this help message"}];l(uk,"formatMainHelp");l(dk,"formatTerminalCommandHelp");l(pk,"formatAgentCommandHelp");l(mk,"formatCommandHelp");l(gk,"formatCommandList");l(Mj,"getHelp")});var yk=Ik((x3,Oj)=>{Oj.exports={name:"prjct-cli",version:"1.38.5",description:"Context layer for AI agents. Project context for Claude Code, Gemini CLI, and more.",main:"dist/bin/prjct.mjs",bin:{prjct:"bin/prjct"},publishConfig:{access:"public",registry:"https://registry.npmjs.org"},scripts:{build:"node scripts/build.js","build:node":"node scripts/build.js",release:"node scripts/release.js","release:patch":"node scripts/release.js patch","release:minor":"node scripts/release.js minor","release:major":"node scripts/release.js major",postinstall:"node scripts/postinstall.js",prepare:"lefthook install","update-commands":`bun -e "const installer = require('./core/infrastructure/command-installer'); installer.syncCommands().then(r => console.log('Commands updated:', r)).catch(e => console.error('Error:', e.message))"`,"install-global":"./scripts/install.sh",update:"./scripts/update.sh",test:"bun test","test:watch":"bun test --watch","test:coverage":"bun test --coverage",typecheck:"tsc --noEmit -p core/tsconfig.json","typecheck:watch":"tsc --noEmit -p core/tsconfig.json --watch",validate:"bun scripts/validate-commands.js",lint:"biome lint .","lint:fix":"biome lint --write .","lint:meta":"bun core/cli/lint-meta-commentary.ts",format:"biome format --write .","format:check":"biome format .",check:"biome check .","check:fix":"biome check --write ."},keywords:["claude-code","gemini-cli","ai-agents","context-layer","developer-tools","ai-assistant","productivity","mcp","llm","coding-agents"],author:"prjct.app",license:"MIT",dependencies:{"@clack/prompts":"^1.0.0","@hono/node-server":"^1.13.7","@linear/sdk":"^29.0.0","better-sqlite3":"^12.6.2",chalk:"^4.1.2",chokidar:"^5.0.0","date-fns":"^4.1.0",glob:"^13.0.1",hono:"^4.11.3","jsonc-parser":"^3.3.1",zod:"^3.24.1"},devDependencies:{"@biomejs/biome":"^2.3.13","@types/better-sqlite3":"^7.6.13","@types/bun":"latest","@types/chokidar":"^2.1.7",esbuild:"^0.25.0",lefthook:"^2.1.0",typescript:"^5.9.3"},repository:{type:"git",url:"git+https://github.com/jlopezlira/prjct-cli.git"},bugs:{url:"https://github.com/jlopezlira/prjct-cli/issues"},homepage:"https://prjct.app",packageManager:"bun@1.2.23",engines:{node:">=18.0.0",bun:">=1.0.0"},files:["assets/","bin/prjct","dist/","scripts/postinstall.js","scripts/install.sh","LICENSE","README.md","CHANGELOG.md"],prepublishOnly:"node scripts/build.js",trustedDependencies:["chalk"]}});var Wj={};import wk from"node:os";import uc from"node:path";import Le from"chalk";async function Fj(){let[r,...e]=process.argv.slice(2);if(["-v","--version","version"].includes(r)){let t=await Promise.resolve().then(()=>jk(yk()));await Uj(t.version),process.exit(0)}["-h","--help",void 0].includes(r)&&(Gj(),process.exit(0)),h.start();try{let t=W.getByName(r);if(!t){let d=_j(r),m=d?`Did you mean 'prjct ${d}'? Run 'prjct --help' for all commands`:"Run 'prjct --help' to see available commands";h.failWithHint(cs("UNKNOWN_COMMAND",{message:`Unknown command: ${r}`,hint:m})),h.end(),process.exit(1)}if(t.deprecated){let d=t.replacedBy?`Use 'prjct ${t.replacedBy}' instead`:"Run 'prjct --help' to see available commands";h.failWithHint({message:`Command '${r}' is deprecated`,hint:d}),h.end(),process.exit(1)}t.implemented||(h.failWithHint({message:`Command '${r}' is not yet implemented`,hint:"Run 'prjct --help' to see available commands",docs:"https://github.com/jlopezlira/prjct-cli"}),h.end(),process.exit(1));let{parsedArgs:n,options:s}=Hj(t,e),o=Nj(t,n);o&&(h.failWithHint(o),h.end(),process.exit(1));let i=null,a=Date.now();try{i=await $.getProjectId(process.cwd()),i&&(await zn.expireIfStale(i),await zn.touch(i))}catch{}let c=new Mn,u;if(r==="design"){let d=n.join(" ");u=await c.design(d,s)}else if(r==="analyze")u=await c.analyze(s);else if(r==="cleanup")u=await c.cleanup(s);else if(r==="setup")u=await c.setup(s);else if(r==="update")u=await c.update(s);else{let d=n.join(" ")||null,m=s.md===!0,g={task:l(f=>c.task(f,process.cwd(),{md:m}),"task"),done:l(()=>c.done(process.cwd(),{md:m}),"done"),next:l(()=>c.next(process.cwd(),{md:m}),"next"),pause:l(f=>c.pause(f||"",process.cwd(),{md:m}),"pause"),resume:l(f=>c.resume(f,process.cwd(),{md:m}),"resume"),init:l(f=>c.init(f),"init"),bug:l(f=>c.bug(f||"",process.cwd(),{md:m}),"bug"),idea:l(f=>c.idea(f||"",process.cwd(),{md:m}),"idea"),spec:l(f=>c.spec(f),"spec"),ship:l(f=>c.ship(f,process.cwd(),{md:m}),"ship"),workflow:l(f=>c.workflowPrefs(f,process.cwd(),{md:m}),"workflow"),sessions:l(()=>c.sessions(process.cwd(),{md:m,cleanup:s.cleanup===!0}),"sessions"),dash:l(f=>c.dash(f||"default",process.cwd(),{md:m}),"dash"),stats:l(()=>c.stats(process.cwd(),{json:s.json===!0,export:s.export===!0}),"stats"),status:l(()=>c.status(process.cwd(),{json:s.json===!0,md:m}),"status"),help:l(f=>c.help(f||""),"help"),perf:l(f=>c.perf(f||"7"),"perf"),velocity:l(f=>c.velocity(f||"0"),"velocity"),recover:l(()=>c.recover(),"recover"),undo:l(()=>c.undo(),"undo"),redo:l(()=>c.redo(),"redo"),history:l(()=>c.history(),"history"),sync:l(()=>c.sync(process.cwd(),{aiTools:s.agents?String(s.agents).split(","):void 0,preview:s.preview===!0||s["dry-run"]===!0,yes:s.yes===!0,json:s.json===!0,md:m,package:s.package?String(s.package):void 0,full:s.full===!0}),"sync"),diff:l(()=>c.diff(process.cwd(),{json:s.json===!0,md:m}),"diff"),seal:l(()=>c.seal(process.cwd(),{json:s.json===!0}),"seal"),rollback:l(()=>c.rollback(process.cwd(),{json:s.json===!0,md:m}),"rollback"),verify:l(()=>c.verify(process.cwd(),{json:s.json===!0,semantic:s.semantic===!0}),"verify"),"analysis-payload":l(()=>c.analysisPayload(process.cwd(),{json:s.json===!0,md:m}),"analysis-payload"),"analysis-save-llm":l(f=>c.saveLlmAnalysis(f||"",process.cwd(),{md:m}),"analysis-save-llm"),"analysis-llm":l(()=>c.getLlmAnalysis(process.cwd(),{json:s.json===!0,md:m}),"analysis-llm"),start:l(()=>c.start(),"start"),context:l(f=>c.context(f),"context")}[r];if(g)u=await g(d);else throw new Error(`Command '${r}' has no handler`)}if(i){let d=Date.now()-a;try{await zn.trackCommand(i,r,d)}catch{}try{await ls.recordTiming(i,"command_duration",d,{command:r});let m=globalThis.__perfStartNs;if(m){let p=Number(process.hrtime.bigint()-m)/1e6;await ls.recordTiming(i,"startup_time",p)}await ls.recordMemory(i,{command:r})}catch{}}u?.message&&console.log(u.message),h.end(),process.exit(u?.success?0:1)}catch(t){console.error("Error:",w(t)),process.env.DEBUG&&console.error(Jo(t)),h.end(),process.exit(1)}}function Nj(r,e){if(!r.params)return null;let t=r.params.match(/<[^>]+>/g);if(!t||t.length===0)return null;if(e.length<t.length){let n=t.map(o=>o.slice(1,-1)).join(", "),s=r.usage.terminal||`prjct ${r.name} ${r.params}`;return cs("MISSING_PARAM",{message:`Missing required parameter: ${n}`,hint:`Usage: ${s}`})}return null}function _j(r){let e=W.getAll().map(s=>s.name),t=null,n=1/0;for(let s of e){let o=Lj(r.toLowerCase(),s.toLowerCase());o<n&&(n=o,t=s)}return n<=2?t:null}function Lj(r,e){let t=r.length,n=e.length,s=Array.from({length:t+1},()=>Array(n+1).fill(0));for(let o=0;o<=t;o++)s[o][0]=o;for(let o=0;o<=n;o++)s[0][o]=o;for(let o=1;o<=t;o++)for(let i=1;i<=n;i++)s[o][i]=r[o-1]===e[i-1]?s[o-1][i-1]:1+Math.min(s[o-1][i],s[o][i-1],s[o-1][i-1]);return s[t][n]}function Hj(r,e){let t=[],n={};for(let s=0;s<e.length;s++){let o=e[s];if(o.startsWith("--")){let i=o.slice(2);s+1<e.length&&!e[s+1].startsWith("--")?n[i]=e[++s]:n[i]=!0}else t.push(o)}return{parsedArgs:t,options:n}}async function Uj(r){let e=await xn(),t=uc.join(wk.homedir(),".claude","commands","p.md"),n=uc.join(wk.homedir(),".gemini","commands","p.toml"),[s,o,i,a]=await Promise.all([P(t),P(n),P(uc.join(process.cwd(),".cursor","commands","sync.md")),P(uc.join(process.cwd(),".cursor"))]),c=await _s();if(console.log(`
1660
1660
  ${Le.cyan("p/")} prjct v${r}
1661
1661
  ${Le.dim("Context layer for AI coding agents")}
1662
1662
 
@@ -1203,7 +1203,7 @@ ${o}`)}return n&&(n.endLine=e.length-1,t.push(n)),t}function du(r){return r.incl
1203
1203
  `)}var hh=w(()=>{"use strict";Sn();bo();ln();As();zn();nt();l(pu,"showSyncResult");l(ph,"getSessionActivity");l(Jr,"formatTokens");l(mu,"formatDuration");l(mh,"generateSparkline");l(gh,"generateStatsMarkdown");l(fh,"generateAnalysisSummary")});var bg={};jn(bg,{AnalysisCommands:()=>os});import gu from"node:fs/promises";import yh from"node:path";import*as rs from"@clack/prompts";var os,Pi=w(()=>{"use strict";ms();Vd();Sn();bo();ln();xc();oh();dh();vr();ne();lu();Yo();F();Es();As();zn();hh();nt();os=class extends be{static{l(this,"AnalysisCommands")}async analyze(e={},t=process.cwd()){try{await this.initializeAgent(),console.log(`\u{1F50D} Analyzing repository...
1204
1204
  `),Ve.init(t);let n=await mt.build(t,e),s={packageJson:await Ve.readPackageJson(),cargoToml:await Ve.readCargoToml(),goMod:await Ve.readGoMod(),requirements:await Ve.readRequirements(),directories:await Ve.listDirectories(),fileCount:await Ve.countFiles(),gitStats:await Ve.getGitStats(),gitLog:await Ve.getGitLog(20),hasDockerfile:await Ve.fileExists("Dockerfile"),hasDockerCompose:await Ve.fileExists("docker-compose.yml"),hasReadme:await Ve.fileExists("README.md"),hasTsconfig:await Ve.fileExists("tsconfig.json"),hasViteConfig:await Ve.fileExists("vite.config.ts")||await Ve.fileExists("vite.config.js"),hasNextConfig:await Ve.fileExists("next.config.js")||await Ve.fileExists("next.config.mjs")},o=fh(s,t),i=await $.getProjectId(t),a=n.paths.analysis||x.getFilePath(i,"analysis","repo-summary.md");await Xe.get("Write")(a,o),await this.logToMemory(t,"repository_analyzed",{timestamp:z.getTimestamp(),fileCount:s.fileCount,gitCommits:s.gitStats.totalCommits});let u=await(Ze(),Pt(ht)).getActiveProvider(),d=await xe.installGlobalConfig();return d.success&&console.log(`\u{1F4DD} Updated ${x.getDisplayPath(d.path)}`),console.log(`\u2705 Analysis complete!
1205
1205
  `),console.log("\u{1F4C4} Full report: analysis/repo-summary.md"),console.log(`\u{1F4DD} Context: ~/.prjct-cli/projects/${i}/${u.contextFile}
1206
- `),console.log("Next steps:"),console.log("\u2022 /p:sync \u2192 Generate agents based on stack"),console.log("\u2022 /p:feature \u2192 Add a new feature"),{success:!0,summaryPath:a,data:s}}catch(n){return console.error("\u274C Error:",y(n)),{success:!1,error:y(n)}}}async sync(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return h.failWithHint("NO_PROJECT_ID"),{success:!1,error:"No project ID found"};let o=x.getGlobalProjectPath(s),i=Date.now();if(t.package){let m=await x.detectMonorepo(e);if(!m.isMonorepo)return{success:!1,error:"Not a monorepo. --package flag only works in monorepos."};let p=m.packages.find(f=>f.name===t.package||f.relativePath===t.package);if(!p){let f=m.packages.map(k=>k.name).join(", ");return{success:!1,error:`Package "${t.package}" not found. Available: ${f}`}}let g=await En.sync(e,{aiTools:t.aiTools,packagePath:p.path,packageName:p.name});return t.json?console.log(JSON.stringify({success:g.success,package:p.name,path:p.relativePath})):t.md?console.log(N(he(`Synced package: ${p.name}`))):h.done(`Synced package: ${p.name}`),{success:g.success}}let a=yh.join(o,"context","CLAUDE.md"),c=null;try{c=await gu.readFile(a,"utf-8")}catch{}let u=!process.stdin.isTTY||t.json||t.md;if(c&&!t.yes){u||h.spin("Analyzing changes...");let m=await En.sync(e,{aiTools:t.aiTools,full:t.full});if(!m.success)return t.md?(console.log(N("## \u274C Sync Failed",`> ${m.error||"Unknown error"}`)),{success:!1,error:m.error}):u?(console.log(JSON.stringify({success:!1,error:m.error||"Sync failed"})),{success:!1,error:m.error}):(h.fail(m.error||"Sync failed"),{success:!1,error:m.error});let p;try{p=await gu.readFile(a,"utf-8")}catch{p=""}let g=ch(c,p);if(u||h.stop(),!g.hasChanges)return t.md?(console.log(N(he("No changes detected","Context is up to date."))),{success:!0,message:"No changes"}):u?(console.log(JSON.stringify({success:!0,action:"no_changes",message:"No changes detected (context is up to date)"})),{success:!0,message:"No changes"}):(h.done("No changes detected (context is up to date)"),{success:!0,message:"No changes"});let f=l(async()=>{c!=null&&await gu.writeFile(a,c,"utf-8")},"restoreOriginal");if(t.md){await f();let S=[];for(let D of g.added)S.push(`Added: ${D.name} (${D.lineCount} lines)`);for(let D of g.modified)S.push(`Modified: ${D.name} (${D.lineCount} lines)`);for(let D of g.removed)S.push(`Removed: ${D.name} (${D.lineCount} lines)`);let I=N("## \u26A1 Sync Preview",S.length>0?Z("Changes",Pe(S)):"No section changes.",dt({"Tokens before":g.tokensBefore,"Tokens after":g.tokensAfter,"Token delta":g.tokenDelta>0?`+${g.tokenDelta}`:String(g.tokenDelta)}),"> Run `prjct sync --yes` to apply changes.");return console.log(I),{success:!0,isPreview:!0,diff:g,message:"Preview complete (awaiting confirmation)"}}if(u){await f();let S={added:g.added.map(I=>({name:I.name,lineCount:I.lineCount})),modified:g.modified.map(I=>({name:I.name,lineCount:I.lineCount})),removed:g.removed.map(I=>({name:I.name,lineCount:I.lineCount})),preserved:g.preserved,tokensBefore:g.tokensBefore,tokensAfter:g.tokensAfter,tokenDelta:g.tokenDelta};return console.log(JSON.stringify({success:!0,action:"confirm_required",message:"Changes detected. Confirmation required to apply.",diff:S,fullDiff:t.preview?{added:g.added,modified:g.modified,removed:g.removed}:void 0,hint:"Run `prjct sync --yes` to apply changes"})),{success:!0,isPreview:!0,diff:g,message:"Preview complete (awaiting confirmation)"}}if(console.log(lh(g)),t.preview)return await f(),{success:!0,isPreview:!0,diff:g,message:"Preview complete (no changes applied)"};let k=await rs.select({message:"Apply these changes?",options:[{label:"Yes, apply changes",value:"apply"},{label:"No, cancel",value:"cancel"},{label:"Show full diff",value:"diff"}]});if(rs.isCancel(k)||k==="cancel")return await f(),h.warn("Sync cancelled \u2014 no changes applied"),{success:!1,message:"Cancelled by user"};if(k==="diff"){console.log(`
1206
+ `),console.log("Next steps:"),console.log("\u2022 /p:sync \u2192 Generate agents based on stack"),console.log("\u2022 /p:feature \u2192 Add a new feature"),{success:!0,summaryPath:a,data:s}}catch(n){return console.error("\u274C Error:",y(n)),{success:!1,error:y(n)}}}async sync(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return h.failWithHint("NO_PROJECT_ID"),{success:!1,error:"No project ID found"};let o=x.getGlobalProjectPath(s),i=Date.now();if(t.package){let m=await x.detectMonorepo(e);if(!m.isMonorepo)return{success:!1,error:"Not a monorepo. --package flag only works in monorepos."};let p=m.packages.find(f=>f.name===t.package||f.relativePath===t.package);if(!p){let f=m.packages.map(k=>k.name).join(", ");return{success:!1,error:`Package "${t.package}" not found. Available: ${f}`}}let g=await En.sync(e,{aiTools:t.aiTools,packagePath:p.path,packageName:p.name});return t.json?console.log(JSON.stringify({success:g.success,package:p.name,path:p.relativePath})):t.md?console.log(N(he(`Synced package: ${p.name}`))):h.done(`Synced package: ${p.name}`),{success:g.success}}let a=yh.join(o,"context","CLAUDE.md"),c=null;try{c=await gu.readFile(a,"utf-8")}catch{}let u=!process.stdin.isTTY||t.json||t.md;if(c&&!t.yes&&!u){u||h.spin("Analyzing changes...");let m=await En.sync(e,{aiTools:t.aiTools,full:t.full});if(!m.success)return t.md?(console.log(N("## \u274C Sync Failed",`> ${m.error||"Unknown error"}`)),{success:!1,error:m.error}):u?(console.log(JSON.stringify({success:!1,error:m.error||"Sync failed"})),{success:!1,error:m.error}):(h.fail(m.error||"Sync failed"),{success:!1,error:m.error});let p;try{p=await gu.readFile(a,"utf-8")}catch{p=""}let g=ch(c,p);if(u||h.stop(),!g.hasChanges)return t.md?(console.log(N(he("No changes detected","Context is up to date."))),{success:!0,message:"No changes"}):u?(console.log(JSON.stringify({success:!0,action:"no_changes",message:"No changes detected (context is up to date)"})),{success:!0,message:"No changes"}):(h.done("No changes detected (context is up to date)"),{success:!0,message:"No changes"});let f=l(async()=>{c!=null&&await gu.writeFile(a,c,"utf-8")},"restoreOriginal");if(t.md){await f();let S=[];for(let D of g.added)S.push(`Added: ${D.name} (${D.lineCount} lines)`);for(let D of g.modified)S.push(`Modified: ${D.name} (${D.lineCount} lines)`);for(let D of g.removed)S.push(`Removed: ${D.name} (${D.lineCount} lines)`);let I=N("## \u26A1 Sync Preview",S.length>0?Z("Changes",Pe(S)):"No section changes.",dt({"Tokens before":g.tokensBefore,"Tokens after":g.tokensAfter,"Token delta":g.tokenDelta>0?`+${g.tokenDelta}`:String(g.tokenDelta)}),"> Run `prjct sync --yes` to apply changes.");return console.log(I),{success:!0,isPreview:!0,diff:g,message:"Preview complete (awaiting confirmation)"}}if(u){await f();let S={added:g.added.map(I=>({name:I.name,lineCount:I.lineCount})),modified:g.modified.map(I=>({name:I.name,lineCount:I.lineCount})),removed:g.removed.map(I=>({name:I.name,lineCount:I.lineCount})),preserved:g.preserved,tokensBefore:g.tokensBefore,tokensAfter:g.tokensAfter,tokenDelta:g.tokenDelta};return console.log(JSON.stringify({success:!0,action:"confirm_required",message:"Changes detected. Confirmation required to apply.",diff:S,fullDiff:t.preview?{added:g.added,modified:g.modified,removed:g.removed}:void 0,hint:"Run `prjct sync --yes` to apply changes"})),{success:!0,isPreview:!0,diff:g,message:"Preview complete (awaiting confirmation)"}}if(console.log(lh(g)),t.preview)return await f(),{success:!0,isPreview:!0,diff:g,message:"Preview complete (no changes applied)"};let k=await rs.select({message:"Apply these changes?",options:[{label:"Yes, apply changes",value:"apply"},{label:"No, cancel",value:"cancel"},{label:"Show full diff",value:"diff"}]});if(rs.isCancel(k)||k==="cancel")return await f(),h.warn("Sync cancelled \u2014 no changes applied"),{success:!1,message:"Cancelled by user"};if(k==="diff"){console.log(`
1207
1207
  ${uh(g)}`);let S=await rs.confirm({message:"Apply these changes?",initialValue:!0});if(rs.isCancel(S)||!S)return await f(),h.warn("Sync cancelled \u2014 no changes applied"),{success:!1,message:"Cancelled by user"}}return h.done("Changes applied"),pu(m,i)}t.md||h.spin("Syncing project...");let d=await En.sync(e,{aiTools:t.aiTools,full:t.full});if(!d.success)return t.md?console.log(N("## \u274C Sync Failed",`> ${d.error||"Unknown error"}`)):h.fail(d.error||"Sync failed"),{success:!1,error:d.error};if(t.md||h.stop(),t.md){let m=Date.now()-i,p=d.contextFiles.length+(d.aiTools?.filter(I=>I.success).length||0),g=d.agents.length,f=null;try{let I=await Ge.diff(s);I?.hasChanges&&(f=vc(I))}catch{}let k=ei("sync"),S=N(he("Sync Complete"),dt({Duration:`${(m/1e3).toFixed(1)}s`,Agents:`${g} generated`,"Files indexed":d.stats.fileCount,"Context files":p}),f,d.git.hasChanges?Xp("Uncommitted changes detected"):null,ue(k.map(I=>({label:I.desc,command:I.cmd}))));return console.log(S),{success:!0,data:d,metrics:{elapsed:m,contextFilesCount:p,agentCount:g,fileCount:d.stats.fileCount}}}return pu(d,i)}catch(n){return t.md?console.log(N("## \u274C Sync Failed",`> ${y(n)}`)):h.fail(y(n)),{success:!1,error:y(n)}}}async analysisPayload(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return{success:!1,error:"No project ID found"};let o=await En.sync(e,{aiTools:[]});if(!o.success)return{success:!1,error:o.error||"Failed to gather project data"};let i=o.git.recentCommits[0]?.hash??null;if(i&&_s.isCurrent(s,i))return t.md?console.log(N(he("LLM analysis is current"),"> No re-analysis needed.")):console.log(JSON.stringify({success:!0,action:"skip",message:"Analysis is current"})),{success:!0,message:"Analysis is current"};let a=await rh(s,e,o.git,o.stats);return t.md?console.log(N("## \u{1F50D} Analysis Payload","> Analyze this project data and produce structured findings.","","```json",JSON.stringify(a,null,2),"```","","> After analyzing, call: `prjct analysis save-llm --json '{...}'`")):console.log(JSON.stringify({success:!0,payload:a})),{success:!0,data:a}}catch(n){return{success:!1,error:y(n)}}}async saveLlmAnalysis(e,t=process.cwd(),n={}){try{let s=await this.ensureProjectInit(t);if(!s.success)return s;let o=await $.getProjectId(t);if(!o)return{success:!1,error:"No project ID found"};let i=JSON.parse(e);return!i.version||!i.architecture||!i.patterns?{success:!1,error:"Invalid LLM analysis format. Missing required fields."}:(_s.save(o,i),n.md?console.log(N(he("LLM Analysis Saved"),dt({Architecture:i.architecture.style,Patterns:i.patterns.length,"Anti-patterns":i.antiPatterns?.length||0,"Tech debt items":i.techDebt?.length||0,"Risk areas":i.riskAreas?.length||0,Conventions:i.conventions?.length||0}))):console.log(JSON.stringify({success:!0,message:"LLM analysis saved",stats:{patterns:i.patterns.length,antiPatterns:i.antiPatterns?.length||0,techDebt:i.techDebt?.length||0}})),{success:!0})}catch(s){return{success:!1,error:y(s)}}}async getLlmAnalysis(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return{success:!1,error:"No project ID found"};let o=_s.getActive(s);if(!o)return t.md?console.log(N("## No LLM Analysis","> Run `prjct sync` to generate.")):console.log(JSON.stringify({success:!1,message:"No LLM analysis found"})),{success:!1,message:"No LLM analysis found"};if(t.md){let i=[he(`LLM Analysis (${o.architecture.style})`),""];o.architecture.insights.length>0&&i.push(Z("Architecture Insights",Pe(o.architecture.insights))),o.patterns.length>0&&i.push(Z("Patterns",Pe(o.patterns.map(a=>`**${a.name}** \u2014 ${a.description} (${a.category})`)))),o.antiPatterns.length>0&&i.push(Z("Anti-Patterns",Pe(o.antiPatterns.map(a=>`[${a.severity}] ${a.issue} \u2014 ${a.suggestion}`)))),o.techDebt.length>0&&i.push(Z("Tech Debt",Pe(o.techDebt.map(a=>`[${a.priority}/${a.effort}] ${a.description}`)))),o.conventions.length>0&&i.push(Z("Conventions",Pe(o.conventions.map(a=>`**${a.category}**: ${a.rule}`)))),console.log(N(...i))}else console.log(JSON.stringify({success:!0,analysis:o}));return{success:!0,data:o}}catch(n){return{success:!1,error:y(n)}}}async stats(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return{success:!1,error:"No project ID found"};let o=await Wn.getSummary(s),i=await Wn.getDailyStats(s,30),a=await ph(s),c=await Ue.getPatternsSummary(s);if(t.json){let p={session:a,patterns:c,totalTokensSaved:o.totalTokensSaved,estimatedCostSaved:o.estimatedCostSaved,compressionRate:o.compressionRate,syncCount:o.syncCount,avgSyncDuration:o.avgSyncDuration,topAgents:o.topAgents,last30DaysTokens:o.last30DaysTokens,trend:o.trend,dailyStats:i};return console.log(JSON.stringify(p,null,2)),{success:!0,data:p}}let u="Unknown";try{u=A.getDoc(s,"project")?.name||"Unknown"}catch{}let d=await Wn.read(s),m=d.firstSync?new Date(d.firstSync).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"N/A";if(console.log(""),console.log("\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E"),console.log("\u2502 \u{1F4CA} prjct-cli Stats Dashboard \u2502"),console.log(`\u2502 Project: ${u.padEnd(20).slice(0,20)} | Since: ${m.padEnd(12).slice(0,12)} \u2502`),console.log("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"),console.log(""),console.log("\u{1F3AF} TODAY'S ACTIVITY"),a.sessionDuration&&console.log(` Duration: ${a.sessionDuration}`),console.log(` Tasks completed: ${a.tasksCompleted}`),console.log(` Features shipped: ${a.featuresShipped}`),a.agentsUsed.length>0){let p=a.agentsUsed.slice(0,3).map(g=>`${g.name} (${g.count}\xD7)`).join(", ");console.log(` Agents used: ${p}`)}if(console.log(""),(c.decisions>0||c.preferences>0)&&(console.log("\u{1F9E0} PATTERNS LEARNED"),console.log(` Decisions: ${c.learnedDecisions} confirmed (${c.decisions} total)`),console.log(` Preferences: ${c.preferences} saved`),console.log(` Workflows: ${c.workflows} tracked`),console.log("")),console.log("\u{1F4B0} TOKEN SAVINGS"),console.log(` Total saved: ${Jr(o.totalTokensSaved)} tokens`),console.log(` Compression: ${(o.compressionRate*100).toFixed(0)}% average reduction`),console.log(` Estimated cost: ${So(o.estimatedCostSaved)} saved`),console.log(""),console.log("\u26A1 PERFORMANCE"),console.log(` Syncs completed: ${o.syncCount.toLocaleString()}`),console.log(` Avg sync time: ${mu(o.avgSyncDuration)}`),console.log(""),o.topAgents.length>0){console.log("\u{1F916} AGENT USAGE (all time)");let p=o.topAgents.reduce((g,f)=>g+f.usageCount,0);for(let g of o.topAgents){let f=p>0?(g.usageCount/p*100).toFixed(0):0;console.log(` ${g.agentName.padEnd(12)}: ${f}% (${g.usageCount} uses)`)}console.log("")}if(i.length>0){console.log("\u{1F4C8} TREND (last 30 days)");let p=mh(i);if(console.log(` ${p} ${Jr(o.last30DaysTokens)} tokens saved`),o.trend!==0){let g=o.trend>0?"\u2191":"\u2193",f=o.trend>0?"+":"";console.log(` ${g} ${f}${o.trend.toFixed(0)}% vs previous 30 days`)}console.log("")}if(console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),console.log("Export: prjct stats --export > stats.md"),console.log(""),t.export){let p=gh(o,i,u,m,a,c);return console.log(p),{success:!0,data:{markdown:p}}}return{success:!0,data:{...o,session:a,patterns:c}}}catch(n){return console.error("\u274C Error:",y(n)),{success:!1,error:y(n)}}}async status(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return t.json?console.log(JSON.stringify({success:!1,error:"No project ID found"})):h.fail("No project ID found"),{success:!1,error:"No project ID found"};let o=Nr(e),i=await o.check(s),a=await o.getSessionInfo(s),c=await Ge.getStatus(s);if(t.json)return console.log(JSON.stringify({success:!0,...i,session:a,analysis:c})),{success:!0,data:{...i,session:a,analysis:c}};if(t.md){let u=yh.basename(e),d=i.isStale?"stale":"fresh",m=i.daysSinceSync>0?`${i.daysSinceSync} day${i.daysSinceSync!==1?"s":""} ago`:"today",p=[];c.hasSealed&&p.push(`Sealed: ${c.sealedCommit} (${c.sealedAt})`),c.hasDraft&&p.push(`Draft: ${c.draftCommit} (pending seal)`),c.hasPreviousSealed&&p.push(`Previous: ${c.previousSealedCommit} (rollback available)`);let g=N(`## \u26A1 Status: ${u}`,dt({Staleness:d,"Last sync":m,"Commits since sync":i.commitsSinceSync,Reason:i.reason}),p.length>0?Z("Analysis",Pe(p)):null);return console.log(g),{success:!0,data:{...i,session:a,analysis:c}}}return console.log(""),console.log(o.formatStatus(i)),console.log(""),console.log(o.formatSessionInfo(a)),(c.hasSealed||c.hasDraft)&&(console.log(""),console.log("Analysis:"),c.hasSealed&&console.log(` Sealed: ${c.sealedCommit} (${c.sealedAt})`),c.hasDraft&&console.log(` Draft: ${c.draftCommit} (pending seal)`),c.hasPreviousSealed&&console.log(` Previous: ${c.previousSealedCommit} (rollback available)`)),console.log(""),{success:!0,data:{...i,session:a,analysis:c}}}catch(n){let s=y(n);return t.json?console.log(JSON.stringify({success:!1,error:s})):h.fail(s),{success:!1,error:s}}}async diff(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return t.json&&console.log(JSON.stringify({success:!1,error:"No project ID found"})),{success:!1,error:"No project ID found"};let o=await Ge.diff(s);if(!o){let i="Cannot compute diff: need both a sealed and a draft analysis. Run `p. sync` to create a draft.";return t.json?console.log(JSON.stringify({success:!1,error:i})):t.md?console.log(N("## Analysis Diff",`> ${i}`)):h.warn(i),{success:!1,error:i}}if(t.json)return console.log(JSON.stringify({success:!0,...o})),{success:!0,data:o};if(t.md)return console.log(N(vc(o))),{success:!0,data:o};if(!o.hasChanges)h.done("No changes between draft and sealed analysis");else{h.section("Analysis Diff"),console.log(Lp(o)),console.log("");let i=[];o.summary.added>0&&i.push(`${o.summary.added} added`),o.summary.removed>0&&i.push(`${o.summary.removed} removed`),o.summary.changed>0&&i.push(`${o.summary.changed} changed`),h.done(i.join(", "))}return console.log(""),{success:!0,data:o}}catch(n){let s=y(n);return t.json?console.log(JSON.stringify({success:!1,error:s})):t.md?console.log(N("## \u274C Diff Failed",`> ${s}`)):h.fail(s),{success:!1,error:s}}}async seal(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return t.json&&console.log(JSON.stringify({success:!1,error:"No project ID found"})),{success:!1,error:"No project ID found"};let o=await Ge.seal(s);return t.json?(console.log(JSON.stringify({success:o.success,signature:o.signature,error:o.error})),{success:o.success,error:o.error}):o.success?(h.done("Analysis sealed"),console.log(` Signature: ${o.signature?.substring(0,16)}...`),console.log(""),{success:!0,data:{signature:o.signature}}):(h.fail(o.error||"Seal failed"),{success:!1,error:o.error})}catch(n){let s=y(n);return t.json?console.log(JSON.stringify({success:!1,error:s})):h.fail(s),{success:!1,error:s}}}async rollback(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return t.json&&console.log(JSON.stringify({success:!1,error:"No project ID found"})),{success:!1,error:"No project ID found"};let o=await Ge.rollback(s);return t.json?(console.log(JSON.stringify({success:o.success,restoredSignature:o.restoredSignature,error:o.error})),{success:o.success,error:o.error}):t.md?o.success?(console.log(N(he("Analysis Rolled Back"),dt({"Restored signature":`${o.restoredSignature?.substring(0,16)}...`,Note:"Previous sealed version is now active. Current version moved to draft."}))),{success:!0,data:{restoredSignature:o.restoredSignature}}):(console.log(N("## \u274C Rollback Failed",`> ${o.error}`)),{success:!1,error:o.error}):o.success?(h.done("Analysis rolled back to previous sealed version"),console.log(` Restored signature: ${o.restoredSignature?.substring(0,16)}...`),console.log(" Previous sealed version demoted to draft"),console.log(""),{success:!0,data:{restoredSignature:o.restoredSignature}}):(h.fail(o.error||"Rollback failed"),{success:!1,error:o.error})}catch(n){let s=y(n);return t.json?console.log(JSON.stringify({success:!1,error:s})):t.md?console.log(N("## \u274C Rollback Failed",`> ${s}`)):h.fail(s),{success:!1,error:s}}}async verify(e=process.cwd(),t={}){if(t.semantic)return this.semanticVerify(e,t);try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return{success:!1,error:"No project ID found"};let o=await Ge.verify(s);return t.json?(console.log(JSON.stringify(o)),{success:o.valid}):(o.valid?h.done(o.message):h.fail(o.message),console.log(""),{success:o.valid,data:o})}catch(n){let s=y(n);return h.fail(s),{success:!1,error:s}}}async semanticVerify(e=process.cwd(),t={}){try{let n=await this.ensureProjectInit(e);if(!n.success)return n;let s=await $.getProjectId(e);if(!s)return t.json?console.log(JSON.stringify({success:!1,error:"No project ID found"})):h.fail("No project ID found"),{success:!1,error:"No project ID found"};let o=e;try{o=A.getDoc(s,"project")?.repoPath||e}catch{}let i=await Ge.semanticVerify(s,o);if(t.json)return console.log(JSON.stringify(i)),{success:i.passed,data:i};console.log(""),i.passed?(h.done("Semantic verification passed"),console.log(` ${i.passedCount}/${i.checks.length} checks passed (${i.totalMs}ms)`)):(h.fail("Semantic verification failed"),console.log(` ${i.failedCount}/${i.checks.length} checks failed`)),console.log(""),console.log("Check Results:");for(let a of i.checks){let c=a.passed?"\u2713":"\u2717",u=a.passed?`${a.output} (${a.durationMs}ms)`:a.error||"Failed";console.log(` ${c} ${a.name}: ${u}`)}return console.log(""),{success:i.passed,data:i}}catch(n){let s=y(n);return t.json?console.log(JSON.stringify({success:!1,error:s})):h.fail(s),{success:!1,error:s}}}}});import{exec as Kx}from"node:child_process";import{promisify as Xx}from"node:util";async function Ki(r){if(process.platform!=="darwin")return Ah(r);try{let{stdout:e}=await Yx(`security find-generic-password -s "${Qx}" -a "${r}" -w 2>/dev/null`);return e.trim()||null}catch{return Ah(r)}}function Ah(r){let t={"linear-api-key":"LINEAR_API_KEY","jira-api-token":"JIRA_API_TOKEN"}[r];return process.env[t]||null}var Yx,Qx,Eu=w(()=>{"use strict";F();Yx=Xx(Kx),Qx="prjct-cli";l(Ki,"getCredential");l(Ah,"getEnvFallback")});import It from"node:fs";import{createServer as YT}from"node:net";aa();Pi();ln();Xt();F();Es();nt();import Ox from"node:path";wt();ke();F();oe();var Ui=class{static{l(this,"CommandRegistry")}handlers=new Map;handlerFns=new Map;metadata=new Map;categories=new Map;noProjectCommands=new Set(["init","setup","start","migrateAll","sessions"]);register(e,t){this.handlers.set(e.name,e),this.setMeta(e.name,t)}registerFn(e,t,n){this.handlerFns.set(e,t),this.setMeta(e,n)}setMeta(e,t){let n=t?.requiresProject??!this.noProjectCommands.has(e);this.metadata.set(e,{name:e,group:t?.group??"unknown",description:t?.description??"",requiresProject:n,usage:t?.usage??{claude:null,terminal:null},implemented:t?.implemented??!0,hasTemplate:t?.hasTemplate??!1,params:t?.params,blockingRules:t?.blockingRules,features:t?.features,isOptional:t?.isOptional,deprecated:t?.deprecated,replacedBy:t?.replacedBy})}registerCategory(e,t){this.categories.set(e,t)}registerMethod(e,t,n,s){let o=t[n];if(typeof o!="function")throw new Error(`${String(n)} is not a function`);let i=l(async(a,c)=>a!=null?o.call(t,a,c.projectPath):o.call(t,c.projectPath),"wrapper");this.handlerFns.set(e,i),this.setMeta(e,s)}has(e){return this.handlers.has(e)||this.handlerFns.has(e)}list(){return[...this.handlers.keys(),...this.handlerFns.keys()]}listByGroup(e){return Array.from(this.metadata.entries()).filter(([,t])=>t.group===e).map(([t])=>t)}getGroups(){let e=new Set;for(let t of this.metadata.values())e.add(t.group);return Array.from(e)}getMeta(e){return this.metadata.get(e)}getAll(){return Array.from(this.metadata.values())}getByName(e){return this.metadata.get(e)}getByCategory(e){return this.getAll().filter(t=>t.group===e)}getAllImplemented(){return this.getAll().filter(e=>e.implemented)}getAllWithTemplates(){return this.getAll().filter(e=>e.hasTemplate)}getClaudeCommands(){return this.getAll().filter(e=>e.usage.claude!==null)}getTerminalCommands(){return this.getAll().filter(e=>e.usage.terminal!==null)}getAllCategories(){return new Map(this.categories)}getCategory(e){return this.categories.get(e)}getRequiresInit(){return this.getAll().filter(e=>e.requiresProject)}getWithBlockingRules(){return this.getAll().filter(e=>e.blockingRules!==void 0)}getOptionalCommands(){return this.getAll().filter(e=>e.isOptional)}getDeprecatedCommands(){return this.getAll().filter(e=>e.deprecated)}getStats(){let e=this.getAll(),t={};for(let n of this.categories.keys())t[n]=e.filter(s=>s.group===n).length;return{total:e.length,implemented:e.filter(n=>n.implemented).length,withTemplates:e.filter(n=>n.hasTemplate).length,claudeOnly:e.filter(n=>n.usage.claude&&!n.usage.terminal).length,terminalOnly:e.filter(n=>!n.usage.claude&&n.usage.terminal).length,both:e.filter(n=>n.usage.claude&&n.usage.terminal).length,requiresInit:e.filter(n=>n.requiresProject).length,byCategory:t}}validate(){let e=[],t=this.getAll(),n=t.map(a=>a.name),s=n.filter((a,c)=>n.indexOf(a)!==c);s.length>0&&e.push(`Duplicate command names: ${s.join(", ")}`);let o=t.filter(a=>a.hasTemplate&&!a.implemented);o.length>0&&e.push(`Commands with templates but not implemented: ${o.map(a=>a.name).join(", ")}`);let i=Array.from(this.categories.keys());if(i.length>0){let a=t.filter(c=>!i.includes(c.group));a.length>0&&e.push(`Invalid categories: ${a.map(c=>`${c.name}:${c.group}`).join(", ")}`)}return{valid:e.length===0,issues:e}}async buildContext(e){let t=await $.getProjectId(e);if(!t)throw new Error("No prjct project found. Run /p:init first.");return{projectId:t,projectPath:e,globalPath:x.getGlobalProjectPath(t),timestamp:b()}}async execute(e,t,n=process.cwd()){let s=this.metadata.get(e),o;if(s?.requiresProject===!1)o={projectId:"",projectPath:n,globalPath:"",timestamp:b()};else try{o=await this.buildContext(n)}catch(c){return{success:!1,error:y(c)}}let i=this.handlers.get(e);if(i)return i.execute(t,o);let a=this.handlerFns.get(e);return a?a(t,o):{success:!1,error:`Command not found: ${e}`}}async executeWithoutProject(e,t,n=process.cwd()){let s=this.handlers.get(e);if(s){let i={projectId:"",projectPath:n,globalPath:"",timestamp:b()};return s.execute(t,i)}let o=this.handlerFns.get(e);if(o){let i={projectId:"",projectPath:n,globalPath:"",timestamp:b()};return o(t,i)}return{success:!1,error:`Command not found: ${e}`}}clear(){this.handlers.clear(),this.handlerFns.clear(),this.metadata.clear(),this.categories.clear()}},W=new Ui;var Ns=class extends be{static{l(this,"AnalyticsCommands")}async dash(e="default",t=process.cwd(),n={}){try{let s=await this.ensureProjectInit(t);if(!s.success)return s;let o=await $.getProjectId(t);if(!o)return h.failWithHint("NO_PROJECT_ID"),{success:!1,error:"No project ID found"};let i=Ox.basename(t),a=await _.getCurrentTask(o),c=await fe.getActiveTasks(o),u=await ut.getRecent(o,5),d=await qe.getPending(o);if(e==="compact"){let m=a?`\u{1F3AF} ${a.description.slice(0,30)}`:"\u{1F4A4} idle",p=`\u{1F4CB} ${c.length}`,g=`\u{1F680} ${u.length}`;return h.done(`${m} | ${p} | ${g}`),{success:!0,view:"compact"}}if(e==="week"||e==="month"){let m=e==="week"?7:30,p=z.getDaysAgo(m),g=[];try{let S=p.toISOString();g=A.query(o,"SELECT data, timestamp FROM events WHERE type LIKE ? AND timestamp >= ? ORDER BY id DESC","memory.%",S).map(D=>({...JSON.parse(D.data),timestamp:D.timestamp}))}catch{g=[]}let f={tasksCompleted:g.filter(S=>S.action==="task_completed").length,featuresShipped:g.filter(S=>S.action==="feature_shipped").length,totalActions:g.length};console.log(`
1208
1208
  \u{1F4CA} ${e.toUpperCase()} PROGRESS - ${i}
1209
1209
  `),console.log("\u2550".repeat(50)),console.log(` Tasks completed: ${f.tasksCompleted}`),console.log(` Features shipped: ${f.featuresShipped}`),console.log(` Total actions: ${f.totalActions}`),console.log("\u2550".repeat(50));let k=this._generateSparkline(g,m);return console.log(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prjct-cli",
3
- "version": "1.38.4",
3
+ "version": "1.38.5",
4
4
  "description": "Context layer for AI agents. Project context for Claude Code, Gemini CLI, and more.",
5
5
  "main": "dist/bin/prjct.mjs",
6
6
  "bin": {