prjct-cli 3.83.0 → 3.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/assets/statusline/statusline.sh +36 -2
- package/bin/prjct.cjs +1 -0
- package/dist/bin/prjct-core.mjs +628 -622
- package/dist/bin/prjct-hooks.mjs +313 -310
- package/dist/bin/prjct.mjs +9 -3
- package/dist/daemon/entry.mjs +552 -546
- package/dist/mcp/server.mjs +2 -2
- package/package.json +1 -1
package/dist/mcp/server.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { dirname as __pathDirname } from 'path';
|
|
|
5
5
|
const require = __createRequire(import.meta.url);
|
|
6
6
|
const __filename = __fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __pathDirname(__filename);
|
|
8
|
-
var Ii=Object.defineProperty;var TC=Object.getOwnPropertyDescriptor;var SC=Object.getOwnPropertyNames;var bC=Object.prototype.hasOwnProperty;var a=(t,e)=>Ii(t,"name",{value:e,configurable:!0}),Pi=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var y=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var P=(t,e)=>{for(var n in e)Ii(t,n,{get:e[n],enumerable:!0})},vC=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of SC(e))!bC.call(t,s)&&s!==n&&Ii(t,s,{get:()=>e[s],enumerable:!(r=TC(e,s))||r.enumerable});return t};var Ks=t=>vC(Ii({},"__esModule",{value:!0}),t);function Li(t){return t instanceof Error&&"code"in t}function Y(t){return Li(t)&&t.code==="ENOENT"}function Ll(t){return Li(t)&&(t.code==="EACCES"||t.code==="EPERM")}function Dl(t){let e=Li(t)?t.code:void 0;return e==="EROFS"||e==="SQLITE_READONLY"?!0:/readonly|read-only/i.test(N(t))}function Fr(t,e,n="file"){let r=N(t);if(Dl(t)||Ll(t)){let s=Li(t)&&t.code||"read-only";return`prjct can't write its ${n} at ${e} (${s}). This usually means a sandboxed or read-only environment. Re-run with write access to that path \u2014 some agents (e.g. Codex) run commands in a restricted sandbox, so approve filesystem/write access for prjct.`}return`Failed to write ${n} at ${e}: ${r}`}function N(t){return t instanceof Error?t.message:typeof t=="string"?t:"Unknown error"}var ue=y(()=>{"use strict";a(Li,"isNodeError");a(Y,"isNotFoundError");a(Ll,"isPermissionError");a(Dl,"isReadonlyError");a(Fr,"describeFsWriteError");a(N,"getErrorMessage")});var Yf={};P(Yf,{PACKAGE_ROOT:()=>Hr,VERSION:()=>pn,getPackageRoot:()=>Ol,getVersion:()=>ji,resetPackageRoot:()=>_C});import jl from"node:fs";import Di from"node:path";function Ol(){if(wt.packageRoot)return wt.packageRoot;let t=a((e,n)=>{if(n>=5)return null;let r=Di.join(e,"package.json");if(jl.existsSync(r))try{if(JSON.parse(jl.readFileSync(r,"utf-8")).name==="prjct-cli")return e}catch{}return t(Di.dirname(e),n+1)},"findPackageRoot");return wt.packageRoot=t(__dirname,0)??Di.join(__dirname,"..","..",".."),wt.packageRoot}function ji(){if(wt.version)return wt.version;let t="3.
|
|
8
|
+
var Ii=Object.defineProperty;var TC=Object.getOwnPropertyDescriptor;var SC=Object.getOwnPropertyNames;var bC=Object.prototype.hasOwnProperty;var a=(t,e)=>Ii(t,"name",{value:e,configurable:!0}),Pi=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var y=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var P=(t,e)=>{for(var n in e)Ii(t,n,{get:e[n],enumerable:!0})},vC=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of SC(e))!bC.call(t,s)&&s!==n&&Ii(t,s,{get:()=>e[s],enumerable:!(r=TC(e,s))||r.enumerable});return t};var Ks=t=>vC(Ii({},"__esModule",{value:!0}),t);function Li(t){return t instanceof Error&&"code"in t}function Y(t){return Li(t)&&t.code==="ENOENT"}function Ll(t){return Li(t)&&(t.code==="EACCES"||t.code==="EPERM")}function Dl(t){let e=Li(t)?t.code:void 0;return e==="EROFS"||e==="SQLITE_READONLY"?!0:/readonly|read-only/i.test(N(t))}function Fr(t,e,n="file"){let r=N(t);if(Dl(t)||Ll(t)){let s=Li(t)&&t.code||"read-only";return`prjct can't write its ${n} at ${e} (${s}). This usually means a sandboxed or read-only environment. Re-run with write access to that path \u2014 some agents (e.g. Codex) run commands in a restricted sandbox, so approve filesystem/write access for prjct.`}return`Failed to write ${n} at ${e}: ${r}`}function N(t){return t instanceof Error?t.message:typeof t=="string"?t:"Unknown error"}var ue=y(()=>{"use strict";a(Li,"isNodeError");a(Y,"isNotFoundError");a(Ll,"isPermissionError");a(Dl,"isReadonlyError");a(Fr,"describeFsWriteError");a(N,"getErrorMessage")});var Yf={};P(Yf,{PACKAGE_ROOT:()=>Hr,VERSION:()=>pn,getPackageRoot:()=>Ol,getVersion:()=>ji,resetPackageRoot:()=>_C});import jl from"node:fs";import Di from"node:path";function Ol(){if(wt.packageRoot)return wt.packageRoot;let t=a((e,n)=>{if(n>=5)return null;let r=Di.join(e,"package.json");if(jl.existsSync(r))try{if(JSON.parse(jl.readFileSync(r,"utf-8")).name==="prjct-cli")return e}catch{}return t(Di.dirname(e),n+1)},"findPackageRoot");return wt.packageRoot=t(__dirname,0)??Di.join(__dirname,"..","..",".."),wt.packageRoot}function ji(){if(wt.version)return wt.version;let t="3.84.0";if(t&&/^\d+\.\d+\.\d+/.test(t))return wt.version=t,wt.version;try{let e=Di.join(Ol(),"package.json"),n=JSON.parse(jl.readFileSync(e,"utf-8"));return wt.version=n.version,wt.version}catch(e){return process.env.PRJCT_DEBUG==="1"&&console.error("Failed to read version from package.json:",N(e)),"0.0.0"}}function _C(t){wt.packageRoot=t,wt.version=null}var wt,pn,Hr,Rn=y(()=>{"use strict";ue();wt={version:null,packageRoot:null};a(Ol,"getPackageRoot");a(ji,"getVersion");a(_C,"resetPackageRoot");pn=ji(),Hr=Ol()});var Qf,Oi,Zf,Mi=y(()=>{"use strict";Qf=new Set(["node_modules",".git","dist","build","out",".next",".nuxt","coverage",".cache",".turbo",".vercel",".parcel-cache","__pycache__",".pytest_cache","target","vendor",".venv","venv","eggs","*.egg-info",".prjct",".worktrees"]),Oi=["",".ts",".tsx",".js",".jsx","/index.ts","/index.js"],Zf=/(?:import|from)\s+['"]([^'"]+)['"]/g});function eh(t){let e=t.getFullYear(),n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0");return`${e}-${n}-${r}`}function th(t){return{year:t.getFullYear().toString(),month:(t.getMonth()+1).toString().padStart(2,"0"),day:t.getDate().toString().padStart(2,"0")}}function x(){return new Date().toISOString()}function Ur(t){let e=new Date;return e.setDate(e.getDate()-t),e}function nh(t){let e=Math.floor(t/1e3),n=Math.floor(e/60),r=Math.floor(n/60),s=Math.floor(r/24);return s>0?`${s}d ${r%24}h`:r>0?`${r}h ${n%60}m`:n>0?`${n}m`:`${e}s`}var d1,se=y(()=>{"use strict";a(eh,"formatDate");a(th,"getYearMonthDay");a(x,"getTimestamp");a(Ur,"getDaysAgo");a(nh,"formatDuration");d1=new Intl.RelativeTimeFormat("en",{numeric:"always"})});import oh from"node:fs/promises";async function ih(t,e){let n=await oh.readFile(t,"utf-8").catch(o=>{if(Y(o))return null;throw o});if(n===null)return null;let r=(()=>{try{return JSON.parse(n)}catch{return null}})();if(r===null)return await rh(t,n),sh(t,"Malformed JSON"),null;let s=e.safeParse(r);return s.success?r:(await rh(t,n),sh(t,xC(s.error)),null)}async function rh(t,e){let n=`${t}.backup`;try{await oh.writeFile(n,e,{encoding:"utf-8",flag:"wx"})}catch{}}function sh(t,e){console.error(`[prjct] Warning: Corrupted storage file: ${t}`),console.error(`[prjct] Reason: ${e}`),console.error("[prjct] A .backup file has been created. Returning defaults.")}function xC(t){return t.issues.slice(0,3).map(e=>`${e.path.join(".")}: ${e.message}`).join("; ")}var ah=y(()=>{"use strict";ue();a(ih,"safeRead");a(rh,"createBackup");a(sh,"logCorruption");a(xC,"formatZodError")});import Pt from"node:fs/promises";import $i from"node:path";async function ch(t,e,n){try{return await n()}catch(r){throw Dl(r)||Ll(r)?new Error(Fr(r,t,e)):r}}async function Tt(t,e={}){let n=[],r=e.maxFiles??1/0,s=e.dotfileAllowlist?new Set(e.dotfileAllowlist):null;async function o(i){if(n.length>=r)return;let c=await Pt.readdir(i,{withFileTypes:!0}).catch(()=>[]);for(let l of c){if(n.length>=r)break;let u=String(l.name);if(Qf.has(u)||e.skipDotfiles&&u.startsWith(".")&&(!s||!s.has(u)))continue;let p=$i.join(i,u);l.isDirectory()?await o(p):l.isFile()&&n.push($i.relative(t,p))}}return a(o,"walk"),await o(t),n}async function Lt(t,e,n){let r=[],s=Array.from({length:Math.ceil(t.length/e)},(o,i)=>i*e);for(let o of s){let i=await Promise.all(t.slice(o,o+e).map(n));for(let c of i)c!==null&&r.push(c)}return r}async function at(t,e=null,n){if(n)return await ih(t,n)??e;try{let r=await Pt.readFile(t,"utf-8");return JSON.parse(r)}catch(r){if(Y(r))return e;throw r}}async function Ge(t,e,n=2){await ch(t,"config",async()=>{let r=$i.dirname(t);await Pt.mkdir(r,{recursive:!0});let s=`${JSON.stringify(e,null,n)}
|
|
9
9
|
`;await Pt.writeFile(t,s,"utf-8")})}async function St(t,e=""){try{return await Pt.readFile(t,"utf-8")}catch(n){if(Y(n))return e;throw n}}async function An(t,e){await ch(t,"file",async()=>{let n=$i.dirname(t);await Pt.mkdir(n,{recursive:!0}),await Pt.writeFile(t,e,"utf-8")})}async function j(t){try{return await Pt.access(t),!0}catch(e){if(Y(e))return!1;throw e}}async function De(t){try{return(await Pt.stat(t)).isDirectory()}catch(e){if(Y(e))return!1;throw e}}async function Wt(t){await Pt.mkdir(t,{recursive:!0})}async function Nn(t,e={}){try{return(await Pt.readdir(t,{withFileTypes:!0})).filter(s=>!e.filesOnly||s.isFile()).filter(s=>!e.dirsOnly||s.isDirectory()).filter(s=>!e.extension||s.name.endsWith(e.extension)).map(s=>s.name)}catch(n){if(Y(n))return[];throw n}}var de=y(()=>{"use strict";Mi();ah();ue();a(ch,"withWriteErrorContext");a(Tt,"walkDir");a(Lt,"batchProcess");a(at,"readJson");a(Ge,"writeJson");a(St,"readFile");a(An,"writeFile");a(j,"fileExists");a(De,"dirExists");a(Wt,"ensureDir");a(Nn,"listFiles")});import RC from"node:os";import lh from"node:path";function Pn(){let t=process.env.PRJCT_CLI_HOME?.trim();return t?lh.resolve(t):lh.join(RC.homedir(),".prjct-cli")}var zs=y(()=>{"use strict";a(Pn,"resolveCliHome")});import CC from"node:fs";import Wr from"node:fs/promises";import Qe from"node:path";async function Ml(t){let e={isMonorepo:!1,type:null,rootPath:t,packages:[]},n=[{file:"pnpm-workspace.yaml",type:"pnpm"},{file:"lerna.json",type:"lerna"},{file:"nx.json",type:"nx"},{file:"rush.json",type:"rush"},{file:"turbo.json",type:"turborepo"}];for(let r of n)if(await j(Qe.join(t,r.file))){e.isMonorepo=!0,e.type=r.type;break}if(!e.isMonorepo){let r=Qe.join(t,"package.json");if(await j(r))try{JSON.parse(await Wr.readFile(r,"utf-8")).workspaces&&(e.isMonorepo=!0,e.type="npm")}catch{}}return e.isMonorepo&&(e.packages=await $l(t,e.type)),e}async function $l(t,e){let n=[];try{let r=await(async()=>{if(e==="pnpm"){let i=(await Wr.readFile(Qe.join(t,"pnpm-workspace.yaml"),"utf-8")).match(/packages:\s*\n((?:\s*-\s*.+\n?)+)/);return i?i[1].split(`
|
|
10
10
|
`).map(c=>c.replace(/^\s*-\s*['"]?|['"]?\s*$/g,"")).filter(Boolean):[]}if(e==="npm"||e==="lerna"){let o=Qe.join(t,"package.json"),i=JSON.parse(await Wr.readFile(o,"utf-8")),c=Array.isArray(i.workspaces)?i.workspaces:i.workspaces?.packages??[];if(e==="lerna"){let l=Qe.join(t,"lerna.json");if(await j(l)){let u=JSON.parse(await Wr.readFile(l,"utf-8"));if(u.packages)return u.packages}}return c}if(e==="nx")return["apps/*","libs/*","packages/*"];if(e==="turborepo"){let o=JSON.parse(await Wr.readFile(Qe.join(t,"package.json"),"utf-8"));return Array.isArray(o.workspaces)?o.workspaces:[]}return[]})(),s=r.length>0?r:["packages/*","apps/*","libs/*"];for(let o of s){if(o.startsWith("!"))continue;let i=AC(o,{cwd:t});for(let c of i){let l=Qe.join(t,c),u=Qe.join(l,"package.json");if(await j(u))try{let p=JSON.parse(await Wr.readFile(u,"utf-8")),d=Qe.join(l,"PRJCT.md");n.push({name:p.name||Qe.basename(c),path:l,relativePath:c,hasPrjctMd:await j(d)})}catch{}}}}catch{}return n}async function uh(t,e){if(!e.isMonorepo)return null;let n=Qe.resolve(t);for(let r of e.packages){let s=Qe.resolve(r.path);if(n.startsWith(s))return r}return null}async function Fl(t){let e=Qe.resolve(t),n=Qe.parse(e).root;return e===n?null:(await Ml(e)).isMonorepo?e:Fl(Qe.dirname(e))}var AC,dh=y(()=>{"use strict";de();AC=CC.globSync;a(Ml,"detectMonorepo");a($l,"discoverMonorepoPackages");a(uh,"findContainingPackage");a(Fl,"findMonorepoRoot")});import NC from"node:os";import ph from"node:path";function Br(){let t=process.env.HOME?.trim()||process.env.USERPROFILE?.trim();return t?ph.resolve(t):NC.homedir()}function Fe(...t){return ph.join(Br(),...t)}var er=y(()=>{"use strict";a(Br,"resolveUserHome");a(Fe,"resolveUserPath")});var Hl=y(()=>{"use strict"});import{z as Ys}from"zod";function gh(t){return mh[t]??"balanced"}function IC(t){return t==="frontier"?"max":"decent"}function fh(t){return{model:Fi[t][0],effort:IC(t)}}function Ui(t){return fh(gh(t))}function LC(t,e,n){let r=n?fh(n):Ui(t);if(!e||e.size===0)return{...r,preferred:r.model,degraded:!1};for(let s of PC[r.model])if(e.has(s))return{...r,model:s,preferred:r.model,degraded:s!==r.model};return{...r,preferred:r.model,degraded:!1}}function DC(t,e,n,r){let s=r??gh(t),o=Hi[e]?.[s];if(!o||o.length===0)return{provider:e,model:null,capability:s,degraded:!1};let i=o[0];if(!n||n.size===0)return{provider:e,model:i,capability:s,degraded:!1};for(let c of o)if(n.has(c))return{provider:e,model:c,capability:s,degraded:c!==i};return{provider:e,model:i,capability:s,degraded:!1}}function hh(t,e,n,r){let s=DC(t,e,n,r);if(s.model===null){let i=s.capability==="frontier"?"your strongest model":s.capability==="fast"?"a fast, cheap model":"a balanced mid-tier model";return`Dispatch this ${t} as a ${s.capability}-class task \u2014 select ${i} on this rig (${e}).`}let o=s.degraded?` (preferred ${s.capability} model unavailable \u2014 degraded to "${s.model}")`:"";return`Dispatch this ${t} on ${e} with model "${s.model}" \u2014 a ${s.capability}-class task${o}.`}function yh(t,e,n){let r=LC(t,e,n),s=r.preferred==="opus"&&r.effort==="max";if(s&&!r.degraded)return'Dispatch with the Agent tool using `model: "opus"` and full reasoning effort \u2014 this is the IMPLEMENTER; it writes code and needs the best model.';if(s)return`Dispatch with the Agent tool using \`model: "${r.model}"\` \u2014 this is the IMPLEMENTER, but its preferred tier \`opus\` is unavailable/throttled, so it is degraded to \`${r.model}\` at full effort. Compensate by leaning harder on verification (\`verify:\` gates) before ship.`;let o=`Dispatch with the Agent tool using \`model: "${r.model}"\` (NOT the parent's max model). Apply ${r.effort}, not exhaustive, effort \u2014 this is an orchestration/review role: return the verdict, don't over-deliberate. A smaller model at decent effort is correct here and far faster.`;return r.degraded?`${o} (Preferred tier \`${r.preferred}\` is unavailable/throttled \u2014 degraded to \`${r.model}\`.)`:o}function Gr(t){let e=Hi[t];return e?[...new Set([...e.frontier,...e.balanced,...e.fast])]:[]}function Xr(t){return Hi[t]?.balanced[0]??null}function Eh(t,e){let n=t.split(".").map(Number),r=e.split(".").map(Number);for(let s of[0,1,2]){let o=n[s]??0,i=r[s]??0;if(o<i)return-1;if(o>i)return 1}return 0}var Hi,mh,Fi,$1,PC,Qs,qr=y(()=>{"use strict";Hi={claude:{frontier:["opus","sonnet","haiku"],balanced:["sonnet","haiku","opus"],fast:["haiku","sonnet","opus"]},gemini:{frontier:["3.1-pro","2.5-pro","2.5-flash","2.0-flash"],balanced:["2.5-flash","3.1-pro","2.5-pro","2.0-flash"],fast:["2.0-flash","2.5-flash","2.5-pro","3.1-pro"]},openai:{frontier:["gpt-5.5","o3","gpt-4.1","gpt-4o"],balanced:["gpt-4.1","gpt-5.5","gpt-4o","gpt-4.1-mini"],fast:["gpt-4.1-mini","gpt-4o-mini","gpt-4o","gpt-4.1"]},codex:{frontier:["gpt-5.5","o3","gpt-4.1","gpt-4o"],balanced:["gpt-4.1","gpt-5.5","gpt-4o","gpt-4.1-mini"],fast:["gpt-4.1-mini","gpt-4o-mini","gpt-4o","gpt-4.1"]},xai:{frontier:["grok-4","grok-3","grok-2","grok-2-mini"],balanced:["grok-3","grok-4","grok-2","grok-2-mini"],fast:["grok-2-mini","grok-2","grok-3","grok-4"]},grok:{frontier:["grok-4","grok-3","grok-2","grok-2-mini"],balanced:["grok-3","grok-4","grok-2","grok-2-mini"],fast:["grok-2-mini","grok-2","grok-3","grok-4"]},kimi:{frontier:["kimi-k2","kimi-latest","moonshot-v1-128k"],balanced:["kimi-latest","moonshot-v1-128k","moonshot-v1-32k"],fast:["moonshot-v1-32k","moonshot-v1-128k","kimi-latest"]},opencode:{frontier:[],balanced:[],fast:[]},cline:{frontier:[],balanced:[],fast:[]},aider:{frontier:[],balanced:[],fast:[]}},mh={implementer:"frontier",orchestrator:"fast","strategic-review":"balanced","architecture-review":"balanced","design-review":"balanced","spec-review":"balanced",review:"balanced",security:"balanced",investigate:"balanced",reviewer:"balanced"};a(gh,"capabilityClassForRole");Fi=Hi.claude;a(IC,"effortForClass");a(fh,"policyForClass");a(Ui,"getAgentModelPolicy");$1=Object.fromEntries(Object.keys(mh).map(t=>[t,Ui(t)])),PC={opus:Fi.frontier,sonnet:Fi.balanced,haiku:Fi.fast};a(LC,"resolveAgentModel");a(DC,"resolveProviderModel");a(hh,"renderModelDirectiveForProvider");a(yh,"renderModelDirective");Qs=Ys.object({provider:Ys.string(),model:Ys.string(),cliVersion:Ys.string().optional(),recordedAt:Ys.string()});a(Gr,"getSupportedModels");a(Xr,"getDefaultModel");a(Eh,"compareSemver")});var Bi={};P(Bi,{GitInfraError:()=>Xe,PROC_ENVELOPE_MAX:()=>bh,execAsync:()=>Q,execFileAsync:()=>ne,exitCodeMeans:()=>UC,gitInfraErrorOf:()=>Ul,gitStdout:()=>tr,isProcInfra:()=>HC,matchProc:()=>WC,procErrorOf:()=>_h,runGit:()=>Ze,runProc:()=>vh,sanitizeProcEnvelope:()=>Wi,throwProc:()=>Ln});import{exec as jC,execFile as OC,spawn as Th}from"node:child_process";import{promisify as Sh}from"node:util";function kh(t){try{process.platform==="win32"?t.pid!==void 0&&Th("taskkill",["/pid",String(t.pid),"/T","/F"],{stdio:"ignore"}).unref():t.pid!==void 0&&process.kill(-t.pid,"SIGKILL")}catch{}try{t.kill("SIGKILL")}catch{}}function wh(t,e){if(t.length===0)return"";let n=Buffer.concat(t);return(n.length>e?n.subarray(0,e):n).toString("utf8")}function FC(t){let e=t.code;return typeof e=="string"?e:void 0}function vh(t,e,n={}){let r=n.timeoutMs??MC,s=n.maxBuffer??$C,o=s,i=n.spawnFn??Th,c=[t,...e],l=Date.now(),u=a(()=>Date.now()-l,"duration");return n.signal?.aborted?Promise.resolve({ok:!1,kind:"timeout",budgetMs:0,budgetSource:"abort",args:c,stdout:"",stderr:"",durationMs:0}):new Promise(p=>{let d=[],m=[],g={settled:!1,overflow:!1,outBytes:0,errBytes:0},h=i(t,e,{cwd:n.cwd,env:n.env,detached:process.platform!=="win32",stdio:["ignore","pipe","pipe"]}),f=a(R=>{g.settled||(g.settled=!0,clearTimeout(C),n.signal?.removeEventListener("abort",E),p(R))},"finish"),T=a(()=>({stdout:wh(d,o),stderr:wh(m,o)}),"partials"),S=a((R,D)=>{kh(h);let{stdout:B,stderr:oe}=T();f({ok:!1,kind:"timeout",budgetMs:D,budgetSource:R,args:c,stdout:B,stderr:oe,durationMs:u()})},"finishTimeout"),_=a(()=>{kh(h);let{stdout:R,stderr:D}=T();f({ok:!1,kind:"overflow",maxBuffer:s,args:c,stdout:R,stderr:D||`maxBuffer exceeded (${s} bytes)`,durationMs:u()})},"finishOverflow"),C=setTimeout(()=>S("timeout",r),r),E=a(()=>S("abort",r),"onAbort");n.signal?.addEventListener("abort",E,{once:!0});let b=a((R,D)=>{g.settled||(D?(m.push(R),g.errBytes+=R.length):(d.push(R),g.outBytes+=R.length),!g.overflow&&g.outBytes+g.errBytes>s&&(g.overflow=!0,_()))},"onChunk");h.stdout?.on("data",R=>b(R,!1)),h.stderr?.on("data",R=>b(R,!0)),h.on("error",R=>{f({ok:!1,kind:"spawn",cause:R,code:FC(R),args:c,durationMs:u()})}),h.on("close",(R,D)=>{if(g.settled)return;let{stdout:B,stderr:oe}=T();f(R===0?{ok:!0,stdout:B,stderr:oe,durationMs:u()}:{ok:!1,kind:"exit",code:R??-1,signal:D,stdout:B,stderr:oe.trim(),args:c,durationMs:u()})})})}function Ze(t,e={}){return vh("git",t,e)}function HC(t){return!t.ok&&(t.kind==="timeout"||t.kind==="spawn"||t.kind==="overflow")}function UC(t,e){return!Number.isInteger(e)||e<0?!1:!t.ok&&t.kind==="exit"&&t.code===e}function Wi(t,e=bh){let r=t.replace(/[\r\n\t]+/g," ").replace(/\s+/g," ").trim().replace(/(?:[A-Za-z]:)?(?:\/|\\)(?:Users|home|tmp|var|private|Users)(?:\/|\\)[^\s]*/gi,"\u2026").replace(/\/(?:Users|home|tmp|var|private)\/[^\s]*/gi,"\u2026");return r.length<=e?r:`${r.slice(0,Math.max(0,e-1))}\u2026`}function Ul(t){return t.ok||t.kind==="exit"?null:t.kind==="timeout"?new Xe("timeout",t.args,t.budgetSource==="abort"?"aborted by caller signal":`exceeded ${t.budgetMs}ms`,{budgetSource:t.budgetSource}):t.kind==="overflow"?new Xe("overflow",t.args,`maxBuffer ${t.maxBuffer} bytes`):new Xe("spawn",t.args,t.cause.message)}function _h(t){if(t.ok)return null;if(t.kind==="exit"){let e=t.stderr?` \u2014 ${Wi(t.stderr,120)}`:"",n=t.signal?` signal=${t.signal}`:"";return new Error(Wi(`command failed (exit ${t.code}${n}): ${t.args.join(" ")}${e}`))}return Ul(t)}function Ln(t){throw t.ok?new Error("throwProc called on ok result"):_h(t)??new Error(`process failed (${t.kind})`)}function WC(t,e){if(t.ok)return e.ok(t);switch(t.kind){case"exit":return e.exit(t);case"timeout":return e.timeout(t);case"spawn":return e.spawn(t);case"overflow":return e.overflow(t);default:return t}}async function tr(t,e,n={}){let r=await Ze(e,{...n,cwd:t});if(r.ok)return r.stdout.trim();let s=Ul(r);if(s)throw s;return null}var Q,ne,MC,$C,bh,Xe,pe=y(()=>{"use strict";Q=Sh(jC),ne=Sh(OC),MC=1e4,$C=1024*1024,bh=240;a(kh,"killProcessTree");a(wh,"joinChunks");a(FC,"nodeErrorCode");a(vh,"runProc");a(Ze,"runGit");a(HC,"isProcInfra");a(UC,"exitCodeMeans");a(Wi,"sanitizeProcEnvelope");Xe=class extends Error{static{a(this,"GitInfraError")}kind;args;detail;budgetSource;constructor(e,n,r,s){super(Wi(`git ${e} failure (${n.join(" ")}): ${r}`)),this.name="GitInfraError",this.kind=e,this.args=n,this.detail=r,this.budgetSource=s?.budgetSource}};a(Ul,"gitInfraErrorOf");a(_h,"procErrorOf");a(Ln,"throwProc");a(WC,"matchProc");a(tr,"gitStdout")});function xh(t,e){let n=typeof t=="string"?new Date(t).getTime():t;return Date.now()-n>e}var Gi,Wl=y(()=>{"use strict";a(xh,"isExpired");Gi=class{static{a(this,"TTLCache")}cache=new Map;ttl;maxSize;constructor(e={}){this.ttl=e.ttl??5e3,this.maxSize=e.maxSize??50}isValid(e){let n=this.cache.get(e);return n?Date.now()-n.timestamp<this.ttl:!1}get(e){let n=this.cache.get(e);return n?this.isValid(e)?n.data:(this.cache.delete(e),null):null}set(e,n){this.cache.set(e,{data:n,timestamp:Date.now()}),this.evictOldEntries()}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}has(e){return this.cache.has(e)}get size(){return this.cache.size}evictOldEntries(){if(this.cache.size<=this.maxSize)return;let n=Array.from(this.cache.entries()).sort((r,s)=>r[1].timestamp-s[1].timestamp).slice(0,this.cache.size-this.maxSize);for(let[r]of n)this.cache.delete(r)}stats(){return{size:this.cache.size,maxSize:this.maxSize,ttl:this.ttl}}prune(){let e=[...this.cache.keys()].filter(n=>!this.isValid(n));for(let n of e)this.cache.delete(n);return e.length}}});import BC from"node:fs/promises";import GC from"node:path";async function Ch(){try{let t=await BC.readFile(Rh(),"utf-8"),e=JSON.parse(t);return!e.timestamp||!e.detection||!e.detection.claude||!e.detection.gemini||!e.detection.codex||xh(e.timestamp,XC)?null:e.detection}catch{return null}}async function Ah(t){let e={timestamp:new Date().toISOString(),detection:t};await Ge(Rh(),e)}var Rh,XC,Nh=y(()=>{"use strict";ct();Wl();de();Rh=a(()=>GC.join(ie.getCachePath(),"providers.json"),"cacheFile"),XC=600*1e3;a(Ch,"readProviderCache");a(Ah,"writeProviderCache")});import{execFileSync as Bl}from"node:child_process";function Zs(t){for(let e of t.split(/\r?\n/)){let n=e.trim();if(n)return n}return null}function Ih(t){if(!t||t.includes("\0"))return null;try{if(process.platform==="win32"){let e=Bl("where.exe",[t],{encoding:"utf-8",stdio:["ignore","pipe","ignore"],windowsHide:!0});return Zs(e)}try{let e=Bl("which",[t],{encoding:"utf-8",stdio:["ignore","pipe","ignore"]});return Zs(e)}catch{let e=Bl("/bin/sh",["-c",`command -v ${JSON.stringify(t)}`],{encoding:"utf-8",stdio:["ignore","pipe","ignore"]});return Zs(e)}}catch{return null}}async function eo(t){if(!t||t.includes("\0"))return null;try{if(process.platform==="win32"){let{stdout:e}=await ne("where.exe",[t],{encoding:"utf-8",windowsHide:!0});return Zs(String(e))}try{let{stdout:e}=await ne("which",[t]);return Zs(String(e))}catch{return Ih(t)}}catch{return null}}function Ph(t){return Ih(t)!==null}var to=y(()=>{"use strict";pe();a(Zs,"firstNonEmptyLine");a(Ih,"whichSync");a(eo,"whichAsync");a(Ph,"commandOnPath")});var no={};P(no,{ClaudeProvider:()=>Xi,CursorProvider:()=>Dh,GeminiProvider:()=>ql,Providers:()=>Dn,detectAllProviders:()=>Kl,detectAntigravity:()=>JC,detectCodex:()=>On,detectKimi:()=>zl,detectProvider:()=>Xl,getActiveProvider:()=>jn,getProviderBranding:()=>qi,selectProvider:()=>KC,validateCliVersion:()=>jh});import Gl from"node:path";async function Jl(t){let e=await eo(t);return e||(process.platform==="win32"?eo(`${t}.cmd`):null)}async function VC(t){try{let{stdout:e}=await Q(`${t} --version`,{timeout:2e3}),n=e.match(/\d+\.\d+\.\d+/);return n?n[0]:e.trim()}catch{return null}}async function Xl(t){let e=Dn[t];if(!e.cliCommand)return{installed:!1};let n=await Jl(e.cliCommand);if(!n)return{installed:!1};let r=await VC(e.cliCommand),s=jh(t,r||void 0);return{installed:!0,version:r||void 0,path:n,versionWarning:s||void 0}}function jh(t,e){let n=Dn[t];return!n.minCliVersion||!e?null:Eh(e,n.minCliVersion)<0?`\u26A0\uFE0F ${n.displayName} v${e} is below minimum v${n.minCliVersion}. Some features may not work correctly.`:null}async function Kl(t=!1){if(!t){let i=await Ch();if(i)return i}let[e,n,r]=await Promise.all([Xl("claude"),Xl("gemini"),On()]),s={installed:r.installed},o={claude:e,gemini:n,codex:s};return await Ah(o).catch(()=>{}),o}async function jn(t){if(t&&Dn[t])return Dn[t];let e=await Kl(),n=[e.claude.installed?"claude":null,e.gemini.installed?"gemini":null,e.codex.installed?"codex":null].filter(Boolean);return n.length===1?Dn[n[0]]:e.claude.installed?Xi:e.gemini.installed?ql:e.codex.installed?Vl:Xi}function qi(t){return{commitFooter:"Generated with [p/](https://www.prjct.app/)",signature:{claude:"\u26A1 prjct + Claude",gemini:"\u26A1 prjct + Gemini",cursor:"\u26A1 prjct + Cursor",antigravity:"\u26A1 prjct + Antigravity",codex:"\u26A1 prjct + Codex"}[t]||"\u26A1 prjct"}}async function JC(){let t=Lh.configDir;if(!t)return{installed:!1,skillInstalled:!1};let e=Gl.join(t,"skills","prjct","SKILL.md"),[n,r]=await Promise.all([j(t),j(e)]);return{installed:n,skillInstalled:r,configPath:n?t:void 0}}async function On(){let t=Vl.configDir;if(!t)return{installed:!1,skillInstalled:!1};let e=await Jl("codex"),n=Gl.join(t,"skills","prjct","SKILL.md"),r=await j(n),s=!!e||await j(Gl.join(t,"auth.json"));return{installed:s,skillInstalled:r,configPath:s?t:void 0}}async function zl(){let t=Fe(".kimi"),[e,n]=await Promise.all([Jl("kimi"),j(t)]),r=!!e||n;return{installed:r,configPath:r?t:void 0}}async function KC(){let t=await Kl();return{provider:t.claude.installed?"claude":t.gemini.installed?"gemini":t.codex.installed?"codex":"claude",detection:t}}var Xi,ql,Lh,Dh,Vl,Dn,bt=y(()=>{"use strict";Hl();qr();pe();de();Nh();to();er();Xi={name:"claude",displayName:"Claude Code",cliCommand:"claude",get configDir(){return Fe(".claude")},contextFile:"CLAUDE.md",get skillsDir(){return Fe(".claude","skills")},commandsDir:".claude/commands",commandFormat:"md",settingsFile:"settings.json",projectSettingsFile:"settings.local.json",ignoreFile:".claudeignore",websiteUrl:"https://www.anthropic.com/claude",docsUrl:"https://docs.anthropic.com/claude-code",get defaultModel(){return Xr(this.name)},get supportedModels(){return Gr(this.name)},minCliVersion:"1.0.0"},ql={name:"gemini",displayName:"Gemini CLI",cliCommand:"gemini",get configDir(){return Fe(".gemini")},contextFile:"GEMINI.md",get skillsDir(){return Fe(".gemini","skills")},commandsDir:".gemini/commands",commandFormat:"toml",settingsFile:"settings.json",projectSettingsFile:"settings.json",ignoreFile:".geminiignore",websiteUrl:"https://geminicli.com",docsUrl:"https://geminicli.com/docs",get defaultModel(){return Xr(this.name)},get supportedModels(){return Gr(this.name)},minCliVersion:"1.0.0"},Lh={name:"antigravity",displayName:"Google Antigravity",cliCommand:null,get configDir(){return Fe(".gemini","antigravity")},contextFile:"ANTIGRAVITY.md",get skillsDir(){return Fe(".gemini","antigravity","global_skills")},commandsDir:".agent/skills",commandFormat:"md",settingsFile:"mcp_config.json",projectSettingsFile:null,ignoreFile:".agentignore",websiteUrl:"https://gemini.google.com/app/antigravity",docsUrl:"https://gemini.google.com/app/antigravity",get defaultModel(){return Xr(this.name)},get supportedModels(){return Gr(this.name)},minCliVersion:null},Dh={name:"cursor",displayName:"Cursor IDE",cliCommand:null,configDir:null,contextFile:"prjct.mdc",skillsDir:null,commandsDir:".cursor/commands",rulesDir:".cursor/rules",commandFormat:"md",settingsFile:null,projectSettingsFile:null,ignoreFile:".cursorignore",isProjectLevel:!0,websiteUrl:"https://cursor.com",docsUrl:"https://cursor.com/docs",get defaultModel(){return Xr(this.name)},get supportedModels(){return Gr(this.name)},minCliVersion:null},Vl={name:"codex",displayName:"OpenAI Codex",cliCommand:"codex",get configDir(){return Fe(".codex")},contextFile:"AGENTS.md",get skillsDir(){return Fe(".codex","skills")},commandsDir:".agents/skills",commandFormat:"md",settingsFile:null,projectSettingsFile:null,ignoreFile:".codexignore",websiteUrl:"https://openai.com/codex",docsUrl:"https://github.com/openai/codex",get defaultModel(){return Xr(this.name)},get supportedModels(){return Gr(this.name)},minCliVersion:null},Dn={claude:Xi,gemini:ql,cursor:Dh,antigravity:Lh,codex:Vl};a(Jl,"whichCommand");a(VC,"getCliVersion");a(Xl,"detectProvider");a(jh,"validateCliVersion");a(Kl,"detectAllProviders");a(jn,"getActiveProvider");a(qi,"getProviderBranding");a(JC,"detectAntigravity");a(On,"detectCodex");a(zl,"detectKimi");a(KC,"selectProvider")});var Oh={};P(Oh,{default:()=>ie});import zC from"node:crypto";import Vi from"node:fs/promises";import Te from"node:path";var Yl,YC,ie,ct=y(()=>{"use strict";se();de();zs();dh();er();Yl=class{static{a(this,"PathManager")}globalBaseDir;globalConfigDir;constructor(){this.globalBaseDir=Pn(),this.globalConfigDir=Te.join(this.globalBaseDir,"config")}get globalProjectsDir(){let e=process.env.PRJCT_PROJECTS_DIR;return e?Te.resolve(e):Te.join(this.globalBaseDir,"projects")}setGlobalBaseDir(e){this.globalBaseDir=Te.resolve(e),this.globalConfigDir=Te.join(this.globalBaseDir,"config")}generateProjectId(e){return zC.randomUUID()}getGlobalBasePath(){return this.globalBaseDir}getGlobalProjectPath(e){return Te.join(this.globalProjectsDir,e)}getLocalConfigPath(e){return Te.join(e,".prjct","prjct.config.json")}getGlobalProjectConfigPath(e){return Te.join(this.getGlobalProjectPath(e),"project.json")}getLegacyPrjctPath(e){return Te.join(e,".prjct")}async hasLegacyStructure(e){return await De(this.getLegacyPrjctPath(e))}async hasConfig(e){return await j(this.getLocalConfigPath(e))}async ensureGlobalStructure(){await Wt(this.globalBaseDir),await Wt(this.globalProjectsDir),await Wt(this.globalConfigDir)}async ensureProjectStructure(e){await this.ensureGlobalStructure();let n=this.getGlobalProjectPath(e),r=["analysis","memory"];for(let s of r)await Wt(Te.join(n,s));return await Wt(Te.join(n,"sessions")),n}getSessionPath(e,n=new Date){let{year:r,month:s,day:o}=th(n);return Te.join(this.getGlobalProjectPath(e),"sessions",r,s,o)}getCurrentSessionPath(e){return this.getSessionPath(e,new Date)}async ensureSessionPath(e,n=new Date){let r=this.getSessionPath(e,n);return await Wt(r),r}async listSessions(e,n=null,r=null){let s=Te.join(this.getGlobalProjectPath(e),"sessions"),o=[];try{let i=await Vi.readdir(s,{withFileTypes:!0});for(let c of i){if(!c.isDirectory()||n&&c.name!==n.toString())continue;let l=Te.join(s,c.name),u=await Vi.readdir(l,{withFileTypes:!0});for(let p of u){if(!p.isDirectory()||r&&p.name!==r.toString().padStart(2,"0"))continue;let d=Te.join(l,p.name),m=await Vi.readdir(d,{withFileTypes:!0});for(let g of m)g.isDirectory()&&o.push({year:c.name,month:p.name,day:g.name,path:Te.join(d,g.name),date:new Date(`${c.name}-${p.name}-${g.name}`)})}}return o.sort((c,l)=>l.date.getTime()-c.date.getTime()),o}catch{return[]}}async getSessionsInRange(e,n,r=new Date){return(await this.listSessions(e)).filter(o=>o.date>=n&&o.date<=r)}getFilePath(e,n,r){return Te.join(this.getGlobalProjectPath(e),n,r)}async listProjects(){try{return await this.ensureGlobalStructure(),(await Vi.readdir(this.globalProjectsDir,{withFileTypes:!0})).filter(n=>n.isDirectory()).map(n=>n.name)}catch{return[]}}async projectExists(e){return await De(this.getGlobalProjectPath(e))}getDisplayPath(e){let n=Br();return e.startsWith(n)?e.replace(n,"~"):e}getAuthConfigPath(){return Te.join(this.globalConfigDir,"auth.json")}getSyncPendingPath(e){return Te.join(this.getGlobalProjectPath(e),"sync","pending.json")}getLastSyncPath(e){return Te.join(this.getGlobalProjectPath(e),"sync","last-sync.json")}getRunningStatusPath(){return Te.join(this.globalBaseDir,".running")}getCachePath(){return Te.join(this.globalBaseDir,"cache")}getStatePath(){return Te.join(this.globalBaseDir,"state")}getStatusLinePath(){return Te.join(this.globalBaseDir,"statusline")}async getAgentDir(){return(await(bt(),Ks(no)).getActiveProvider()).configDir}async getAgentSettingsPath(){let e=await(bt(),Ks(no)).getActiveProvider();return(bt(),Ks(no)).getGlobalSettingsPath(e.name)}getClaudeDir(){return Fe(".claude")}getClaudeSettingsPath(){return Te.join(this.getClaudeDir(),"settings.json")}getStoragePath(e,n){return Te.join(this.getGlobalProjectPath(e),"storage",n)}getContextPath(e){return Te.join(this.getGlobalProjectPath(e),"context")}async detectMonorepo(e){return Ml(e)}async discoverMonorepoPackages(e,n){return $l(e,n)}async findContainingPackage(e,n){return uh(e,n)}async findMonorepoRoot(e){return Fl(e)}},YC=new Yl,ie=YC});import QC from"node:crypto";function Ie(t){let e=t.toLowerCase().replace(/\s+/g," ").trim();return QC.createHash("sha256").update(e).digest("hex")}var Mn=y(()=>{"use strict";a(Ie,"memoryFingerprint")});var Mh,$h=y(()=>{"use strict";Mh=`
|
|
11
11
|
-- =======================================================================
|
|
@@ -1496,7 +1496,7 @@ ${o.join(`
|
|
|
1496
1496
|
ORDER BY s.shipped_at DESC`,e);return[...n,...r.map(xa)]}catch{return[]}},allEntriesForIndex(t){try{let e=Bn(t,"ORDER BY created_at DESC, rowid DESC"),n=k.query(t,"SELECT id, name, type, shipped_at, data FROM shipped_features ORDER BY shipped_at DESC");return[...e,...n.map(xa)]}catch{return[]}}}});var _w={};P(_w,{FILE_INVENTORY_DOC_KEY:()=>Wd,buildFileInventory:()=>Sw,formatInventorySummary:()=>Gd,inventoryExtensions:()=>Ya,inventoryPathWeight:()=>Bd,languagesFromExtensions:()=>bw,loadFileInventory:()=>za,pathMatchesInventory:()=>Fo,refreshFileInventory:()=>bL,saveFileInventory:()=>vw});import yr from"node:path";async function Sw(t,e={}){let r=(await Tt(t,{skipDotfiles:!0,maxFiles:e.maxFiles??5e4})).filter(i=>{if(ww.test(i))return!1;let c=yr.basename(i);if(kw.test(c))return!1;let l=yr.extname(c).toLowerCase();return!!(l&&l!=="."&&!Tw.has(l))}),s=r.reduce((i,c)=>{let l=yr.extname(yr.basename(c)).toLowerCase();return i[l]=(i[l]??0)+1,i},Object.create(null)),o=bw(s);return{extensions:s,languages:o,fileCount:r.length,builtAt:new Date().toISOString(),projectHint:yr.basename(t)}}function bw(t){let e=new Set,n=Object.entries(t).sort((r,s)=>s[1]-r[1]);for(let[r]of n){let s=SL[r];s&&e.add(s)}return[...e]}function vw(t,e){w.setDoc(t,Wd,e)}function za(t){try{return w.getDoc(t,Wd)}catch{return null}}async function bL(t,e){let n=await Sw(e);return vw(t,n),n}function Ya(t){let e=za(t);return e?.extensions?new Set(Object.keys(e.extensions).map(n=>n.toLowerCase())):new Set}function Fo(t,e,n={}){let r=e.replace(/^\.\//,"").replace(/\\/g,"/").trim();if(!r||ww.test(r))return!1;let s=r.split("/").pop()??r;if(kw.test(s))return!1;let o=yr.extname(s).toLowerCase();return o?!Tw.has(o):r.includes("/")}function Bd(t,e){let n=e.replace(/^\.\//,"").replace(/\\/g,"/").trim(),r=n.split("/").pop()??n,s=yr.extname(r).toLowerCase();if(!s)return .7;let o=Ya(t);return o.size===0||o.has(s)?1:.45}function Gd(t){if(!t||Object.keys(t.extensions).length===0)return"File inventory: empty \u2014 run `prjct sync` to discover languages/extensions.";let e=Object.entries(t.extensions).sort((r,s)=>s[1]-r[1]).slice(0,12).map(([r,s])=>`${r}\xD7${s}`).join(" "),n=t.languages.length>0?t.languages.join(", "):"unknown";return`File inventory: ${t.fileCount} files \xB7 langs: ${n} \xB7 ${e}`}var Wd,kw,ww,Tw,SL,Xd=y(()=>{"use strict";O();de();Wd="file-inventory",kw=/^(package-lock\.json|pnpm-lock\.yaml|yarn\.lock|bun\.lockb?|composer\.lock|Cargo\.lock|poetry\.lock|CHANGELOG(\.md)?|LICENSE(\.md)?|\.DS_Store)$/i,ww=/(^|\/)(node_modules|dist|build|\.git|coverage|\.next|target|vendor)(\/|$)/i,Tw=new Set([".png",".jpg",".jpeg",".gif",".webp",".ico",".woff",".woff2",".ttf",".eot",".mp4",".mp3",".zip",".gz",".tar",".wasm",".exe",".dll",".so",".dylib",".bin",".pdf",".ico"]),SL={".ts":"TypeScript",".tsx":"TypeScript",".js":"JavaScript",".jsx":"JavaScript",".mjs":"JavaScript",".cjs":"JavaScript",".vue":"Vue",".svelte":"Svelte",".py":"Python",".go":"Go",".rs":"Rust",".java":"Java",".kt":"Kotlin",".kts":"Kotlin",".swift":"Swift",".rb":"Ruby",".php":"PHP",".cs":"C#",".fs":"F#",".cpp":"C++",".cc":"C++",".c":"C",".h":"C/C++",".hpp":"C++",".m":"Objective-C",".mm":"Objective-C++",".scala":"Scala",".clj":"Clojure",".ex":"Elixir",".exs":"Elixir",".erl":"Erlang",".hs":"Haskell",".lua":"Lua",".r":"R",".dart":"Dart",".sql":"SQL",".graphql":"GraphQL",".gql":"GraphQL",".proto":"Protobuf",".md":"Markdown",".mdx":"MDX",".json":"JSON",".yml":"YAML",".yaml":"YAML",".toml":"TOML",".css":"CSS",".scss":"SCSS",".sass":"Sass",".less":"Less",".html":"HTML",".htm":"HTML",".sh":"Shell",".bash":"Shell",".zsh":"Shell",".ps1":"PowerShell",".swiftui":"Swift"};a(Sw,"buildFileInventory");a(bw,"languagesFromExtensions");a(vw,"saveFileInventory");a(za,"loadFileInventory");a(bL,"refreshFileInventory");a(Ya,"inventoryExtensions");a(Fo,"pathMatchesInventory");a(Bd,"inventoryPathWeight");a(Gd,"formatInventorySummary")});function xw(t,e,n=8){let r=e.map(m=>m.trim()).filter(Boolean),s=!!We(t),o=!!vt(t),i=new Map;if(r.length>0&&s)try{for(let m of Vr(r,We(t),2)){if(r.some(h=>h.endsWith(m.path)||m.path.endsWith(h)))continue;let g=i.get(m.path)??{score:0,via:new Set};g.score+=m.score,g.via.add("imports"),i.set(m.path,g)}}catch{}if(r.length>0&&o)try{for(let m of sr(r,vt(t))){if(r.some(h=>h.endsWith(m.path)||m.path.endsWith(h)))continue;let g=i.get(m.path)??{score:0,via:new Set};g.score+=m.score,g.via.add("cochange"),i.set(m.path,g)}}catch{}let c=[...i.entries()].map(([m,g])=>({path:m,score:g.score,via:g.via.size>1?"both":[...g.via][0]??"imports"})).sort((m,g)=>g.score-m.score).slice(0,n),l=[];for(let m of r.slice(0,5))try{let g=F.recallForFile(t,m,2,{preventiveOnly:!0});for(let h of g)l.push({id:h.id,type:h.type,title:h.content.replace(/\s+/g," ").trim().slice(0,100),file:m})}catch{}let u=c.length>0?`related=${c.slice(0,3).map(m=>m.path.split("/").pop()).join(",")}`:s||o?"related=none-strong":"indexes=cold",p=l.length>0?`traps=${l.length}`:"traps=0",d=r.length===0?"World model: no seed files":`World model impact: seeds=${r.length} \xB7 ${u} \xB7 ${p}`;return{seeds:r,neighbors:c,traps:l.slice(0,n),line:d,hasIndexes:{imports:s,cochange:o}}}var Rw=y(()=>{"use strict";Jr();mn();Se();a(xw,"breakImpact")});var qd={};P(qd,{enrichedRecall:()=>Qa});async function Qa(t,e,n={}){let{topic:r,types:s,tags:o}=n,i=n.limit??30,c=r?(()=>{let f=r.split(/\s+/).filter(Boolean);try{return F.searchFts(e,f,i).filter(S=>(!s||s.includes(S.type))&&(!o||bo(S,o)))}catch{return[]}})():[],l=c.length>0?c:F.recall(e,{topic:r,types:s,tags:o,limit:i}).slice(0,i),p=(r?await(async()=>{try{let f=await X.readConfig(t);if(f&&Ud.isEnabled(f)){let T=await Ud.semanticSearch(e,r,f,10);if(T.length>0){let S=new Set(l.map(C=>C.id));return[...T.filter(C=>!S.has(C.id)&&(!s||s.includes(C.type))&&(!o||bo(C,o))),...l].slice(0,i)}}return l}catch{return l}})():l).filter(f=>zt(f)||(s?.includes(f.type)??!1)),d=s?.includes("improvement-signal")?p:await(async()=>{try{let{isAutoSource:f}=await Promise.resolve().then(()=>(gs(),Pd)),T=45*864e5,S=Date.now(),_=p.filter(b=>{if(!f(b.tags?.source)||vL.has(b.type)&&!f(b.tags?.source))return!0;let R=Date.parse(b.rememberedAt);return Number.isFinite(R)?S-R<T:!0}),C=_.filter(b=>!f(b.tags?.source)),E=_.filter(b=>f(b.tags?.source));return[...C,...E].slice(0,Math.max(i,_.length))}catch{return p}})(),m=d.length>1?Yt.rerank(e,d):d,g=n.expandLinks!==!1&&m.length>0?F.expandWithLinks(e,m,5):[],h=g.length>0?m.concat(g):m;try{let f=await Z.getCurrentTask(e),T=new Date().toISOString();f?.id&&Yt.recordSurfaced(e,h.map(S=>S.id),f.id,T,{queryText:r,surface:"context-memory"});for(let S of h)Yt.recordFetch(e,S.id,T)}catch{}return h}var vL,Za=y(()=>{"use strict";Oe();Ma();Wn();dt();Fn();Se();vL=new Set(["decision","gotcha","learning","fact","feedback","spec"]);a(Qa,"enrichedRecall")});var zd={};P(zd,{extractFilePathsFromEntries:()=>Jd,formatWorkScopeBlock:()=>jw,isUsefulScopePath:()=>RL,resolveWorkScope:()=>_L,resolveWorkScopeSync:()=>Vd,toLikelyFileHits:()=>Kd});function Vd(t,e,n=Aw){let r=e.trim();if(!r)return Dw();let s=Iw(t,r);return Nw(t,r,s,n)}async function _L(t,e,n,r=Aw){let s=n.trim();if(!s)return Dw();let o=new Set(Iw(e,s));try{let{enrichedRecall:i}=await Promise.resolve().then(()=>(Za(),qd)),c=await i(t,e,{topic:s,types:["context","decision","gotcha","anti-pattern","learning"],limit:12});for(let l of Jd(c,e))o.add(l)}catch{}return Nw(e,s,o,r)}function Nw(t,e,n,r){let s=ZE(t),o=new Map,i=za(t),c=Ya(t),l=a((f,T,S,_)=>{if(!Fo(t,f))return;let C=T*Bd(t,f),E=o.get(f);if(!E){o.set(f,{path:f,score:C,signals:[S],reason:_});return}E.score+=C,E.signals.includes(S)||E.signals.push(S),C>=.4&&(E.reason=_)},"bump");for(let f of n)l(f,xL(f,c),"memory","linked from project judgment memory (decision/gotcha/context)");let u=(()=>{if(!(s.bm25||s.symbols))return[];try{return QE(t,e,{topN:Math.max(r*2,12)})}catch{return[]}})();for(let f of u){let T=f.signals.symbols??0,S=[f.signals.bm25>0?"bm25":null,T>0?"symbols":null,f.signals.imports>0?"imports":null,f.signals.cochange>0?"cochange":null].filter(E=>E!==null),_=Math.max(f.signals.bm25,T,f.signals.imports,f.signals.cochange),C=T>=_&&T>0?"matches function/class/route symbols in code graph":f.signals.bm25>=f.signals.imports&&f.signals.bm25>=f.signals.cochange?"matches task terms in code index (BM25)":f.signals.imports>=f.signals.cochange?"import-graph neighbor of matched files":"historically co-changes with matched files";l(f.path,f.finalScore,S[0]??"bm25",C);for(let E of S.slice(1)){let b=o.get(f.path);b&&!b.signals.includes(E)&&b.signals.push(E)}}let p=u.length,d=[...o.keys()].slice(0,5);d.length===0&&n.size>0&&d.push(...[...n].slice(0,5));let m=(()=>{if(d.length===0)return null;try{return xw(t,d,r)}catch{return null}})();if(m)for(let f of m.neighbors)l(f.path,.35*Math.min(1,f.score+.1),f.via==="both"?"imports":f.via,f.via==="cochange"?"historically co-changes with seed files":"import-graph neighbor of seed files");let g=m?.neighbors.length??0,h=[...o.values()].sort((f,T)=>T.score-f.score).slice(0,r);return{files:h,indexesReady:s.bm25||s.imports||s.cochange||s.symbols,sources:{memorySeeds:n.size,indexHits:p,graphNeighbors:g},agentBlock:jw(h,{indexesReady:s.bm25||s.imports||s.cochange||s.symbols,memorySeeds:n.size,inventoryLine:Gd(i)})}}function Iw(t,e){let n=new Set;try{let r=e.split(/\s+/).filter(i=>i.length>2).slice(0,12),s=r.length>0?(()=>{try{return F.searchFts(t,r,15)}catch{return[]}})():[],o=s.length>0?s:F.recall(t,{types:["gotcha","decision","anti-pattern","context"],limit:20});for(let i of Jd(o,t))n.add(i)}catch{}return n}function Jd(t,e){let n=new Set,r=a(s=>{let o=Pw(s);o&&(e?Fo(e,o)&&n.add(o):Lw(o)&&n.add(o))},"accept");for(let s of t){let o=s.tags?.file?.trim();o&&r(o);let i=s.tags?.files?.trim();if(i)for(let l of i.split(",")){let u=l.trim();u&&r(u)}let c=s.content??"";Cw.lastIndex=0;for(let l of c.matchAll(Cw))r(l[1])}return[...n]}function Pw(t){return t.replace(/^\.\//,"").replace(/\\/g,"/")}function Lw(t){let e=Pw(t).trim();return!e||e.length<3?!1:e.includes("/")&&e.includes(".")}function xL(t,e){let n=(t.split("/").pop()??t).toLowerCase(),r=n.includes(".")?`.${n.split(".").pop()}`:"";return n==="package.json"||n==="cargo.toml"||n==="go.mod"?.4:e.size>0&&r&&e.has(r)?t.includes("/")?.9:.75:t.includes("/")&&n.includes(".")?.7:.5}function Dw(){return{files:[],indexesReady:!1,sources:{memorySeeds:0,indexHits:0,graphNeighbors:0},agentBlock:""}}function jw(t,e){if(t.length===0)return e?.indexesReady===!1?["**Work scope (prjct):** indexes cold \u2014 run `prjct sync` once, then re-resolve scope.",e.inventoryLine?`_${e.inventoryLine}_`:"","Until then: prefer `prjct search` / `prjct context memory <topic>` over raw Grep/Glob walks."].filter(Boolean).join(`
|
|
1497
1497
|
`):["**Work scope (prjct):** no high-confidence file hits for this query.",e?.inventoryLine?`_${e.inventoryLine}_`:"","MUST still try `prjct context memory <topic>` + `prjct search` before a broad Grep/Glob walk."].filter(Boolean).join(`
|
|
1498
1498
|
`);let n=["**Work scope \u2014 prjct (MUST read before Grep/Glob):**","> Do NOT walk the tree. Open these first. Expand only via `prjct guard <file>` (graph neighbors + traps) or MCP `prjct_relevant_files` / `prjct_impact_analysis`.",...t.map(r=>{let s=r.signals.length>0?` (${r.signals.join("+")})`:"";return`- \`${r.path}\` \u2014 ${r.reason}${s}`})];return e?.memorySeeds&&e.memorySeeds>0&&n.push(`_Seeded from ${e.memorySeeds} memory path hit(s) + code index + graph._`),e?.inventoryLine&&n.push(`_${e.inventoryLine}_`),n.join(`
|
|
1499
|
-
`)}function Kd(t){return t.map(({path:e,signals:n,reason:r})=>({path:e,signals:n,reason:r}))}function RL(t,e){return e?Fo(e,t):Lw(t)}var Aw,Cw,ec=y(()=>{"use strict";ek();Se();Xd();Rw();Aw=8,Cw=/(?:^|[\s`"'(])((?:@?[\w.-]+\/)+[\w.-]+\.[\w.-]+)(?:$|[\s`"'),;:])/g;a(Vd,"resolveWorkScopeSync");a(_L,"resolveWorkScope");a(Nw,"mergeScope");a(Iw,"memoryFileSeedsSync");a(Jd,"extractFilePathsFromEntries");a(Pw,"normalizePath");a(Lw,"looksLikeRepoPath");a(xL,"memorySeedWeight");a(Dw,"emptyResult");a(jw,"formatWorkScopeBlock");a(Kd,"toLikelyFileHits");a(RL,"isUsefulScopePath")});var tc,CL,AL,Mw=y(()=>{"use strict";tc=[{name:"intent",group:"core",surface:"ai-agile",routing:{group:"spec",method:"draft"},routingMode:"cold-only",optionSchema:{strings:["goal","tags"]},description:"Frame the work brief: objective, constraints, risks, and success signal",usage:{claude:'p. intent "<title>"',terminal:'prjct intent "<title>" [--goal "..."] [--tags k:v,...]'},params:'"<title>" [--goal] [--tags]',implemented:!0,hasTemplate:!1,requiresProject:!0,features:["v3 work-cycle replacement for ticket-style planning","Stores the durable brief in SQLite","Sub-verbs mirror spec for compatibility: list, show, update, audit, link-work, ship"]},{name:"work",group:"core",surface:"ai-agile",routing:{group:"workflow",method:"now"},optionSchema:{strings:["spec","geometry"],booleans:["extend"]},description:"Start or inspect a work cycle with context and evidence",usage:{claude:'p. work "<intent>"',terminal:'prjct work "<intent>" [--geometry split|single|direct]'},params:"[intent] [--geometry]",implemented:!0,hasTemplate:!0,requiresProject:!0,features:["v3 name for the execution cycle formerly exposed as task","No arg \u2192 shows the active work cycle","Surfaces related context before planning/editing","Captures harness/evidence expectations for the cycle"]},{name:"init",group:"core",surface:"support",routing:{group:"planning",method:"init"},description:"Deep project analysis and initialization",usage:{claude:'p. init "[idea]"',terminal:'prjct init "[idea]" [--yes] [--pack code,daily]'},params:"[idea] [--yes]",implemented:!0,hasTemplate:!0,requiresProject:!1,requiresLlm:!0,features:["Architect mode for blank projects","Auto tech stack recommendation","Analyzes existing codebases","`--yes` skips wizard (CI / 60s quickstart)"]},{name:"quickstart",group:"core",surface:"support",routing:{group:"planning",method:"quickstart"},optionSchema:{strings:["pack"]},description:"One-shot init + packs + agent surfaces (\u224860s install)",usage:{claude:"p. quickstart",terminal:"prjct quickstart [--pack code,daily]"},params:"[--pack]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Non-interactive init --yes","Default packs + AGENTS/CLAUDE routing","Prints three next verbs for the agent"]},{name:"task",group:"legacy",surface:"legacy",routing:{group:"workflow",method:"now"},optionSchema:{strings:["spec"],booleans:["extend"]},description:"Compatibility alias for `work`",usage:{claude:null,terminal:'prjct task "<description>"'},params:"[description]",implemented:!0,hasTemplate:!0,requiresProject:!0,features:["No arg \u2192 shows the active task (or none)","Deprecated public language: use `prjct work` for the v3 work cycle","Auto-harness classifies H0-H3 and stores expected evidence on the task","Writes to stateStorage; runs before/after workflow rules","Optional Linear issue link when the arg matches `[A-Z]+-\\d+`"]},{name:"ship",group:"core",surface:"ai-agile",routing:{group:"shipping",method:"ship"},optionSchema:{booleans:["skipHooks","noSpecGate","noTestGate","allowNewDeps","forcePressure","noJudgmentGate"],strings:["intent","geometry"]},description:"Commit, push, and celebrate shipped feature",usage:{claude:'p. ship ["feature"]',terminal:'prjct ship ["feature"]'},params:"[feature]",implemented:!0,hasTemplate:!0,requiresProject:!0,requiresLlm:!0,features:["No arg \u2192 ships the active task description, or derives a summary from the branch"]},{name:"sync",group:"core",surface:"ai-agile",routing:{group:"analysis",method:"sync"},description:"Sync project state and update workflow agents",usage:{claude:"p. sync",terminal:"prjct sync [--package=<name>] [--full]"},implemented:!0,hasTemplate:!0,requiresProject:!0,requiresLlm:!0,features:["Incremental sync: only re-analyzes changed files (default)","Force full sync: --full bypasses incremental cache","Monorepo support: --package=<name> for single package sync","Nested PRJCT.md inheritance","Per-package CLAUDE.md generation"]},{name:"eval",group:"optional",surface:"support",routing:{group:"eval",method:"eval"},optionSchema:{booleans:["publish","dryRun","json"],strings:["baseline","candidate","source","target","file"]},description:"Run product evals, compare versions, and publish actionable results",usage:{claude:"p. eval run [--candidate <version>] [--publish]",terminal:"prjct eval <run|compare|report|publish> [--baseline <version>] [--candidate <version>] [--target cloud] [--dry-run]"},params:"[run|compare|report|publish]",implemented:!0,hasTemplate:!1,requiresProject:!1,requiresLlm:!1,features:["Deterministic local eval runs stored under PRJCT_CLI_HOME/evals","Version comparisons with regression/improvement actionables","Cloud publication for shared benchmark history with server-side ownership and subscription checks"]},{name:"status",group:"legacy",surface:"legacy",routing:{group:"primitives",method:"status"},optionSchema:{strings:["tokensIn","tokensOut"]},description:"Compatibility lifecycle escape hatch; prefer `work` outcomes",usage:{claude:null,terminal:"prjct status <value>"},params:"[value]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["No args \u2192 prints active task + current status","Workflows are the primary status-change mechanism; this is the escape"]},{name:"tag",group:"legacy",surface:"legacy",routing:{group:"primitives",method:"tag"},optionSchema:{},description:"Compatibility metadata escape hatch; prefer synthesized context tags",usage:{claude:null,terminal:"prjct tag type:bug domain:auth"},params:"<pairs...>",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Claude decides what to tag \u2014 no heuristic classifier","type:<feature|bug|improvement|chore> promotes to tasks.type"]},{name:"remember",group:"core",surface:"ai-agile",routing:{group:"primitives",method:"remember"},optionSchema:{strings:["tags"],booleans:["force","global"]},description:"Capture a project memory entry (fact, decision, learning, gotcha, \u2026)",usage:{claude:'p. remember learning "message"',terminal:'prjct remember learning "message" --tags domain:auth'},params:'<type> "<content>" [--tags k:v,...]',implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Types: fact, decision, learning, gotcha, pattern, anti-pattern, shipped, inbox, todo, idea, insight, question, source, person \u2014 plus user-defined","Grows the project memory consumable via `prjct context memory`"]},{name:"forget",group:"core",surface:"ai-agile",routing:{group:"primitives",method:"forget"},optionSchema:{},description:"Delete a project memory entry by id (the delete half of `remember`)",usage:{claude:"p. forget mem_1234",terminal:"prjct forget mem_1234 [--md]"},params:"<id>",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Accepts `mem_1234`, `mem-1234`, or a bare `1234`","Hard-deletes the source event + drops the FTS mirror and any embedding \u2014 cannot resurface lexically or semantically"]},{name:"close",group:"core",surface:"ai-agile",routing:{group:"primitives",method:"close"},optionSchema:{strings:["reason"]},description:"Resolve/close a memory entry (inbox, signal, trap) so it leaves rotation \u2014 soft-delete + closed tag",usage:{claude:'p. close mem_1234 --reason "fixed in PR"',terminal:'prjct close mem_1234 [--reason "..."] [--md]'},params:"<id>",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Soft-removes from recall/FTS/embeddings; records status:closed for audit","Use for resolved inbox/improvement-signals \u2014 prefer over silent forget when the resolution matters"]},{name:"capture",group:"legacy",surface:"legacy",routing:{group:"capture",method:"capture"},optionSchema:{strings:["tags"],booleans:["force","fromCurrent"]},description:"Compatibility inbox fallback; prefer synthesized `remember context`",usage:{claude:null,terminal:'prjct capture "call Ana re pricing" --tags domain:sales'},params:'"<content>" [--tags k:v,...]',implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Writes memory type=inbox; Claude retypes later via a clarify workflow","No task id, no branch, no worktree \u2014 just persists",'Bare `prjct "<text>"` auto-routes to `capture`']},{name:"seed",group:"setup",surface:"support",routing:{group:"seed",method:"seed"},routingMode:"bin-only",optionSchema:{},description:"Manage declarative packs (persona, memory types, workflow slots, hook signals)",usage:{claude:"p. seed list",terminal:"prjct seed add pm,daily"},params:"[add|remove|list|suggest] [pack,pack,...]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Packs declare signals only \u2014 no bash is written","Add or remove multi-persona contexts per project","Auto-detect suggestion from project stack"]},{name:"mcp",group:"setup",surface:"support",routing:{group:"mcp",method:"mcp"},routingMode:"bin-only",optionSchema:{},description:"Toggle MCP servers per-project \u2014 interactive multi-select in your terminal, list/deny/allow for scripts",usage:{claude:"p. mcp list",terminal:"prjct mcp"},params:"[list|status|deny|allow] [serverName]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Interactive multi-select with live tool-cost delta (default UX in TTY)","Project-local \u2014 writes only to .claude/settings.local.json","Knows the well-known cloud MCPs from claude.ai (PostHog, Atlassian, etc.)","Headless list/deny/allow for LLM agents and scripts (--md flag)"]},{name:"install",group:"setup",surface:"support",routing:{group:"install",method:"install"},routingMode:"bin-only",optionSchema:{},description:"Install universal agent surfaces, Claude hooks, and Codex config",usage:{claude:"p. install",terminal:"prjct install"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Inside a prjct project, refreshes AGENTS.md as the portable baseline","Writes Claude passive hooks: SessionStart, UserPromptSubmit, \u2026","Repairs detected Codex config.toml with prjct MCP and TUI status_line","Idempotent; existing non-prjct hooks stay intact","Audit agent support with `prjct agents doctor`"]},{name:"help",group:"setup",surface:"support",routingMode:"bin-only",description:"Contextual help and guidance",usage:{claude:"p. help [topic]",terminal:"prjct help [topic]"},params:"[topic]",implemented:!0,hasTemplate:!0,requiresProject:!1},{name:"analysis-save-llm",group:"optional",surface:"internal",routing:{group:"analysis",method:"saveLlmAnalysis"},description:"Persist analysis notes produced by an LLM run",usage:{claude:null,terminal:"prjct analysis-save-llm <file|text|json>"},params:"<file|text|json>",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0},{name:"analyze",group:"legacy",surface:"legacy",routing:{group:"analysis",method:"analyze"},description:"Compatibility alias for sync analysis",usage:{claude:null,terminal:"prjct analyze"},implemented:!0,hasTemplate:!0,requiresProject:!0,isOptional:!0,requiresLlm:!0},{name:"code",group:"optional",surface:"support",routing:{group:"code",method:"code"},optionSchema:{},description:"Structural code graph: symbols, trace, impact/risk, architecture (run after sync)",usage:{claude:"p. code [symbols|trace|impact|architecture|dead|export|import|push-graph|reindex|cbm]",terminal:"prjct code [symbols|trace|impact|architecture|dead|export|import|push-graph|reindex|cbm]"},params:"[symbols|trace|impact|architecture|dead|export|import|push-graph|reindex|cbm] [args]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Symbol index on sync; 4th work-scope signal; CALLS with enclosing + imports","trace / impact (hunk-level) / architecture / dead one-shots","Per-project cache under ~/.prjct-cli/projects/<id>/ (never in client repo)","push-graph: full Function/Class/File + CALLS/IMPORTS graph \u2192 cloud 3D (no node/link caps)","PreToolUse Grep|Glob augment; ship structural risk cue; optional CBM cli"]},{name:"lean",group:"optional",surface:"support",routing:{group:"lean",method:"lean"},optionSchema:{},description:"Anti-over-engineering: set intensity, review/audit/debt (read-only)",usage:{claude:"p. lean [review|audit|debt|off|lite|full|ultra]",terminal:"prjct lean [sub]"},params:"[review|audit|debt|off|lite|full|ultra]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["No arg \u2192 show active intensity mode + a one-screen summary","review/audit/debt are advisory \u2014 no gate, no source writes","off|lite|full|ultra sets the intensity (mirrors ponytail modes)"]},{name:"tdd",group:"optional",surface:"support",routing:{group:"tdd",method:"tdd"},optionSchema:{},description:"Test-Driven Development: set intensity, run the test command (check)",usage:{claude:"p. tdd [check|off|assist|strict]",terminal:"prjct tdd [sub]"},params:"[check|off|assist|strict]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["No arg \u2192 show mode + the auto-detected test command","off|assist|strict sets the intensity (opt-in, like lean)","check runs the detected test command now (red/green) \u2014 the real gate"]},{name:"judgment",group:"optional",surface:"support",routing:{group:"judgment",method:"judgment"},optionSchema:{booleans:["md"]},description:"Precision judgment v2: evidence tax, DNA, RED/BLUE merge, ghosts, next card, ship gate",usage:{claude:"p. judgment [plan|open|add|merge|challenge|next|approve|\u2026]",terminal:"prjct judgment [sub]"},params:"[plan|open|add|merge|challenge|fix-round|fixed|verify|brief|next|ghosts|approve|escalate|status|clear]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["next \u2192 machine directive card (agent loop never re-derives state)","evidence tax + finding DNA + project ghost FP memory","RED/BLUE dual-blind merge; contradiction auto-escalates","code-strict ship hard-gates on ledger.approved before task complete"]},{name:"sdd",group:"optional",surface:"support",routing:{group:"sdd",method:"sdd"},optionSchema:{},description:"Spec-Driven Development: gate the spec pipeline (off/advisory/strict)",usage:{claude:"p. sdd [off|advisory|strict]",terminal:"prjct sdd [sub]"},params:"[off|advisory|strict]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["No arg \u2192 show mode + the active task spec station (pipeline checklist)","off|advisory|strict sets the intensity (opt-in, like lean)","strict: every task needs a reviewed spec; ship blocks unspecced work"]},{name:"notify",group:"setup",surface:"support",routing:{group:"notify",method:"notify"},optionSchema:{},description:"Desktop notifications (default on): ping on Claude-waiting + subagent-finished",usage:{claude:"p. notify [on|off]",terminal:"prjct notify [on|off]"},params:"[on|off]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Default ON \u2014 pings when Claude is waiting or a subagent finishes","No arg \u2192 show mode + what fires","off silences OS notifications (per-prompt work-state block stays)"]},{name:"agents",group:"setup",surface:"support",routing:{group:"agents",method:"agents"},optionSchema:{booleans:["fix"]},description:"Show the concrete compatibility matrix for AI coding agents (doctor) or harness surface map (surfaces)",usage:{claude:"p. agents [doctor|surfaces|doctor --fix]",terminal:"prjct agents [doctor|surfaces [--detail]|doctor --fix]"},params:"[doctor|status|list|surfaces] [--fix] [--detail]",implemented:!0,hasTemplate:!1,requiresProject:!1,isOptional:!0,features:["Derives support levels from the runtime registry","Reports AGENTS.md, MCP, skills, hooks, ACP, and project-rule support","surfaces: benchmark-tier harness map (hooks/MCP/skills wire status)","doctor --fix refreshes repo-local agent surfaces when run inside a project",'Use this to audit claims like "works with Codex/Gemini/OpenCode/Cursor/Grok"']},{name:"value",group:"legacy",surface:"legacy",routing:{group:"product",method:"value"},optionSchema:{},description:"Compatibility alias for `insights value`",usage:{claude:null,terminal:"prjct value [--md]"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Scores project continuity from real SQLite data","Counts durable memory, preventive guardrails, shipped work, sync metrics, and agent coverage","Designed as the paid-tier proof screen for humans and agents"]},{name:"memory-doctor",group:"legacy",surface:"legacy",routing:{group:"product",method:"memoryDoctor"},optionSchema:{},description:"Compatibility alias for `insights quality`",usage:{claude:null,terminal:"prjct memory-doctor [--md]"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Finds duplicate groups, stale inbox entries, low-signal memories, and missing types","Read-only by default; recommends exact cleanup actions","Protects recall quality across Claude, Codex, Gemini, OpenCode, and future agents"]},{name:"report",group:"legacy",surface:"legacy",routing:{group:"product",method:"report"},optionSchema:{numbers:["days"]},description:"Compatibility alias for `insights report`",usage:{claude:null,terminal:"prjct report [days] [--md]"},params:"[days]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Summarizes shipped features, completed tasks, active work, and carry-forward lessons","Uses real project state instead of a marketing changelog","Useful for founders, teams, and paid Cloud status emails"]},{name:"handoff",group:"legacy",surface:"legacy",routing:{group:"product",method:"handoff"},optionSchema:{},description:'Static continuation brief for another agent. For realtime ownership transfer use `prjct switch <agent> --reason "\u2026"` + `prjct accept`.',usage:{claude:null,terminal:"prjct handoff codex [--md]"},params:"[agent]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Gives the next agent the active task, required prjct checks, and high-value memories","Works across Codex, Claude, Gemini, Cursor, OpenCode, Qwen, Kimi, Grok, and unknown future agents","For stuck same-branch rescue with ownership transfer: prjct switch / accept (not this alias)"]},{name:"guardrails",group:"legacy",surface:"legacy",routing:{group:"product",method:"guardrails"},optionSchema:{},description:"Compatibility alias for `insights guardrails`",usage:{claude:null,terminal:"prjct guardrails [--md]"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Checks changed files against preventive memory","Falls back to general project traps when no file-specific hit exists","Advisory only; no gate, no mutation"]},{name:"insights",group:"optional",surface:"ai-agile",routing:{group:"product",method:"insights"},optionSchema:{numbers:["days"]},description:"Harness intelligence: value, quality, reliability, token cost, reports, continuation, and guardrails",usage:{claude:"p. insights [value|quality|reliability|cost|report|continue|guardrails]",terminal:"prjct insights [value|quality|reliability|cost|report|continue|guardrails] [--md]"},params:"[value|quality|reliability|cost|report|continue|guardrails] [agent|days]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["v3 surface for project intelligence formerly spread across value/report/handoff/memory-doctor/guardrails","Default view summarizes whether the project is compounding","reliability/trust shows whether value, cost, and performance metrics are decision-ready","cost/spend/tokens shows subscription burn, token coverage, context reuse, and capture gaps","Subcommands remain read-only except where underlying compatibility commands already mutate nothing"]},{name:"performance",group:"optional",surface:"ai-agile",routing:{group:"product",method:"performance"},optionSchema:{numbers:["days"]},description:"Measure dev+LLM efficiency per work cycle: time, tokens, model/runtime, tools, friction",usage:{claude:"p. performance [7]",terminal:"prjct performance [days] [--md]"},params:"[days]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Uses real task/session rows and available token columns","Stores unknown when a runtime does not expose exact model/token data","Designed to guide the next work cycle, not to create scrum velocity reports"]},{name:"cloud",group:"setup",surface:"support",routing:{group:"cloud",method:"cloud"},optionSchema:{},description:"Cloud sync (paid): connect/disconnect projects, sync/pull, pause/resume, list, status",usage:{claude:"p. cloud [link|unlink|projects|sync|pull|pause|resume|status] [--all|--interactive|--yes]",terminal:"prjct cloud [sub] [--all|--interactive|--yes]"},params:"[link|unlink|projects|sync|pull|pause|resume|status] [--all|--interactive|--yes]",implemented:!0,hasTemplate:!1,requiresProject:!1,isOptional:!0,features:["Local-first: nothing leaves until `prjct connect` / `prjct cloud link`","One project (cwd), one-by-one (--interactive), or all (--all --yes)","Disconnect is soft \u2014 cloud history kept; local vault untouched","Auto-syncs on `prjct ship` and at session end once connected"]},{name:"connect",group:"setup",surface:"support",routing:{group:"cloud",method:"connect"},optionSchema:{},description:"Connect this project to Cloud Sync (alias of `prjct cloud link`)",usage:{claude:"p. connect [--all|--interactive|--yes]",terminal:"prjct connect [--all|--interactive|--yes]"},params:"[--all|--interactive|--yes]",implemented:!0,hasTemplate:!1,requiresProject:!1,isOptional:!0,features:["cwd: connect one repo after `prjct login`","--all --yes: bulk connect (confirm with human first)","--interactive: one-by-one Y/n (TTY)"]},{name:"disconnect",group:"setup",surface:"support",routing:{group:"cloud",method:"disconnect"},optionSchema:{},description:"Disconnect this project from Cloud Sync (alias of `prjct cloud unlink`)",usage:{claude:"p. disconnect [--all|--yes]",terminal:"prjct disconnect [--all|--yes]"},params:"[--all|--yes]",implemented:!0,hasTemplate:!1,requiresProject:!1,isOptional:!0,features:["Soft disconnect \u2014 leaves Cloud list; records kept; local vault untouched","Re-connect with `prjct connect`","--all --yes: bulk disconnect after human confirm"]},{name:"workflow",group:"optional",surface:"support",routing:{group:"workflow",method:"workflow"},optionSchema:{},description:"Configure workflow hooks via natural language",usage:{claude:'p. workflow ["config"]',terminal:'prjct workflow ["config"]'},params:'["natural language config"]',implemented:!0,hasTemplate:!0,requiresProject:!0,isOptional:!0,requiresLlm:!0,features:["Natural language configuration","Before/after hooks for task, done, ship, sync","Permanent, session, or one-time preferences"]},{name:"start",group:"setup",surface:"support",routing:{group:"setup",method:"start"},routingMode:"bin-only",description:"First-time setup (install commands to editors)",usage:{claude:null,terminal:"prjct start"},implemented:!0,hasTemplate:!1,requiresProject:!1},{name:"setup",group:"setup",surface:"support",routing:{group:"setup",method:"setup"},routingMode:"bin-only",description:"Reconfigure editor installations and user-owned defaults",usage:{claude:"p. setup",terminal:"prjct setup"},params:"[--force] [--non-interactive]",implemented:!0,hasTemplate:!0,requiresProject:!1},{name:"login",group:"setup",surface:"support",routing:{group:"setup",method:"login"},description:"Authenticate with prjct cloud (opens browser)",usage:{claude:null,terminal:"prjct login"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!1,routingMode:"bin-only"},{name:"logout",group:"setup",surface:"support",routing:{group:"setup",method:"logout"},description:"Sign out from prjct cloud",usage:{claude:null,terminal:"prjct logout"},implemented:!0,hasTemplate:!1,requiresProject:!1,routingMode:"bin-only"},{name:"auth",group:"setup",surface:"support",routing:{group:"setup",method:"auth"},description:"Manage cloud authentication",usage:{claude:"p. auth [action]",terminal:"prjct auth [action]"},params:"[logout|status]",implemented:!0,hasTemplate:!1,requiresProject:!1,routingMode:"bin-only"},{name:"context",group:"setup",surface:"support",routing:{group:"context",method:"context"},routingMode:"bin-only",optionSchema:{},description:"Smart context filtering tools for AI agents",usage:{claude:null,terminal:"prjct context <tool> [args]"},params:"<tool> [args]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["files - Find relevant files for a task","signatures - Extract code structure (~90% compression)","imports - Analyze dependency graphs","recent - Find hot files from git history","summary - Intelligent file summarization"]},{name:"search",group:"core",surface:"ai-agile",routing:{group:"context",method:"search"},optionSchema:{booleans:["global"]},description:"Search project memory (decisions, learnings, gotchas, ships\u2026) \u2014 BM25 + semantic + recall",usage:{claude:'p. search "<query>"',terminal:'prjct search "<query>" [--md]'},params:"<query>",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Blended retrieval: FTS5 BM25 + opt-in semantic + recency recall","Reranks by proven usefulness, expands one hop of the memory graph","`prjct search mem_1234` resolves a specific entry by id"]},{name:"update",group:"setup",surface:"support",routing:{group:"update",method:"update"},routingMode:"bin-only",description:"Update prjct system-wide: package + migrations + daemon restart",usage:{claude:null,terminal:"prjct update [--dry-run]"},params:"[--dry-run]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Phase 1: npm update (migrates homebrew \u2192 npm if needed)","Phase 2: All projects \u2014 migrate, sweep, reinstall commands","Phase 3: Daemon stop + restart with new code","--dry-run to preview without changes"]},{name:"uninstall",group:"setup",surface:"support",routing:{group:"uninstall",method:"uninstall"},routingMode:"bin-only",description:"Complete system removal of prjct",usage:{claude:null,terminal:"prjct uninstall"},params:"[--force] [--backup] [--dry-run]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Removes ~/.prjct-cli/ data","Cleans CLAUDE.md prjct section","Uninstalls Homebrew/npm packages","Backup option before deletion"]},{name:"team",group:"setup",surface:"support",routing:{group:"team",method:"team"},optionSchema:{booleans:["required","enforce"],strings:["minVersion"]},description:"Enroll this repo in prjct team mode \u2014 commits .prjct/team.json + .claude/CLAUDE.md so teammates pick up shared expectations",usage:{claude:"p. team",terminal:"prjct team [--required] [--min-version <semver>]"},params:"[--required] [--min-version <semver>]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Writes .prjct/team.json with required/minVersion config","Adds prjct context block to .claude/CLAUDE.md (per-project)","Stages both files for the next commit (does NOT commit)","Teammates clone repo + install prjct \u2192 ready to go"]},{name:"embeddings",group:"setup",surface:"support",routing:{group:"embeddings",method:"embeddings"},optionSchema:{strings:["key","model","baseUrl","authHeader","authScheme","headers","query"]},description:"Configure the GLOBAL semantic-embeddings provider (BYOT) \u2014 one API key, stored securely, used by every project.",usage:{claude:"p. embeddings status",terminal:'prjct embeddings <set|status|test|clear> [--key <K>] [--model <M>] [--base-url <U>] [--auth-header <H>] [--auth-scheme <S|none>] [--headers "k=v,..."] [--query <qs>]'},params:"[set|status|test|clear]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["BYOT: bring your own embedding API key \u2014 ANY OpenAI-compatible provider","Zero-config: paste just --key, the base URL is auto-detected from its prefix","OpenAI, OpenRouter, Ollama, Together, Mistral, Voyage, Jina, LM Studio\u2026",'Non-Bearer providers too: --auth-header api-key --auth-scheme none --query "api-version=..." (Azure OpenAI)',"Key stored in the macOS Keychain (else a 0600 file), never in config","Global \u2014 applies to all projects; per-project config still overrides","Without a key, recall uses the always-on local subword embedder","Validate with: prjct embeddings test"]},{name:"llm",group:"setup",surface:"support",routing:{group:"llm",method:"llm"},optionSchema:{strings:["name","key","model","baseUrl","wire","provider","authHeader","authScheme"],booleans:["weak","all"]},description:"OPT-IN (default OFF): machine-local LLM brain profiles for a future owned agent loop. Does not change guest mode. enable|disable|set|use|status|test|clear.",usage:{claude:"p. llm status",terminal:"prjct llm <enable|disable|set|use|status|test|clear> [--name <n>] [--key <K>] [--model <M>] [--base-url <U>] [--wire openai-compatible|anthropic] [--weak] [--all]"},params:"[enable|disable|set|use|status|test|clear]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Default OFF \u2014 zero impact on guest harnesses until prjct llm enable (or PRJCT_OWNED_LLM=1)","Does not alter embeddings setup gate or existing verbs","Multi-profile brains: Anthropic / OpenAI / xAI / OpenRouter / Ollama / LM Studio","Partial set merges; clear <name> or clear --all (keys wiped, no orphans)","Honest probe + HTTP timeouts","Pairs with prjct agent (print mode) when enabled"]},{name:"agent",group:"setup",surface:"support",routing:{group:"agent",method:"run"},optionSchema:{numbers:["maxSteps"],booleans:["quiet","noWork"]},description:"OPT-IN owned print-mode agent (one-shot). Requires prjct llm enable + brain. Starts a work cycle by default (risks + file map injected). Tools: FS + prjct_search/guard/remember/work. Guest unchanged.",usage:{claude:null,terminal:'prjct agent "<intent>" [--max-steps N] [--no-work] [--quiet] [--md]'},params:'"<intent>"',implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Blocked unless prjct llm enable (or PRJCT_OWNED_LLM=1) and a brain profile is set","Binds to prjct work cycle (startTask) unless --no-work; attaches if one is already open","Print/one-shot only \u2014 no interactive TUI yet","Tools scoped to project root; secret-like paths denied","Does not replace Claude Code / Grok / Codex guest mode"]},{name:"log",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"log"},optionSchema:{strings:["task"]},params:"<note>",description:'Append-only implementation journal on the active work cycle \u2014 "what did the last agent try", the cheapest session-to-session continuity. Surfaced in prjct brief and prime.',usage:{claude:'p. log "tried X, blocked on Y"',terminal:'prjct log "<note>" [--task id]'}},{name:"brief",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"brief"},optionSchema:{},description:"COMPILED context artifact for a task: orchestration directive + journal + related memory + recently-landed conventions + graph position. Persisted, regenerable \u2014 retrieval as a build step.",usage:{claude:"p. brief",terminal:"prjct brief [task-id] [--md]"}},{name:"replan",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"replan"},optionSchema:{},params:"<what-changed>",description:"Cascading drift repair: captures the pivot as a decision memory FIRST, then serves a re-plan directive over the open frontier so downstream items get re-evaluated against reality.",usage:{claude:'p. replan "auth moved to JWT"',terminal:'prjct replan "<what changed>"'}},{name:"plan",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"plan"},optionSchema:{},params:'["title"] | show | write "<md>" | approve | clear',description:"Plan-mode ceremony (read-only until approve): SQLite-backed plan with Context/Approach/Files/Reuse/Verification. Host must not edit source while status is draft.",usage:{claude:'p. plan "Add auth"',terminal:'prjct plan ["title"] | show | write "..." | approve | clear [--md]'},features:["Grok Build plan-mode pattern at the harness layer (no TUI ownership)","draft \u2192 write \u2192 approve; approve persists a decision memory","Single SoT in kv_store work-plan:active"]},{name:"prime",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"prime"},optionSchema:{},description:"Session-open bundle in ONE pull: active cycle + its last journal entries + ready frontier + pull-pointers. The named start-of-session ceremony.",usage:{claude:"p. prime",terminal:"prjct prime [--md]"}},{name:"land",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"land"},optionSchema:{},description:'Session-close checklist ("land the plane"): open cycle, claimed-but-unfinished items, pending sync, hand-off reminder \u2014 everything that must not die with the context.',usage:{claude:"p. land",terminal:"prjct land [--md]"}},{name:"dream",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"dream"},optionSchema:{booleans:["force","dryRun","md"],numbers:["minHours","minSessions"]},description:"Memory auto-dream: consolidate vault (triage inbox + Rho retention) and rebuild the L0 memory index \u2014 Claude Code KAIROS pattern, deterministic (no model call).",usage:{claude:"p. dream --force",terminal:"prjct dream [--force] [--dry-run] [--min-hours=24] [--min-sessions=5] [--md]"},params:"[--force] [--dry-run]",features:["Gates: \u226524h since last dream AND \u22655 lands (session counter) \u2014 bypass with --force","Phases: orient \u2192 gather \u2192 consolidate (triageInbox + applyRetention) \u2192 prune (L0 index)","Land auto-runs when gates open; dry-run previews without writes"]},{name:"ready",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"ready"},optionSchema:{},description:'The ready frontier: open backlog items with zero unresolved blocking dependencies \u2014 "what can I work on NOW" as a structural query, ranked by how much each item unblocks.',usage:{claude:"p. ready",terminal:"prjct ready [--md]"}},{name:"next",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"next"},optionSchema:{},description:'Deterministic "what now": top unclaimed item of the ready frontier, served WITH its orchestration directive (model tier, effort, ceremony, fan-out, points).',usage:{claude:"p. next",terminal:"prjct next [--md]"}},{name:"claim",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"claim"},optionSchema:{strings:["as"]},params:"<id>",description:"Race-free claim of a backlog item for multi-agent fan-out: succeeds only if unclaimed (atomic check-and-set).",usage:{claude:"p. claim <id>",terminal:"prjct claim <id> [--as name]"}},{name:"depend",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"depend"},optionSchema:{strings:["on","type"]},params:"<id>",description:"Add a typed dependency edge between work items: blocks | parent | related | discovered-from. Blocking edges are cycle-checked.",usage:{claude:"p. depend <id> --on <id>",terminal:"prjct depend <id> --on <id> [--type blocks|parent|related|discovered-from]"}},{name:"phases",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"phases"},optionSchema:{},description:"Topological execution phases over the dependency graph: items in the same phase are parallelizable \u2014 a data-driven fan-out plan with per-item orchestration.",usage:{claude:"p. phases",terminal:"prjct phases [--md]"}},{name:"expand",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"expand"},optionSchema:{},params:"<id>",description:"Decomposition loop: read the persisted complexity record + expansion directive for an item, or persist the agent's decomposition as subtasks with parent edges.",usage:{claude:"p. expand <id>",terminal:'prjct expand <id> ["subtask 1" "subtask 2" ...]'}},{name:"switch",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"switch"},optionSchema:{booleans:["launch"],strings:["reason"]},params:"<agent>",description:"Yield the active work cycle to another agent runtime (codex/claude/grok/\u2026) with who started + why \u2014 realtime handoff for stuck multi-terminal work.",usage:{claude:'p. switch codex --reason "\u2026"',terminal:'prjct switch <agent> [--reason "\u2026"] [--launch]'}},{name:"accept",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"accept"},optionSchema:{},params:"[hand_id]",description:"Accept a pending multi-agent handoff: rebind ownership of the live cycle and print the resume brief (who/why/task id).",usage:{claude:"p. accept [hand_id]",terminal:"prjct accept [hand_id] [--md]"}},{name:"handoffs",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"handoffs"},optionSchema:{},description:"List pending and recent multi-agent handoffs for this project.",usage:{claude:"p. handoffs",terminal:"prjct handoffs [--md]"}},{name:"changelog",group:"changelog",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"changelog",method:"changelog"},optionSchema:{},description:"Release notes from the typed delivery record: what shipped (by version) + completed work cycles in the window. Zero LLM \u2014 pure data-plane render.",usage:{claude:"p. changelog 14",terminal:"prjct changelog [days]"}},{name:"workflows",group:"workflowsReference",surface:"ai-agile",requiresProject:!1,implemented:!0,hasTemplate:!1,routing:{group:"workflowsReference",method:"workflows"},optionSchema:{},description:"Print the quality methodology reference (subagent dispatch, model policy, review/judgment/security workflows) \u2014 the rig-agnostic pull of what Claude reads as workflows.md.",usage:{claude:"p. workflows",terminal:"prjct workflows --md"}},{name:"memory",group:"memoryExport",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"memoryExport",method:"memory"},optionSchema:{booleans:["force","dryRun","md"],strings:["reason"]},description:"Memory surface: export|import (git-shareable), index (L0 TOC), close|forget (lifecycle), dream (auto-consolidation).",usage:{claude:"p. memory index",terminal:"prjct memory export|import|index|close <id>|forget <id>|dream [--force] [--dry-run]"},features:["export/import \u2014 git-shareable JSONL under .prjct/memory-export/","index \u2014 rebuild/show L0 compact memory TOC (SessionStart injects it)","close/forget \u2014 lifecycle aliases of top-level verbs","dream \u2014 auto-consolidation + L0 rebuild"]},{name:"guard",group:"core",surface:"ai-agile",routing:{group:"guard",method:"guard"},optionSchema:{numbers:["limit"],strings:["diff"],booleans:["strict"]},description:"Surface preventive memory (gotchas, anti-patterns, recurring-bugs) recorded against a file BEFORE you edit it \u2014 anticipation, provider-agnostic.",usage:{claude:"p. guard <file>",terminal:"prjct guard <file> | prjct guard --diff <range> [--strict]"},params:"[file]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Pillar 3 (anticipation): see the trap before you step in it","Pull, not push \u2014 also exposed as the prjct_guard MCP tool for Claude + Codex","Strict: only gotchas / anti-patterns / recurring-bugs \u2014 never plain decisions, so no noise",'Quiet by design: "clear to edit" when nothing preventive matches',"Matches absolute or repo-relative paths by exact / suffix / basename"]},{name:"config",group:"setup",surface:"support",routing:{group:"config",method:"config"},optionSchema:{},description:"Read/write global prjct config \u2014 auto-update opt-in, suggestions toggle, etc.",usage:{claude:"p. config list",terminal:"prjct config <list|get|set|unset> [key] [value]"},params:"<list|get|set|unset> [key] [value]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Stored at ~/.prjct-cli/config/global.json","Opt into silent auto-update: prjct config set auto-update on","Toggle proactive suggestions: prjct config set suggestions off","Booleans accept on/off/true/false; numbers parsed automatically"]},{name:"spec",group:"legacy",surface:"legacy",routing:{group:"spec",method:"draft"},routingMode:"cold-only",description:"Compatibility alias for `intent` \u2014 Goal/Acceptance/Scope/Risks before work starts.",usage:{claude:null,terminal:'prjct spec "<title>" [--goal "..."] [--tags k:v,...]'},params:'"<title>" [--goal] [--tags]',implemented:!0,hasTemplate:!1,requiresProject:!0,features:['Drafting: `prjct spec "<title>"` IS the create action \u2014 there is no `draft` subverb (aliases `draft`/`new`/`create` are tolerated and stripped)',"Persists in `specs` SQLite table + memory event stream","Sub-verbs: list, show, update, set-status, record-review, link-task, ship, audit, inventory"]},{name:"audit-spec",group:"legacy",surface:"legacy",routing:{group:"spec",method:"audit"},routingMode:"cold-only",description:"Compatibility alias for `intent audit <id>`",usage:{claude:null,terminal:"prjct audit-spec <id>"},params:"<spec-id>",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Emits dispatch prompt \u2014 Claude runs three Agent calls in parallel","Each reviewer writes back via `prjct spec record-review`","All three pass \u2192 spec auto-promotes draft \u2192 reviewed"]},...[["daemon","Run the prjct daemon in the foreground"],["stop","Stop the running prjct daemon"],["restart","Restart the prjct daemon"],["upgrade","Alias of `prjct update`",{group:"update",method:"update"}],["hook","Run a Claude Code hook event (internal; called by the hook scripts)"],["hooks","Inspect or reinstall the Claude Code hooks"],["claude","Claude Code integration management (install/uninstall)"],["crew","Run a crew (multi-subagent) workflow"],["harness","Harness scorecard + Body/rig adoption (score \xB7 learn-from \xB7 list \xB7 use)"],["doctor","Diagnose the local prjct installation"],["watch","Watch project files and react to changes"],["version","Print the installed prjct version + provider status"],["prefs","Inspect or set workflow preferences"],["retro","Summarize what shipped over a time window"],["health","Codebase health snapshot"],["skill-adherence","Report how well sessions follow the prjct skill"],["review-risk","Risk-ranked review hints for the working tree"],["context-save","Save the current working context for later restore"],["context-restore","Restore a previously saved working context"]].map(([t,e,n])=>({name:t,group:"setup",description:e,routing:n,usage:{claude:null,terminal:`prjct ${t}`},implemented:!0,hasTemplate:!1,requiresProject:!1,routingMode:"bin-only"}))],CL={"-h":"help","--help":"help","-v":"version","--version":"version"},AL=new Set([...tc.filter(t=>t.routingMode==="bin-only").map(t=>t.name),...Object.entries(CL).filter(([,t])=>tc.some(e=>e.name===t&&e.routingMode==="bin-only")).map(([t])=>t)])});var $w,Fw=y(()=>{"use strict";Mw();$w=new Set(tc.filter(t=>t.routing).map(t=>t.name))});var Hw={};P(Hw,{getGitBranch:()=>kr,getModifiedFiles:()=>NL});async function kr(t){let e=await Ze(["branch","--show-current"],{cwd:t,timeoutMs:Yd});if(e.ok)return e.stdout.trim()||void 0}async function NL(t,e=20){let n=a(o=>o.trim().split(`
|
|
1499
|
+
`)}function Kd(t){return t.map(({path:e,signals:n,reason:r})=>({path:e,signals:n,reason:r}))}function RL(t,e){return e?Fo(e,t):Lw(t)}var Aw,Cw,ec=y(()=>{"use strict";ek();Se();Xd();Rw();Aw=8,Cw=/(?:^|[\s`"'(])((?:@?[\w.-]+\/)+[\w.-]+\.[\w.-]+)(?:$|[\s`"'),;:])/g;a(Vd,"resolveWorkScopeSync");a(_L,"resolveWorkScope");a(Nw,"mergeScope");a(Iw,"memoryFileSeedsSync");a(Jd,"extractFilePathsFromEntries");a(Pw,"normalizePath");a(Lw,"looksLikeRepoPath");a(xL,"memorySeedWeight");a(Dw,"emptyResult");a(jw,"formatWorkScopeBlock");a(Kd,"toLikelyFileHits");a(RL,"isUsefulScopePath")});var tc,CL,AL,Mw=y(()=>{"use strict";tc=[{name:"intent",group:"core",surface:"ai-agile",routing:{group:"spec",method:"draft"},routingMode:"cold-only",optionSchema:{strings:["goal","tags"]},description:"Frame the work brief: objective, constraints, risks, and success signal",usage:{claude:'p. intent "<title>"',terminal:'prjct intent "<title>" [--goal "..."] [--tags k:v,...]'},params:'"<title>" [--goal] [--tags]',implemented:!0,hasTemplate:!1,requiresProject:!0,features:["v3 work-cycle replacement for ticket-style planning","Stores the durable brief in SQLite","Sub-verbs mirror spec for compatibility: list, show, update, audit, link-work, ship"]},{name:"work",group:"core",surface:"ai-agile",routing:{group:"workflow",method:"now"},optionSchema:{strings:["spec","geometry"],booleans:["extend"]},description:"Start or inspect a work cycle with context and evidence",usage:{claude:'p. work "<intent>"',terminal:'prjct work "<intent>" [--geometry split|single|direct]'},params:"[intent] [--geometry]",implemented:!0,hasTemplate:!0,requiresProject:!0,features:["v3 name for the execution cycle formerly exposed as task","No arg \u2192 shows the active work cycle","Surfaces related context before planning/editing","Captures harness/evidence expectations for the cycle"]},{name:"init",group:"core",surface:"support",routing:{group:"planning",method:"init"},description:"Deep project analysis and initialization",usage:{claude:'p. init "[idea]"',terminal:'prjct init "[idea]" [--yes] [--pack code,daily]'},params:"[idea] [--yes]",implemented:!0,hasTemplate:!0,requiresProject:!1,requiresLlm:!0,features:["Architect mode for blank projects","Auto tech stack recommendation","Analyzes existing codebases","`--yes` skips wizard (CI / 60s quickstart)"]},{name:"quickstart",group:"core",surface:"support",routing:{group:"planning",method:"quickstart"},optionSchema:{strings:["pack"]},description:"One-shot init + packs + agent surfaces (\u224860s install)",usage:{claude:"p. quickstart",terminal:"prjct quickstart [--pack code,daily]"},params:"[--pack]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Non-interactive init --yes","Default packs + AGENTS/CLAUDE routing","Prints three next verbs for the agent"]},{name:"task",group:"legacy",surface:"legacy",routing:{group:"workflow",method:"now"},optionSchema:{strings:["spec"],booleans:["extend"]},description:"Compatibility alias for `work`",usage:{claude:null,terminal:'prjct task "<description>"'},params:"[description]",implemented:!0,hasTemplate:!0,requiresProject:!0,features:["No arg \u2192 shows the active task (or none)","Deprecated public language: use `prjct work` for the v3 work cycle","Auto-harness classifies H0-H3 and stores expected evidence on the task","Writes to stateStorage; runs before/after workflow rules","Optional Linear issue link when the arg matches `[A-Z]+-\\d+`"]},{name:"ship",group:"core",surface:"ai-agile",routing:{group:"shipping",method:"ship"},optionSchema:{booleans:["skipHooks","noSpecGate","noTestGate","allowNewDeps","forcePressure","noJudgmentGate"],strings:["intent","geometry"]},description:"Commit, push, and celebrate shipped feature",usage:{claude:'p. ship ["feature"]',terminal:'prjct ship ["feature"]'},params:"[feature]",implemented:!0,hasTemplate:!0,requiresProject:!0,requiresLlm:!0,features:["No arg \u2192 ships the active task description, or derives a summary from the branch"]},{name:"sync",group:"core",surface:"ai-agile",routing:{group:"analysis",method:"sync"},description:"Sync project state and update workflow agents",usage:{claude:"p. sync",terminal:"prjct sync [--package=<name>] [--full]"},implemented:!0,hasTemplate:!0,requiresProject:!0,requiresLlm:!0,features:["Incremental sync: only re-analyzes changed files (default)","Force full sync: --full bypasses incremental cache","Monorepo support: --package=<name> for single package sync","Nested PRJCT.md inheritance","Per-package CLAUDE.md generation"]},{name:"eval",group:"optional",surface:"support",routing:{group:"eval",method:"eval"},optionSchema:{booleans:["publish","dryRun","json"],strings:["baseline","candidate","source","target","file"]},description:"Run product evals, compare versions, and publish actionable results",usage:{claude:"p. eval run [--candidate <version>] [--publish]",terminal:"prjct eval <run|compare|report|publish> [--baseline <version>] [--candidate <version>] [--target cloud] [--dry-run]"},params:"[run|compare|report|publish]",implemented:!0,hasTemplate:!1,requiresProject:!1,requiresLlm:!1,features:["Deterministic local eval runs stored under PRJCT_CLI_HOME/evals","Version comparisons with regression/improvement actionables","Cloud publication for shared benchmark history with server-side ownership and subscription checks"]},{name:"status",group:"legacy",surface:"legacy",routing:{group:"primitives",method:"status"},optionSchema:{strings:["tokensIn","tokensOut"]},description:"Compatibility lifecycle escape hatch; prefer `work` outcomes",usage:{claude:null,terminal:"prjct status <value>"},params:"[value]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["No args \u2192 prints active task + current status","Workflows are the primary status-change mechanism; this is the escape"]},{name:"tag",group:"legacy",surface:"legacy",routing:{group:"primitives",method:"tag"},optionSchema:{},description:"Compatibility metadata escape hatch; prefer synthesized context tags",usage:{claude:null,terminal:"prjct tag type:bug domain:auth"},params:"<pairs...>",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Claude decides what to tag \u2014 no heuristic classifier","type:<feature|bug|improvement|chore> promotes to tasks.type"]},{name:"remember",group:"core",surface:"ai-agile",routing:{group:"primitives",method:"remember"},optionSchema:{strings:["tags"],booleans:["force","global"]},description:"Capture a project memory entry (fact, decision, learning, gotcha, \u2026)",usage:{claude:'p. remember learning "message"',terminal:'prjct remember learning "message" --tags domain:auth'},params:'<type> "<content>" [--tags k:v,...]',implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Types: fact, decision, learning, gotcha, pattern, anti-pattern, shipped, inbox, todo, idea, insight, question, source, person \u2014 plus user-defined","Grows the project memory consumable via `prjct context memory`"]},{name:"forget",group:"core",surface:"ai-agile",routing:{group:"primitives",method:"forget"},optionSchema:{},description:"Delete a project memory entry by id (the delete half of `remember`)",usage:{claude:"p. forget mem_1234",terminal:"prjct forget mem_1234 [--md]"},params:"<id>",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Accepts `mem_1234`, `mem-1234`, or a bare `1234`","Hard-deletes the source event + drops the FTS mirror and any embedding \u2014 cannot resurface lexically or semantically"]},{name:"close",group:"core",surface:"ai-agile",routing:{group:"primitives",method:"close"},optionSchema:{strings:["reason"]},description:"Resolve/close a memory entry (inbox, signal, trap) so it leaves rotation \u2014 soft-delete + closed tag",usage:{claude:'p. close mem_1234 --reason "fixed in PR"',terminal:'prjct close mem_1234 [--reason "..."] [--md]'},params:"<id>",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Soft-removes from recall/FTS/embeddings; records status:closed for audit","Use for resolved inbox/improvement-signals \u2014 prefer over silent forget when the resolution matters"]},{name:"capture",group:"legacy",surface:"legacy",routing:{group:"capture",method:"capture"},optionSchema:{strings:["tags"],booleans:["force","fromCurrent"]},description:"Compatibility inbox fallback; prefer synthesized `remember context`",usage:{claude:null,terminal:'prjct capture "call Ana re pricing" --tags domain:sales'},params:'"<content>" [--tags k:v,...]',implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Writes memory type=inbox; Claude retypes later via a clarify workflow","No task id, no branch, no worktree \u2014 just persists",'Bare `prjct "<text>"` auto-routes to `capture`']},{name:"seed",group:"setup",surface:"support",routing:{group:"seed",method:"seed"},routingMode:"bin-only",optionSchema:{},description:"Manage declarative packs (persona, memory types, workflow slots, hook signals)",usage:{claude:"p. seed list",terminal:"prjct seed add pm,daily"},params:"[add|remove|list|suggest] [pack,pack,...]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Packs declare signals only \u2014 no bash is written","Add or remove multi-persona contexts per project","Auto-detect suggestion from project stack"]},{name:"mcp",group:"setup",surface:"support",routing:{group:"mcp",method:"mcp"},routingMode:"bin-only",optionSchema:{},description:"Toggle MCP servers per-project \u2014 interactive multi-select in your terminal, list/deny/allow for scripts",usage:{claude:"p. mcp list",terminal:"prjct mcp"},params:"[list|status|deny|allow] [serverName]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Interactive multi-select with live tool-cost delta (default UX in TTY)","Project-local \u2014 writes only to .claude/settings.local.json","Knows the well-known cloud MCPs from claude.ai (PostHog, Atlassian, etc.)","Headless list/deny/allow for LLM agents and scripts (--md flag)"]},{name:"install",group:"setup",surface:"support",routing:{group:"install",method:"install"},routingMode:"bin-only",optionSchema:{},description:"Install universal agent surfaces, Claude hooks, and Codex config",usage:{claude:"p. install",terminal:"prjct install"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Inside a prjct project, refreshes AGENTS.md as the portable baseline","Writes Claude passive hooks: SessionStart, UserPromptSubmit, \u2026","Repairs detected Codex config.toml with prjct MCP and TUI status_line","Idempotent; existing non-prjct hooks stay intact","Audit agent support with `prjct agents doctor`"]},{name:"help",group:"setup",surface:"support",routingMode:"bin-only",description:"Contextual help and guidance",usage:{claude:"p. help [topic]",terminal:"prjct help [topic]"},params:"[topic]",implemented:!0,hasTemplate:!0,requiresProject:!1},{name:"analysis-save-llm",group:"optional",surface:"internal",routing:{group:"analysis",method:"saveLlmAnalysis"},description:"Persist analysis notes produced by an LLM run",usage:{claude:null,terminal:"prjct analysis-save-llm <file|text|json>"},params:"<file|text|json>",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0},{name:"analyze",group:"legacy",surface:"legacy",routing:{group:"analysis",method:"analyze"},description:"Compatibility alias for sync analysis",usage:{claude:null,terminal:"prjct analyze"},implemented:!0,hasTemplate:!0,requiresProject:!0,isOptional:!0,requiresLlm:!0},{name:"code",group:"optional",surface:"support",routing:{group:"code",method:"code"},optionSchema:{},description:"Structural code graph: symbols, trace, impact/risk, architecture (run after sync)",usage:{claude:"p. code [symbols|trace|impact|architecture|dead|export|import|push-graph|reindex|cbm]",terminal:"prjct code [symbols|trace|impact|architecture|dead|export|import|push-graph|reindex|cbm]"},params:"[symbols|trace|impact|architecture|dead|export|import|push-graph|reindex|cbm] [args]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Symbol index on sync; 4th work-scope signal; CALLS with enclosing + imports","trace / impact (hunk-level) / architecture / dead one-shots","Per-project cache under ~/.prjct-cli/projects/<id>/ (never in client repo)","push-graph: full Function/Class/File + CALLS/IMPORTS graph \u2192 cloud 3D (no node/link caps)","PreToolUse Grep|Glob augment; ship structural risk cue; optional CBM cli"]},{name:"lean",group:"optional",surface:"support",routing:{group:"lean",method:"lean"},optionSchema:{},description:"Anti-over-engineering: set intensity, review/audit/debt (read-only)",usage:{claude:"p. lean [review|audit|debt|off|lite|full|ultra]",terminal:"prjct lean [sub]"},params:"[review|audit|debt|off|lite|full|ultra]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["No arg \u2192 show active intensity mode + a one-screen summary","review/audit/debt are advisory \u2014 no gate, no source writes","off|lite|full|ultra sets the intensity (mirrors ponytail modes)"]},{name:"tdd",group:"optional",surface:"support",routing:{group:"tdd",method:"tdd"},optionSchema:{},description:"Test-Driven Development: set intensity, run the test command (check)",usage:{claude:"p. tdd [check|off|assist|strict]",terminal:"prjct tdd [sub]"},params:"[check|off|assist|strict]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["No arg \u2192 show mode + the auto-detected test command","off|assist|strict sets the intensity (opt-in, like lean)","check runs the detected test command now (red/green) \u2014 the real gate"]},{name:"judgment",group:"optional",surface:"support",routing:{group:"judgment",method:"judgment"},optionSchema:{booleans:["md"]},description:"Precision judgment v2: evidence tax, DNA, RED/BLUE merge, ghosts, next card, ship gate",usage:{claude:"p. judgment [plan|open|add|merge|challenge|next|approve|\u2026]",terminal:"prjct judgment [sub]"},params:"[plan|open|add|merge|challenge|fix-round|fixed|verify|brief|next|ghosts|approve|escalate|status|clear]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["next \u2192 machine directive card (agent loop never re-derives state)","evidence tax + finding DNA + project ghost FP memory","RED/BLUE dual-blind merge; contradiction auto-escalates","code-strict ship hard-gates on ledger.approved before task complete"]},{name:"sdd",group:"optional",surface:"support",routing:{group:"sdd",method:"sdd"},optionSchema:{},description:"Spec-Driven Development: gate the spec pipeline (off/advisory/strict)",usage:{claude:"p. sdd [off|advisory|strict]",terminal:"prjct sdd [sub]"},params:"[off|advisory|strict]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["No arg \u2192 show mode + the active task spec station (pipeline checklist)","off|advisory|strict sets the intensity (opt-in, like lean)","strict: every task needs a reviewed spec; ship blocks unspecced work"]},{name:"notify",group:"setup",surface:"support",routing:{group:"notify",method:"notify"},optionSchema:{},description:"Desktop notifications (default on): ping on Claude-waiting + subagent-finished",usage:{claude:"p. notify [on|off]",terminal:"prjct notify [on|off]"},params:"[on|off]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Default ON \u2014 pings when Claude is waiting or a subagent finishes","No arg \u2192 show mode + what fires","off silences OS notifications (per-prompt work-state block stays)"]},{name:"agents",group:"setup",surface:"support",routing:{group:"agents",method:"agents"},optionSchema:{booleans:["fix"]},description:"Show the concrete compatibility matrix for AI coding agents (doctor) or harness surface map (surfaces)",usage:{claude:"p. agents [doctor|surfaces|doctor --fix]",terminal:"prjct agents [doctor|surfaces [--detail]|doctor --fix]"},params:"[doctor|status|list|surfaces] [--fix] [--detail]",implemented:!0,hasTemplate:!1,requiresProject:!1,isOptional:!0,features:["Derives support levels from the runtime registry","Reports AGENTS.md, MCP, skills, hooks, ACP, and project-rule support","surfaces: benchmark-tier harness map (hooks/MCP/skills wire status)","doctor --fix refreshes repo-local agent surfaces when run inside a project",'Use this to audit claims like "works with Codex/Gemini/OpenCode/Cursor/Grok"']},{name:"value",group:"legacy",surface:"legacy",routing:{group:"product",method:"value"},optionSchema:{},description:"Compatibility alias for `insights value`",usage:{claude:null,terminal:"prjct value [--md]"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Scores project continuity from real SQLite data","Counts durable memory, preventive guardrails, shipped work, sync metrics, and agent coverage","Designed as the paid-tier proof screen for humans and agents"]},{name:"memory-doctor",group:"legacy",surface:"legacy",routing:{group:"product",method:"memoryDoctor"},optionSchema:{},description:"Compatibility alias for `insights quality`",usage:{claude:null,terminal:"prjct memory-doctor [--md]"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Finds duplicate groups, stale inbox entries, low-signal memories, and missing types","Read-only by default; recommends exact cleanup actions","Protects recall quality across Claude, Codex, Gemini, OpenCode, and future agents"]},{name:"report",group:"legacy",surface:"legacy",routing:{group:"product",method:"report"},optionSchema:{numbers:["days"]},description:"Compatibility alias for `insights report`",usage:{claude:null,terminal:"prjct report [days] [--md]"},params:"[days]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Summarizes shipped features, completed tasks, active work, and carry-forward lessons","Uses real project state instead of a marketing changelog","Useful for founders, teams, and paid Cloud status emails"]},{name:"handoff",group:"legacy",surface:"legacy",routing:{group:"product",method:"handoff"},optionSchema:{},description:'Static continuation brief for another agent. For realtime ownership transfer use `prjct switch <agent> --reason "\u2026"` + `prjct accept`.',usage:{claude:null,terminal:"prjct handoff codex [--md]"},params:"[agent]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Gives the next agent the active task, required prjct checks, and high-value memories","Works across Codex, Claude, Gemini, Cursor, OpenCode, Qwen, Kimi, Grok, and unknown future agents","For stuck same-branch rescue with ownership transfer: prjct switch / accept (not this alias)"]},{name:"guardrails",group:"legacy",surface:"legacy",routing:{group:"product",method:"guardrails"},optionSchema:{},description:"Compatibility alias for `insights guardrails`",usage:{claude:null,terminal:"prjct guardrails [--md]"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Checks changed files against preventive memory","Falls back to general project traps when no file-specific hit exists","Advisory only; no gate, no mutation"]},{name:"insights",group:"optional",surface:"ai-agile",routing:{group:"product",method:"insights"},optionSchema:{numbers:["days"]},description:"Harness intelligence: value, quality, reliability, token cost, reports, continuation, and guardrails",usage:{claude:"p. insights [value|quality|reliability|cost|report|continue|guardrails]",terminal:"prjct insights [value|quality|reliability|cost|report|continue|guardrails] [--md]"},params:"[value|quality|reliability|cost|report|continue|guardrails] [agent|days]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["v3 surface for project intelligence formerly spread across value/report/handoff/memory-doctor/guardrails","Default view summarizes whether the project is compounding","reliability/trust shows whether value, cost, and performance metrics are decision-ready","cost/spend/tokens shows subscription burn, token coverage, context reuse, and capture gaps","Subcommands remain read-only except where underlying compatibility commands already mutate nothing"]},{name:"performance",group:"optional",surface:"ai-agile",routing:{group:"product",method:"performance"},optionSchema:{numbers:["days"]},description:"Measure dev+LLM efficiency per work cycle: time, tokens, model/runtime, tools, friction",usage:{claude:"p. performance [7]",terminal:"prjct performance [days] [--md]"},params:"[days]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Uses real task/session rows and available token columns","Stores unknown when a runtime does not expose exact model/token data","Designed to guide the next work cycle, not to create scrum velocity reports"]},{name:"perf",group:"optional",surface:"ai-agile",routing:{group:"product",method:"perf"},optionSchema:{numbers:["days"]},description:"Report p50/p95 latency for commands and hooks from local telemetry",usage:{claude:"p. perf [7]",terminal:"prjct perf [days] [--md]"},params:"[days]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Reads existing command_duration samples from SQLite","Groups hook samples under hook:<subcommand>","Reports p50, p95, average, min, max, and sample count"]},{name:"cloud",group:"setup",surface:"support",routing:{group:"cloud",method:"cloud"},optionSchema:{},description:"Cloud sync (paid): connect/disconnect projects, sync/pull, pause/resume, list, status",usage:{claude:"p. cloud [link|unlink|projects|sync|pull|pause|resume|status] [--all|--interactive|--yes]",terminal:"prjct cloud [sub] [--all|--interactive|--yes]"},params:"[link|unlink|projects|sync|pull|pause|resume|status] [--all|--interactive|--yes]",implemented:!0,hasTemplate:!1,requiresProject:!1,isOptional:!0,features:["Local-first: nothing leaves until `prjct connect` / `prjct cloud link`","One project (cwd), one-by-one (--interactive), or all (--all --yes)","Disconnect is soft \u2014 cloud history kept; local vault untouched","Auto-syncs on `prjct ship` and at session end once connected"]},{name:"connect",group:"setup",surface:"support",routing:{group:"cloud",method:"connect"},optionSchema:{},description:"Connect this project to Cloud Sync (alias of `prjct cloud link`)",usage:{claude:"p. connect [--all|--interactive|--yes]",terminal:"prjct connect [--all|--interactive|--yes]"},params:"[--all|--interactive|--yes]",implemented:!0,hasTemplate:!1,requiresProject:!1,isOptional:!0,features:["cwd: connect one repo after `prjct login`","--all --yes: bulk connect (confirm with human first)","--interactive: one-by-one Y/n (TTY)"]},{name:"disconnect",group:"setup",surface:"support",routing:{group:"cloud",method:"disconnect"},optionSchema:{},description:"Disconnect this project from Cloud Sync (alias of `prjct cloud unlink`)",usage:{claude:"p. disconnect [--all|--yes]",terminal:"prjct disconnect [--all|--yes]"},params:"[--all|--yes]",implemented:!0,hasTemplate:!1,requiresProject:!1,isOptional:!0,features:["Soft disconnect \u2014 leaves Cloud list; records kept; local vault untouched","Re-connect with `prjct connect`","--all --yes: bulk disconnect after human confirm"]},{name:"workflow",group:"optional",surface:"support",routing:{group:"workflow",method:"workflow"},optionSchema:{},description:"Configure workflow hooks via natural language",usage:{claude:'p. workflow ["config"]',terminal:'prjct workflow ["config"]'},params:'["natural language config"]',implemented:!0,hasTemplate:!0,requiresProject:!0,isOptional:!0,requiresLlm:!0,features:["Natural language configuration","Before/after hooks for task, done, ship, sync","Permanent, session, or one-time preferences"]},{name:"start",group:"setup",surface:"support",routing:{group:"setup",method:"start"},routingMode:"bin-only",description:"First-time setup (install commands to editors)",usage:{claude:null,terminal:"prjct start"},implemented:!0,hasTemplate:!1,requiresProject:!1},{name:"setup",group:"setup",surface:"support",routing:{group:"setup",method:"setup"},routingMode:"bin-only",description:"Reconfigure editor installations and user-owned defaults",usage:{claude:"p. setup",terminal:"prjct setup"},params:"[--force] [--non-interactive]",implemented:!0,hasTemplate:!0,requiresProject:!1},{name:"login",group:"setup",surface:"support",routing:{group:"setup",method:"login"},description:"Authenticate with prjct cloud (opens browser)",usage:{claude:null,terminal:"prjct login"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!1,routingMode:"bin-only"},{name:"logout",group:"setup",surface:"support",routing:{group:"setup",method:"logout"},description:"Sign out from prjct cloud",usage:{claude:null,terminal:"prjct logout"},implemented:!0,hasTemplate:!1,requiresProject:!1,routingMode:"bin-only"},{name:"auth",group:"setup",surface:"support",routing:{group:"setup",method:"auth"},description:"Manage cloud authentication",usage:{claude:"p. auth [action]",terminal:"prjct auth [action]"},params:"[logout|status]",implemented:!0,hasTemplate:!1,requiresProject:!1,routingMode:"bin-only"},{name:"context",group:"setup",surface:"support",routing:{group:"context",method:"context"},routingMode:"bin-only",optionSchema:{},description:"Smart context filtering tools for AI agents",usage:{claude:null,terminal:"prjct context <tool> [args]"},params:"<tool> [args]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["files - Find relevant files for a task","signatures - Extract code structure (~90% compression)","imports - Analyze dependency graphs","recent - Find hot files from git history","summary - Intelligent file summarization"]},{name:"search",group:"core",surface:"ai-agile",routing:{group:"context",method:"search"},optionSchema:{booleans:["global"]},description:"Search project memory (decisions, learnings, gotchas, ships\u2026) \u2014 BM25 + semantic + recall",usage:{claude:'p. search "<query>"',terminal:'prjct search "<query>" [--md]'},params:"<query>",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Blended retrieval: FTS5 BM25 + opt-in semantic + recency recall","Reranks by proven usefulness, expands one hop of the memory graph","`prjct search mem_1234` resolves a specific entry by id"]},{name:"update",group:"setup",surface:"support",routing:{group:"update",method:"update"},routingMode:"bin-only",description:"Update prjct system-wide: package + migrations + daemon restart",usage:{claude:null,terminal:"prjct update [--dry-run]"},params:"[--dry-run]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Phase 1: npm update (migrates homebrew \u2192 npm if needed)","Phase 2: All projects \u2014 migrate, sweep, reinstall commands","Phase 3: Daemon stop + restart with new code","--dry-run to preview without changes"]},{name:"uninstall",group:"setup",surface:"support",routing:{group:"uninstall",method:"uninstall"},routingMode:"bin-only",description:"Complete system removal of prjct",usage:{claude:null,terminal:"prjct uninstall"},params:"[--force] [--backup] [--dry-run]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Removes ~/.prjct-cli/ data","Cleans CLAUDE.md prjct section","Uninstalls Homebrew/npm packages","Backup option before deletion"]},{name:"team",group:"setup",surface:"support",routing:{group:"team",method:"team"},optionSchema:{booleans:["required","enforce"],strings:["minVersion"]},description:"Enroll this repo in prjct team mode \u2014 commits .prjct/team.json + .claude/CLAUDE.md so teammates pick up shared expectations",usage:{claude:"p. team",terminal:"prjct team [--required] [--min-version <semver>]"},params:"[--required] [--min-version <semver>]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Writes .prjct/team.json with required/minVersion config","Adds prjct context block to .claude/CLAUDE.md (per-project)","Stages both files for the next commit (does NOT commit)","Teammates clone repo + install prjct \u2192 ready to go"]},{name:"embeddings",group:"setup",surface:"support",routing:{group:"embeddings",method:"embeddings"},optionSchema:{strings:["key","model","baseUrl","authHeader","authScheme","headers","query"]},description:"Configure the GLOBAL semantic-embeddings provider (BYOT) \u2014 one API key, stored securely, used by every project.",usage:{claude:"p. embeddings status",terminal:'prjct embeddings <set|status|test|clear> [--key <K>] [--model <M>] [--base-url <U>] [--auth-header <H>] [--auth-scheme <S|none>] [--headers "k=v,..."] [--query <qs>]'},params:"[set|status|test|clear]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["BYOT: bring your own embedding API key \u2014 ANY OpenAI-compatible provider","Zero-config: paste just --key, the base URL is auto-detected from its prefix","OpenAI, OpenRouter, Ollama, Together, Mistral, Voyage, Jina, LM Studio\u2026",'Non-Bearer providers too: --auth-header api-key --auth-scheme none --query "api-version=..." (Azure OpenAI)',"Key stored in the macOS Keychain (else a 0600 file), never in config","Global \u2014 applies to all projects; per-project config still overrides","Without a key, recall uses the always-on local subword embedder","Validate with: prjct embeddings test"]},{name:"llm",group:"setup",surface:"support",routing:{group:"llm",method:"llm"},optionSchema:{strings:["name","key","model","baseUrl","wire","provider","authHeader","authScheme"],booleans:["weak","all"]},description:"OPT-IN (default OFF): machine-local LLM brain profiles for a future owned agent loop. Does not change guest mode. enable|disable|set|use|status|test|clear.",usage:{claude:"p. llm status",terminal:"prjct llm <enable|disable|set|use|status|test|clear> [--name <n>] [--key <K>] [--model <M>] [--base-url <U>] [--wire openai-compatible|anthropic] [--weak] [--all]"},params:"[enable|disable|set|use|status|test|clear]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Default OFF \u2014 zero impact on guest harnesses until prjct llm enable (or PRJCT_OWNED_LLM=1)","Does not alter embeddings setup gate or existing verbs","Multi-profile brains: Anthropic / OpenAI / xAI / OpenRouter / Ollama / LM Studio","Partial set merges; clear <name> or clear --all (keys wiped, no orphans)","Honest probe + HTTP timeouts","Pairs with prjct agent (print mode) when enabled"]},{name:"agent",group:"setup",surface:"support",routing:{group:"agent",method:"run"},optionSchema:{numbers:["maxSteps"],booleans:["quiet","noWork"]},description:"OPT-IN owned print-mode agent (one-shot). Requires prjct llm enable + brain. Starts a work cycle by default (risks + file map injected). Tools: FS + prjct_search/guard/remember/work. Guest unchanged.",usage:{claude:null,terminal:'prjct agent "<intent>" [--max-steps N] [--no-work] [--quiet] [--md]'},params:'"<intent>"',implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Blocked unless prjct llm enable (or PRJCT_OWNED_LLM=1) and a brain profile is set","Binds to prjct work cycle (startTask) unless --no-work; attaches if one is already open","Print/one-shot only \u2014 no interactive TUI yet","Tools scoped to project root; secret-like paths denied","Does not replace Claude Code / Grok / Codex guest mode"]},{name:"log",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"log"},optionSchema:{strings:["task"]},params:"<note>",description:'Append-only implementation journal on the active work cycle \u2014 "what did the last agent try", the cheapest session-to-session continuity. Surfaced in prjct brief and prime.',usage:{claude:'p. log "tried X, blocked on Y"',terminal:'prjct log "<note>" [--task id]'}},{name:"brief",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"brief"},optionSchema:{},description:"COMPILED context artifact for a task: orchestration directive + journal + related memory + recently-landed conventions + graph position. Persisted, regenerable \u2014 retrieval as a build step.",usage:{claude:"p. brief",terminal:"prjct brief [task-id] [--md]"}},{name:"replan",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"replan"},optionSchema:{},params:"<what-changed>",description:"Cascading drift repair: captures the pivot as a decision memory FIRST, then serves a re-plan directive over the open frontier so downstream items get re-evaluated against reality.",usage:{claude:'p. replan "auth moved to JWT"',terminal:'prjct replan "<what changed>"'}},{name:"plan",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"plan"},optionSchema:{},params:'["title"] | show | write "<md>" | approve | clear',description:"Plan-mode ceremony (read-only until approve): SQLite-backed plan with Context/Approach/Files/Reuse/Verification. Host must not edit source while status is draft.",usage:{claude:'p. plan "Add auth"',terminal:'prjct plan ["title"] | show | write "..." | approve | clear [--md]'},features:["Grok Build plan-mode pattern at the harness layer (no TUI ownership)","draft \u2192 write \u2192 approve; approve persists a decision memory","Single SoT in kv_store work-plan:active"]},{name:"prime",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"prime"},optionSchema:{},description:"Session-open bundle in ONE pull: active cycle + its last journal entries + ready frontier + pull-pointers. The named start-of-session ceremony.",usage:{claude:"p. prime",terminal:"prjct prime [--md]"}},{name:"land",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"land"},optionSchema:{},description:'Session-close checklist ("land the plane"): open cycle, claimed-but-unfinished items, pending sync, hand-off reminder \u2014 everything that must not die with the context.',usage:{claude:"p. land",terminal:"prjct land [--md]"}},{name:"dream",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"dream"},optionSchema:{booleans:["force","dryRun","md"],numbers:["minHours","minSessions"]},description:"Memory auto-dream: consolidate vault (triage inbox + Rho retention) and rebuild the L0 memory index \u2014 Claude Code KAIROS pattern, deterministic (no model call).",usage:{claude:"p. dream --force",terminal:"prjct dream [--force] [--dry-run] [--min-hours=24] [--min-sessions=5] [--md]"},params:"[--force] [--dry-run]",features:["Gates: \u226524h since last dream AND \u22655 lands (session counter) \u2014 bypass with --force","Phases: orient \u2192 gather \u2192 consolidate (triageInbox + applyRetention) \u2192 prune (L0 index)","Land auto-runs when gates open; dry-run previews without writes"]},{name:"ready",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"ready"},optionSchema:{},description:'The ready frontier: open backlog items with zero unresolved blocking dependencies \u2014 "what can I work on NOW" as a structural query, ranked by how much each item unblocks.',usage:{claude:"p. ready",terminal:"prjct ready [--md]"}},{name:"next",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"next"},optionSchema:{},description:'Deterministic "what now": top unclaimed item of the ready frontier, served WITH its orchestration directive (model tier, effort, ceremony, fan-out, points).',usage:{claude:"p. next",terminal:"prjct next [--md]"}},{name:"claim",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"claim"},optionSchema:{strings:["as"]},params:"<id>",description:"Race-free claim of a backlog item for multi-agent fan-out: succeeds only if unclaimed (atomic check-and-set).",usage:{claude:"p. claim <id>",terminal:"prjct claim <id> [--as name]"}},{name:"depend",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"depend"},optionSchema:{strings:["on","type"]},params:"<id>",description:"Add a typed dependency edge between work items: blocks | parent | related | discovered-from. Blocking edges are cycle-checked.",usage:{claude:"p. depend <id> --on <id>",terminal:"prjct depend <id> --on <id> [--type blocks|parent|related|discovered-from]"}},{name:"phases",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"phases"},optionSchema:{},description:"Topological execution phases over the dependency graph: items in the same phase are parallelizable \u2014 a data-driven fan-out plan with per-item orchestration.",usage:{claude:"p. phases",terminal:"prjct phases [--md]"}},{name:"expand",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"expand"},optionSchema:{},params:"<id>",description:"Decomposition loop: read the persisted complexity record + expansion directive for an item, or persist the agent's decomposition as subtasks with parent edges.",usage:{claude:"p. expand <id>",terminal:'prjct expand <id> ["subtask 1" "subtask 2" ...]'}},{name:"switch",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"switch"},optionSchema:{booleans:["launch"],strings:["reason"]},params:"<agent>",description:"Yield the active work cycle to another agent runtime (codex/claude/grok/\u2026) with who started + why \u2014 realtime handoff for stuck multi-terminal work.",usage:{claude:'p. switch codex --reason "\u2026"',terminal:'prjct switch <agent> [--reason "\u2026"] [--launch]'}},{name:"accept",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"accept"},optionSchema:{},params:"[hand_id]",description:"Accept a pending multi-agent handoff: rebind ownership of the live cycle and print the resume brief (who/why/task id).",usage:{claude:"p. accept [hand_id]",terminal:"prjct accept [hand_id] [--md]"}},{name:"handoffs",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"handoffs"},optionSchema:{},description:"List pending and recent multi-agent handoffs for this project.",usage:{claude:"p. handoffs",terminal:"prjct handoffs [--md]"}},{name:"changelog",group:"changelog",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"changelog",method:"changelog"},optionSchema:{},description:"Release notes from the typed delivery record: what shipped (by version) + completed work cycles in the window. Zero LLM \u2014 pure data-plane render.",usage:{claude:"p. changelog 14",terminal:"prjct changelog [days]"}},{name:"workflows",group:"workflowsReference",surface:"ai-agile",requiresProject:!1,implemented:!0,hasTemplate:!1,routing:{group:"workflowsReference",method:"workflows"},optionSchema:{},description:"Print the quality methodology reference (subagent dispatch, model policy, review/judgment/security workflows) \u2014 the rig-agnostic pull of what Claude reads as workflows.md.",usage:{claude:"p. workflows",terminal:"prjct workflows --md"}},{name:"memory",group:"memoryExport",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"memoryExport",method:"memory"},optionSchema:{booleans:["force","dryRun","md"],strings:["reason"]},description:"Memory surface: export|import (git-shareable), index (L0 TOC), close|forget (lifecycle), dream (auto-consolidation).",usage:{claude:"p. memory index",terminal:"prjct memory export|import|index|close <id>|forget <id>|dream [--force] [--dry-run]"},features:["export/import \u2014 git-shareable JSONL under .prjct/memory-export/","index \u2014 rebuild/show L0 compact memory TOC (SessionStart injects it)","close/forget \u2014 lifecycle aliases of top-level verbs","dream \u2014 auto-consolidation + L0 rebuild"]},{name:"guard",group:"core",surface:"ai-agile",routing:{group:"guard",method:"guard"},optionSchema:{numbers:["limit"],strings:["diff"],booleans:["strict"]},description:"Surface preventive memory (gotchas, anti-patterns, recurring-bugs) recorded against a file BEFORE you edit it \u2014 anticipation, provider-agnostic.",usage:{claude:"p. guard <file>",terminal:"prjct guard <file> | prjct guard --diff <range> [--strict]"},params:"[file]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Pillar 3 (anticipation): see the trap before you step in it","Pull, not push \u2014 also exposed as the prjct_guard MCP tool for Claude + Codex","Strict: only gotchas / anti-patterns / recurring-bugs \u2014 never plain decisions, so no noise",'Quiet by design: "clear to edit" when nothing preventive matches',"Matches absolute or repo-relative paths by exact / suffix / basename"]},{name:"config",group:"setup",surface:"support",routing:{group:"config",method:"config"},optionSchema:{},description:"Read/write global prjct config \u2014 auto-update opt-in, suggestions toggle, etc.",usage:{claude:"p. config list",terminal:"prjct config <list|get|set|unset> [key] [value]"},params:"<list|get|set|unset> [key] [value]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Stored at ~/.prjct-cli/config/global.json","Opt into silent auto-update: prjct config set auto-update on","Toggle proactive suggestions: prjct config set suggestions off","Booleans accept on/off/true/false; numbers parsed automatically"]},{name:"spec",group:"legacy",surface:"legacy",routing:{group:"spec",method:"draft"},routingMode:"cold-only",description:"Compatibility alias for `intent` \u2014 Goal/Acceptance/Scope/Risks before work starts.",usage:{claude:null,terminal:'prjct spec "<title>" [--goal "..."] [--tags k:v,...]'},params:'"<title>" [--goal] [--tags]',implemented:!0,hasTemplate:!1,requiresProject:!0,features:['Drafting: `prjct spec "<title>"` IS the create action \u2014 there is no `draft` subverb (aliases `draft`/`new`/`create` are tolerated and stripped)',"Persists in `specs` SQLite table + memory event stream","Sub-verbs: list, show, update, set-status, record-review, link-task, ship, audit, inventory"]},{name:"audit-spec",group:"legacy",surface:"legacy",routing:{group:"spec",method:"audit"},routingMode:"cold-only",description:"Compatibility alias for `intent audit <id>`",usage:{claude:null,terminal:"prjct audit-spec <id>"},params:"<spec-id>",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Emits dispatch prompt \u2014 Claude runs three Agent calls in parallel","Each reviewer writes back via `prjct spec record-review`","All three pass \u2192 spec auto-promotes draft \u2192 reviewed"]},...[["daemon","Run the prjct daemon in the foreground"],["stop","Stop the running prjct daemon"],["restart","Restart the prjct daemon"],["upgrade","Alias of `prjct update`",{group:"update",method:"update"}],["hook","Run a Claude Code hook event (internal; called by the hook scripts)"],["hooks","Inspect or reinstall the Claude Code hooks"],["claude","Claude Code integration management (install/uninstall)"],["crew","Run a crew (multi-subagent) workflow"],["harness","Harness scorecard + Body/rig adoption (score \xB7 learn-from \xB7 list \xB7 use)"],["doctor","Diagnose the local prjct installation"],["watch","Watch project files and react to changes"],["version","Print the installed prjct version + provider status"],["prefs","Inspect or set workflow preferences"],["retro","Summarize what shipped over a time window"],["health","Codebase health snapshot"],["skill-adherence","Report how well sessions follow the prjct skill"],["review-risk","Risk-ranked review hints for the working tree"],["context-save","Save the current working context for later restore"],["context-restore","Restore a previously saved working context"]].map(([t,e,n])=>({name:t,group:"setup",description:e,routing:n,usage:{claude:null,terminal:`prjct ${t}`},implemented:!0,hasTemplate:!1,requiresProject:!1,routingMode:"bin-only"}))],CL={"-h":"help","--help":"help","-v":"version","--version":"version"},AL=new Set([...tc.filter(t=>t.routingMode==="bin-only").map(t=>t.name),...Object.entries(CL).filter(([,t])=>tc.some(e=>e.name===t&&e.routingMode==="bin-only")).map(([t])=>t)])});var $w,Fw=y(()=>{"use strict";Mw();$w=new Set(tc.filter(t=>t.routing).map(t=>t.name))});var Hw={};P(Hw,{getGitBranch:()=>kr,getModifiedFiles:()=>NL});async function kr(t){let e=await Ze(["branch","--show-current"],{cwd:t,timeoutMs:Yd});if(e.ok)return e.stdout.trim()||void 0}async function NL(t,e=20){let n=a(o=>o.trim().split(`
|
|
1500
1500
|
`).filter(i=>i.length>0).slice(0,e),"parse"),r=await Ze(["diff","--name-only","HEAD"],{cwd:t,timeoutMs:Yd});if(r.ok){let o=n(r.stdout);if(o.length>0)return o}let s=await Ze(["diff","--name-only"],{cwd:t,timeoutMs:Yd});return s.ok?n(s.stdout):[]}var Yd,Ho=y(()=>{"use strict";pe();Yd=5e3;a(kr,"getGitBranch");a(NL,"getModifiedFiles")});function Uw(t){return{projectId:t.project_id,taskId:t.task_id,workspaceId:t.workspace_id,classification:t.classification,station:t.station,requiresSpec:t.requires_spec===1,requiresTestsFirst:t.requires_tests_first===1,reason:t.reason,linkedSpecId:t.linked_spec_id,createdAt:t.created_at,updatedAt:t.updated_at}}function Ww(t,e){let n=x(),s=w.query(t,`INSERT INTO task_pipeline_state (
|
|
1501
1501
|
project_id, task_id, workspace_id, classification, station,
|
|
1502
1502
|
requires_spec, requires_tests_first, reason, linked_spec_id,
|
package/package.json
CHANGED