prjct-cli 3.65.0 → 3.66.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/dist/bin/prjct-core.mjs +661 -632
- package/dist/bin/prjct-hooks.mjs +3 -3
- package/dist/daemon/entry.mjs +555 -526
- package/dist/mcp/server.mjs +33 -33
- package/dist/templates.json +1 -1
- package/package.json +1 -1
- package/templates/grok/SKILL.md +21 -0
package/dist/bin/prjct-hooks.mjs
CHANGED
|
@@ -1228,7 +1228,7 @@ CREATE TABLE velocity_sprints (
|
|
|
1228
1228
|
name TEXT NOT NULL,
|
|
1229
1229
|
applied_at TEXT NOT NULL
|
|
1230
1230
|
)
|
|
1231
|
-
`);let r=new Set(e.prepare("SELECT version FROM _migrations").all().map(i=>i.version)),s=Zo.filter(i=>!r.has(i.version));if(s.length!==0){if(n&&r.size>0)try{let i=`${n}.pre-migrate.bak`;fi.existsSync(i)&&fi.rmSync(i,{force:!0}),e.prepare("VACUUM INTO ?").run(i)}catch(i){console.warn(`prjct: pre-migration backup failed (continuing): ${i?.message??i}`)}for(let i of s)vu(e,()=>{i.up(e),e.prepare("INSERT INTO _migrations (version, name, applied_at) VALUES (?, ?, ?)").run(i.version,i.name,new Date().toISOString())})}}getMigrations(e){return this.getDb(e).prepare("SELECT * FROM _migrations ORDER BY version").all()}getSchemaVersion(e){return this.getDb(e).prepare("SELECT MAX(version) as version FROM _migrations").get()?.version??0}},k=new ea,E=k});function sy(t){let e=t.toLowerCase();return e.includes("github")?"github":e.includes("gitlab")?"gitlab":e.includes("bitbucket")?"bitbucket":"other"}function _u(t){let e=t.trim();if(!e)return{};let n=e.match(/^[^/@]+@([^:/]+):(.+?)(?:\.git)?\/?$/);if(n)return{provider:sy(n[1]),repoSlug:n[2]};try{let r=new URL(e),s=r.pathname.replace(/^\/+/,"").replace(/\.git$/,"").replace(/\/+$/,"");return!r.host||!s?{}:{provider:sy(r.host),repoSlug:s}}catch{return{}}}async function RN(t){try{let{stdout:e}=await U("git",["remote","get-url","origin"],{cwd:t});return e.trim()||void 0}catch{return}}async function CN(t){try{let{stdout:e}=await U("git",["symbolic-ref","--short","refs/remotes/origin/HEAD"],{cwd:t});return e.trim().replace(/^origin\//,"")||void 0}catch{return}}function rr(t){return typeof t=="string"&&t.length>0?t:void 0}function iy(t){return typeof t=="number"&&Number.isFinite(t)?t:void 0}function AN(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}async function oy(t){let e=k.getDoc(t,"project")||{},n=rr(e.repoPath),{provider:r,repoSlug:s}=n?_u(await RN(n)||""):{},i=n?await CN(n):void 0,o=Array.isArray(e.techStack)?e.techStack.filter(c=>typeof c=="string"):void 0;return AN({provider:r,repoSlug:s,currentBranch:rr(e.currentBranch),defaultBranch:i,stack:rr(e.stack),techStack:o&&o.length>0?o:void 0,version:rr(e.version),commitCount:iy(e.commitCount),fileCount:iy(e.fileCount),lastCommit:rr(e.lastSyncCommit),hasUncommitted:typeof e.hasUncommittedChanges=="boolean"?e.hasUncommittedChanges:void 0,cliVersion:rr(e.cliVersion),syncedAt:rr(e.lastSync)})}var xu=h(()=>{"use strict";O();ne();a(sy,"providerForHost");a(_u,"parseRemote");a(RN,"gitRemoteUrl");a(CN,"gitDefaultBranch");a(rr,"str");a(iy,"num");a(AN,"compact");a(oy,"buildProjectMeta")});import{execFile as IN}from"node:child_process";import NN from"node:crypto";import{promisify as DN}from"node:util";function ON(t,e=LN){let n=Buffer.from(e.replace(/-/g,""),"hex"),s=NN.createHash("sha1").update(n).update(t,"utf8").digest().subarray(0,16);s[6]=s[6]&15|80,s[8]=s[8]&63|128;let i=s.toString("hex");return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20,32)}`}async function MN(t){let e;try{let{stdout:s}=await PN("git",["remote","get-url","origin"],{cwd:t});e=s.trim()||void 0}catch{return null}if(!e)return null;let{provider:n,repoSlug:r}=_u(e);return!n||!r?null:`${n}:${r}`.toLowerCase()}async function ay(t){let e=await MN(t);return e?ON(e):null}var PN,LN,cy=h(()=>{"use strict";xu();PN=DN(IN),LN="6f9b2c1a-3d4e-5f60-8a7b-1c2d3e4f5a6b";a(ON,"uuidv5");a(MN,"repoKey");a(ay,"deriveProjectId")});var Au={};I(Au,{PACKAGE_ROOT:()=>un,VERSION:()=>Ge,getPackageRoot:()=>Cu,getVersion:()=>na,resetPackageRoot:()=>jN});import Ru from"node:fs";import ta from"node:path";function Cu(){if(ns)return ns;let t=__dirname;for(let e=0;e<5;e++){let n=ta.join(t,"package.json");if(Ru.existsSync(n))try{if(JSON.parse(Ru.readFileSync(n,"utf-8")).name==="prjct-cli")return ns=t,t}catch{}t=ta.dirname(t)}return ns=ta.join(__dirname,"..","..",".."),ns}function na(){if(sr)return sr;let t="3.
|
|
1231
|
+
`);let r=new Set(e.prepare("SELECT version FROM _migrations").all().map(i=>i.version)),s=Zo.filter(i=>!r.has(i.version));if(s.length!==0){if(n&&r.size>0)try{let i=`${n}.pre-migrate.bak`;fi.existsSync(i)&&fi.rmSync(i,{force:!0}),e.prepare("VACUUM INTO ?").run(i)}catch(i){console.warn(`prjct: pre-migration backup failed (continuing): ${i?.message??i}`)}for(let i of s)vu(e,()=>{i.up(e),e.prepare("INSERT INTO _migrations (version, name, applied_at) VALUES (?, ?, ?)").run(i.version,i.name,new Date().toISOString())})}}getMigrations(e){return this.getDb(e).prepare("SELECT * FROM _migrations ORDER BY version").all()}getSchemaVersion(e){return this.getDb(e).prepare("SELECT MAX(version) as version FROM _migrations").get()?.version??0}},k=new ea,E=k});function sy(t){let e=t.toLowerCase();return e.includes("github")?"github":e.includes("gitlab")?"gitlab":e.includes("bitbucket")?"bitbucket":"other"}function _u(t){let e=t.trim();if(!e)return{};let n=e.match(/^[^/@]+@([^:/]+):(.+?)(?:\.git)?\/?$/);if(n)return{provider:sy(n[1]),repoSlug:n[2]};try{let r=new URL(e),s=r.pathname.replace(/^\/+/,"").replace(/\.git$/,"").replace(/\/+$/,"");return!r.host||!s?{}:{provider:sy(r.host),repoSlug:s}}catch{return{}}}async function RN(t){try{let{stdout:e}=await U("git",["remote","get-url","origin"],{cwd:t});return e.trim()||void 0}catch{return}}async function CN(t){try{let{stdout:e}=await U("git",["symbolic-ref","--short","refs/remotes/origin/HEAD"],{cwd:t});return e.trim().replace(/^origin\//,"")||void 0}catch{return}}function rr(t){return typeof t=="string"&&t.length>0?t:void 0}function iy(t){return typeof t=="number"&&Number.isFinite(t)?t:void 0}function AN(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}async function oy(t){let e=k.getDoc(t,"project")||{},n=rr(e.repoPath),{provider:r,repoSlug:s}=n?_u(await RN(n)||""):{},i=n?await CN(n):void 0,o=Array.isArray(e.techStack)?e.techStack.filter(c=>typeof c=="string"):void 0;return AN({provider:r,repoSlug:s,currentBranch:rr(e.currentBranch),defaultBranch:i,stack:rr(e.stack),techStack:o&&o.length>0?o:void 0,version:rr(e.version),commitCount:iy(e.commitCount),fileCount:iy(e.fileCount),lastCommit:rr(e.lastSyncCommit),hasUncommitted:typeof e.hasUncommittedChanges=="boolean"?e.hasUncommittedChanges:void 0,cliVersion:rr(e.cliVersion),syncedAt:rr(e.lastSync)})}var xu=h(()=>{"use strict";O();ne();a(sy,"providerForHost");a(_u,"parseRemote");a(RN,"gitRemoteUrl");a(CN,"gitDefaultBranch");a(rr,"str");a(iy,"num");a(AN,"compact");a(oy,"buildProjectMeta")});import{execFile as IN}from"node:child_process";import NN from"node:crypto";import{promisify as DN}from"node:util";function ON(t,e=LN){let n=Buffer.from(e.replace(/-/g,""),"hex"),s=NN.createHash("sha1").update(n).update(t,"utf8").digest().subarray(0,16);s[6]=s[6]&15|80,s[8]=s[8]&63|128;let i=s.toString("hex");return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20,32)}`}async function MN(t){let e;try{let{stdout:s}=await PN("git",["remote","get-url","origin"],{cwd:t});e=s.trim()||void 0}catch{return null}if(!e)return null;let{provider:n,repoSlug:r}=_u(e);return!n||!r?null:`${n}:${r}`.toLowerCase()}async function ay(t){let e=await MN(t);return e?ON(e):null}var PN,LN,cy=h(()=>{"use strict";xu();PN=DN(IN),LN="6f9b2c1a-3d4e-5f60-8a7b-1c2d3e4f5a6b";a(ON,"uuidv5");a(MN,"repoKey");a(ay,"deriveProjectId")});var Au={};I(Au,{PACKAGE_ROOT:()=>un,VERSION:()=>Ge,getPackageRoot:()=>Cu,getVersion:()=>na,resetPackageRoot:()=>jN});import Ru from"node:fs";import ta from"node:path";function Cu(){if(ns)return ns;let t=__dirname;for(let e=0;e<5;e++){let n=ta.join(t,"package.json");if(Ru.existsSync(n))try{if(JSON.parse(Ru.readFileSync(n,"utf-8")).name==="prjct-cli")return ns=t,t}catch{}t=ta.dirname(t)}return ns=ta.join(__dirname,"..","..",".."),ns}function na(){if(sr)return sr;let t="3.66.0";if(t&&/^\d+\.\d+\.\d+/.test(t))return sr=t,sr;try{let e=ta.join(Cu(),"package.json");return sr=JSON.parse(Ru.readFileSync(e,"utf-8")).version,sr}catch(e){return process.env.PRJCT_DEBUG==="1"&&console.error("Failed to read version from package.json:",N(e)),"0.0.0"}}function jN(t){ns=t,sr=null}var sr,ns,Ge,un,Pt=h(()=>{"use strict";te();sr=null,ns=null;a(Cu,"getPackageRoot");a(na,"getVersion");a(jN,"resetPackageRoot");Ge=na(),un=Cu()});async function ra(t){try{let{stdout:e}=await H(t,{timeout:5e3});return{success:!0,output:e.trim()}}catch{return{success:!1,output:""}}}async function $N(){let t=await ra("gh api user --jq .login");return t.success&&t.output||(t=await ra("git config --global github.user"),t.success&&t.output)?t.output:null}async function FN(){let t=await ra("git config user.name");return t.success&&t.output?t.output:null}async function HN(){let t=await ra("git config user.email");return t.success&&t.output?t.output:null}async function rs(){let[t,e,n]=await Promise.all([$N(),FN(),HN()]);return{github:t,email:n,name:e||t||"Unknown"}}var sa=h(()=>{"use strict";ne();a(ra,"execCommand");a($N,"detectGitHubUsername");a(FN,"detectGitName");a(HN,"detectGitEmail");a(rs,"detect")});var ia={};I(ia,{worktreeService:()=>UN});import Nu from"node:fs/promises";import Vt from"node:path";var ly,Du,UN,oa=h(()=>{"use strict";ne();Q();ly=".worktrees",Du=class{static{a(this,"WorktreeService")}async create(e,n,r={}){let s=await this.getMainWorktree(e),i=Vt.join(s,ly,n),o=r.branch||`feat/${n}`;await Nu.mkdir(Vt.join(s,ly),{recursive:!0});let c=r.baseBranch?` ${r.baseBranch}`:"";await H(`git worktree add "${i}" -b "${o}"${c}`,{cwd:s});let{stdout:l}=await H("git rev-parse HEAD",{cwd:i});return{path:i,branch:o,commit:l.trim(),isMain:!1,slug:n}}async remove(e,n=!1){let r=await this.getMainWorktree(e),s;if(n)try{let{stdout:i}=await H("git rev-parse --abbrev-ref HEAD",{cwd:e});s=i.trim()}catch{}if(await H(`git worktree remove "${e}" --force`,{cwd:r}),n&&s&&s!=="main"&&s!=="master")try{await H(`git branch -D "${s}"`,{cwd:r})}catch{}}async list(e){let n=await this.getMainWorktree(e),{stdout:r}=await H("git worktree list --porcelain",{cwd:n});return this.parsePorcelainOutput(r,n)}async detect(e){try{let{stdout:n}=await H("git rev-parse --git-common-dir",{cwd:e}),{stdout:r}=await H("git rev-parse --git-dir",{cwd:e}),s=Vt.resolve(e,n.trim()),i=Vt.resolve(e,r.trim());if(s!==i){let{stdout:o}=await H("git rev-parse --abbrev-ref HEAD",{cwd:e}),{stdout:c}=await H("git rev-parse HEAD",{cwd:e}),{stdout:l}=await H("git rev-parse --show-toplevel",{cwd:e}),u=l.trim(),d=Vt.basename(u);return{path:u,branch:o.trim(),commit:c.trim(),isMain:!1,slug:d}}return null}catch{return null}}async getMainWorktree(e){try{let{stdout:r}=await H("git worktree list --porcelain",{cwd:e}),s=r.split(`
|
|
1232
1232
|
`)[0];if(s?.startsWith("worktree "))return s.replace("worktree ","").trim()}catch{}let{stdout:n}=await H("git rev-parse --show-toplevel",{cwd:e});return n.trim()}async setup(e,n){let r=Vt.join(n,".env");await L(r)&&await Nu.copyFile(r,Vt.join(e,".env"));let s=Vt.join(n,".prjct"),i=Vt.join(e,".prjct");await L(s)&&!await L(i)&&await Nu.symlink(s,i,"dir")}async teardown(e){}async clean(e){let n=await this.list(e),r=[],s=await this.getMainWorktree(e);await H("git worktree prune",{cwd:s});for(let i of n)i.isMain||await L(i.path)||r.push(i.slug);return r}parsePorcelainOutput(e,n){let r=[],s=e.trim().split(`
|
|
1233
1233
|
|
|
1234
1234
|
`);for(let i of s){if(!i.trim())continue;let o=i.trim().split(`
|
|
@@ -1483,7 +1483,7 @@ ${ki}
|
|
|
1483
1483
|
`;a(aw,"writeProjectAgentsMd")});async function lw(t){return da(t,"CLAUDE.md",iP)}var iP,uw=h(()=>{"use strict";wi();iP=`${Ei}
|
|
1484
1484
|
${or}
|
|
1485
1485
|
${ki}
|
|
1486
|
-
`;a(lw,"writeProjectClaudeMd")});import dw from"node:path";function pw(){return oP.flatMap(t=>t.projectRuleTargets??[])}var oP,mw=h(()=>{"use strict";Q();gi();zn();oP=[{id:"agents-md",displayName:"AGENTS.md-compatible agents",kind:"standard",status:"stable",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!1,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Universal project instruction surface shared by current and future coding agents."},{id:"mcp",displayName:"Model Context Protocol clients",kind:"standard",status:"stable",contextFiles:[],supports:{agentsMd:!1,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Universal tool surface for prjct memory, workflow, files, and code intelligence."},{id:"acp",displayName:"Agent Client Protocol clients",kind:"standard",status:"emerging",contextFiles:[],supports:{agentsMd:!1,mcp:!1,skills:!1,hooks:!1,acp:!0,projectRules:!1},notes:"Editor/agent transport for clients such as Zed and other ACP-compatible tools."},{id:"claude",displayName:"Claude Code",kind:"cli",status:"stable",detectsBy:{homeDirs:[".claude"],commands:["claude"]},contextFiles:["CLAUDE.md","AGENTS.md"],mcpTargets:[{format:"claude-json",pathHint:"~/.claude/mcp.json",writable:!0}],supports:{agentsMd:!1,mcp:!0,skills:!0,hooks:!0,acp:!1,projectRules:!0},notes:"Benchmark-tier CLI (2026-07): Claude Code + Opus frontier. CLAUDE.md, skills, hooks, MCP JSON."},{id:"codex",displayName:"OpenAI Codex",kind:"cli",status:"stable",detectsBy:{homeDirs:[".codex"],commands:["codex"]},contextFiles:["AGENTS.md"],mcpTargets:[{format:"codex-toml",pathHint:"~/.codex/config.toml",writable:!0}],supports:{agentsMd:!0,mcp:!0,skills:!0,hooks:!0,acp:!1,projectRules:!1},notes:"Benchmark-tier CLI (2026-07): Codex + GPT-5.x (TB leader). AGENTS.md, config.toml MCP (native), hooks opt-in (planned installer)."},{id:"gemini",displayName:"Gemini CLI",kind:"cli",status:"stable",detectsBy:{homeDirs:[".gemini"],commands:["gemini"]},contextFiles:["GEMINI.md","AGENTS.md"],mcpTargets:[{format:"claude-json",pathHint:"~/.gemini/settings.json mcpServers",writable:!0}],supports:{agentsMd:!0,mcp:!0,skills:!0,hooks:!0,acp:!1,projectRules:!0},notes:"Benchmark-tier CLI (2026-07): Gemini CLI + Pro/Flash. GEMINI.md; prjct install writes MCP+hooks to ~/.gemini/settings.json."},{id:"antigravity",displayName:"Google Antigravity",kind:"ide",status:"emerging",detectsBy:{homeDirs:[dw.join(".gemini","antigravity")]},contextFiles:["ANTIGRAVITY.md","AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!0,hooks:!1,acp:!1,projectRules:!0},notes:"Uses Antigravity skills under the Gemini config tree."},{id:"opencode",displayName:"OpenCode",kind:"cli",status:"stable",detectsBy:{homeDirs:[".config/opencode"],projectDirs:[".opencode"],commands:["opencode"]},contextFiles:["AGENTS.md","opencode.json","opencode.jsonc"],mcpTargets:[{format:"opencode-json",pathHint:"opencode.jsonc mcp",writable:!1}],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"Benchmark-tier open-source CLI (2026-07): most-starred multi-provider agent. AGENTS.md + plugins + MCP."},{id:"qwen-code",displayName:"Qwen Code",kind:"model-runtime",status:"emerging",detectsBy:{homeDirs:[".qwen"],projectDirs:[".qwen"],commands:["qwen"]},contextFiles:["AGENTS.md","GEMINI.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"Qwen-family coding runtime; treat model/provider choice as separate from runtime setup."},{id:"kimi-cli",displayName:"Kimi CLI",kind:"model-runtime",status:"emerging",detectsBy:{homeDirs:[".kimi"],projectDirs:[".kimi"],commands:["kimi"]},contextFiles:["AGENTS.md"],mcpTargets:[{format:"claude-json",pathHint:"~/.kimi/mcp.json",writable:!0}],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Kimi-family coding runtime; AGENTS.md and MCP/CLI markdown output are the portable contract."},{id:"grok",displayName:"xAI Grok Build",kind:"cli",status:"stable",detectsBy:{homeDirs:[".grok"],commands:["grok"]},contextFiles:["AGENTS.md","CLAUDE.md"],mcpTargets:[{format:"generic",pathHint:"~/.grok config/plugins (MCP)",writable:!1},{format:"claude-json",pathHint:"~/.claude/mcp.json (Grok Claude-compat)",writable:!0}],supports:{agentsMd:!0,mcp:!0,skills:!0,hooks:!0,acp:!1,projectRules:!1},notes:"Benchmark-tier CLI (2026-07): Grok Build. AGENTS.md + native Claude Code compat (CLAUDE.md, skills, MCP, hooks). prjct install covers Grok via inherits-claude \u2014 see harness-surfaces."},{id:"goose",displayName:"Goose",kind:"cli",status:"stable",detectsBy:{homeDirs:[".config/goose"],projectDirs:[".goose"],commands:["goose"]},contextFiles:["AGENTS.md"],mcpTargets:[{format:"generic",pathHint:"Goose extensions",writable:!1}],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Open-source coding agent with extension/MCP-style tool configuration."},{id:"aider",displayName:"Aider",kind:"cli",status:"stable",detectsBy:{projectFiles:[".aider.conf.yml",".aider.conf.yaml"],commands:["aider"]},contextFiles:["AGENTS.md","CONVENTIONS.md"],supports:{agentsMd:!0,mcp:!1,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"CLI pair-programming agent; AGENTS.md provides durable repo instructions."},{id:"cursor",displayName:"Cursor",kind:"ide",status:"stable",detectsBy:{projectDirs:[".cursor"],projectFiles:[".cursorrules"]},contextFiles:["AGENTS.md",".cursor/rules/prjct.mdc"],projectRuleTargets:[{relativePath:".cursor/rules/prjct.mdc",templateKey:"global/CURSOR.mdc",detectPath:".cursor"}],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!0,acp:!1,projectRules:!0},notes:"Benchmark-tier AI IDE (2026-07): agent mode + CLI. Rules under .cursor/rules; prjct install writes ~/.cursor/hooks.json."},{id:"windsurf",displayName:"Windsurf",kind:"ide",status:"legacy",detectsBy:{projectDirs:[".windsurf"],projectFiles:[".windsurfrules"]},contextFiles:["AGENTS.md",".windsurf/rules/prjct.md"],projectRuleTargets:[{relativePath:".windsurf/rules/prjct.md",templateKey:"global/WINDSURF.md",detectPath:".windsurf"}],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"LEGACY (2026-07): Windsurf is no longer a product focus. Keep AGENTS.md + optional .windsurf/rules for residual installs; do not expand surface area. Prefer Cursor, Claude Code, Codex, Gemini CLI, OpenCode, Cline."},{id:"cline",displayName:"Cline",kind:"ide",status:"stable",detectsBy:{projectDirs:[".cline",".clinerules"],projectFiles:[".clinerules"]},contextFiles:["AGENTS.md",".clinerules/"],supports:{agentsMd:!0,mcp:!0,skills:!0,hooks:!0,acp:!0,projectRules:!0},notes:"Benchmark-tier open agent (2026-07): VS Code + multi-model. AGENTS.md, rules, skills, hooks, MCP, ACP."},{id:"roo-code",displayName:"Roo Code",kind:"ide",status:"stable",detectsBy:{projectDirs:[".roo"]},contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"VS Code agent with MCP and project rule surfaces."},{id:"continue",displayName:"Continue",kind:"ide",status:"stable",detectsBy:{projectDirs:[".continue"]},contextFiles:["AGENTS.md"],mcpTargets:[{format:"continue-yaml",pathHint:".continue/mcpServers/",writable:!1}],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"IDE assistant with dedicated MCP server config directory."},{id:"kiro",displayName:"Kiro",kind:"ide",status:"stable",detectsBy:{homeDirs:[".kiro"],projectDirs:[".kiro"]},contextFiles:["AGENTS.md",".kiro/steering/"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!0,acp:!1,projectRules:!0},notes:"Agentic IDE with steering docs and MCP."},{id:"copilot",displayName:"GitHub Copilot coding agent",kind:"hosted",status:"hosted",detectsBy:{projectFiles:[dw.join(".github","copilot-instructions.md")]},contextFiles:["AGENTS.md",".github/copilot-instructions.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"GitHub Copilot coding agent / Copilot CLI (2026-07 benchmark field). Repo AGENTS.md + .github instructions + MCP."},{id:"devin",displayName:"Devin",kind:"hosted",status:"hosted",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Hosted coding agent; repo-level AGENTS.md is the safest portable surface."},{id:"jules",displayName:"Google Jules",kind:"hosted",status:"hosted",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!1,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Hosted coding agent; AGENTS.md carries repo-level prjct instructions."},{id:"zed",displayName:"Zed Agent Panel",kind:"ide",status:"stable",detectsBy:{projectDirs:[".zed"]},contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!0,projectRules:!0},notes:"Editor agent surface with ACP support; AGENTS.md remains the repo contract."},{id:"warp",displayName:"Warp",kind:"ide",status:"stable",detectsBy:{homeDirs:[".warp"]},contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Terminal agent surface; AGENTS.md plus MCP covers portable prjct usage."},{id:"amp",displayName:"Amp",kind:"cli",status:"stable",detectsBy:{homeDirs:[".config/amp"],commands:["amp"]},contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Coding agent runtime; AGENTS.md and MCP are the portable contract."},{id:"factory",displayName:"Factory",kind:"hosted",status:"hosted",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Hosted/agentic development platform; repo instructions are the stable surface."},{id:"augment",displayName:"Augment",kind:"ide",status:"stable",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"IDE agent; universal project instructions avoid model-specific coupling."},{id:"kilo-code",displayName:"Kilo Code",kind:"ide",status:"stable",detectsBy:{projectDirs:[".kilocode"]},contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"Agent runtime in the Cline/Roo family; AGENTS.md and MCP keep it compatible."},{id:"phoenix",displayName:"Phoenix",kind:"hosted",status:"hosted",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!1,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Hosted coding agent; AGENTS.md is the repo-level bridge."},{id:"ona",displayName:"Ona",kind:"hosted",status:"hosted",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!1,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Hosted coding agent; AGENTS.md is the repo-level bridge."},{id:"semgrep",displayName:"Semgrep assistant",kind:"hosted",status:"hosted",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!1,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Security/review agent surface; AGENTS.md carries project workflow guidance."}];a(pw,"listProjectRuleTargets")});import Jd from"node:fs/promises";import Fa from"node:path";async function aP(t){let e=yt(t);return e||Jd.readFile(Fa.join(un,"templates",t),"utf-8")}async function cP(t,e,n){let r=Fa.join(t,e);await Jd.mkdir(Fa.dirname(r),{recursive:!0}),await Jd.writeFile(r,await aP(n),"utf-8")}async function gw(t,e={}){let n=new Set(e.agents??[]),r=[];for(let s of pw())(n.has(s.relativePath.split("/")[0].replace(/^\./,""))||s.detectPath&&await L(Fa.join(t,s.detectPath)))&&(await cP(t,s.relativePath,s.templateKey),r.push(s.relativePath));return{written:r}}var fw=h(()=>{"use strict";cr();mw();Q();Pt();a(aP,"loadTemplate");a(cP,"writeRule");a(gw,"writeProjectIdeRules")});var yw={};I(yw,{writeProjectAgentSurfaces:()=>Un});import hw from"node:path";async function Un(t,e={}){if(!e.explicit)return{agentsMd:{action:"unchanged",path:hw.join(t,"AGENTS.md")},ideRules:[]};let n=new Set(e.agents??[]),r=await aw(t),s=await L(hw.join(t,"CLAUDE.md")),o=n.has("claude")||s?await lw(t):void 0,c=await gw(t,e);return{agentsMd:r,...o?{claudeMd:o}:{},ideRules:c.written}}var Ha=h(()=>{"use strict";Q();cw();uw();fw();a(Un,"writeProjectAgentSurfaces")});var Kd,Yd,zd=h(()=>{"use strict";Kt();O();Kd=class{static{a(this,"CustomWorkflowStorage")}createWorkflow(e,n){let r=new Date().toISOString();E.run(e,`INSERT INTO custom_workflows (name, description, created_at, updated_at, is_builtin, enabled, metadata)
|
|
1486
|
+
`;a(lw,"writeProjectClaudeMd")});import dw from"node:path";function pw(){return oP.flatMap(t=>t.projectRuleTargets??[])}var oP,mw=h(()=>{"use strict";Q();gi();zn();oP=[{id:"agents-md",displayName:"AGENTS.md-compatible agents",kind:"standard",status:"stable",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!1,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Universal project instruction surface shared by current and future coding agents."},{id:"mcp",displayName:"Model Context Protocol clients",kind:"standard",status:"stable",contextFiles:[],supports:{agentsMd:!1,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Universal tool surface for prjct memory, workflow, files, and code intelligence."},{id:"acp",displayName:"Agent Client Protocol clients",kind:"standard",status:"emerging",contextFiles:[],supports:{agentsMd:!1,mcp:!1,skills:!1,hooks:!1,acp:!0,projectRules:!1},notes:"Editor/agent transport for clients such as Zed and other ACP-compatible tools."},{id:"claude",displayName:"Claude Code",kind:"cli",status:"stable",detectsBy:{homeDirs:[".claude"],commands:["claude"]},contextFiles:["CLAUDE.md","AGENTS.md"],mcpTargets:[{format:"claude-json",pathHint:"~/.claude/mcp.json",writable:!0}],supports:{agentsMd:!1,mcp:!0,skills:!0,hooks:!0,acp:!1,projectRules:!0},notes:"Benchmark-tier CLI (2026-07): Claude Code + Opus frontier. CLAUDE.md, skills, hooks, MCP JSON."},{id:"codex",displayName:"OpenAI Codex",kind:"cli",status:"stable",detectsBy:{homeDirs:[".codex"],commands:["codex"]},contextFiles:["AGENTS.md"],mcpTargets:[{format:"codex-toml",pathHint:"~/.codex/config.toml",writable:!0}],supports:{agentsMd:!0,mcp:!0,skills:!0,hooks:!0,acp:!1,projectRules:!1},notes:"Benchmark-tier CLI (2026-07): Codex + GPT-5.x (TB leader). AGENTS.md, config.toml MCP (native), hooks opt-in (planned installer)."},{id:"gemini",displayName:"Gemini CLI",kind:"cli",status:"stable",detectsBy:{homeDirs:[".gemini"],commands:["gemini"]},contextFiles:["GEMINI.md","AGENTS.md"],mcpTargets:[{format:"claude-json",pathHint:"~/.gemini/settings.json mcpServers",writable:!0}],supports:{agentsMd:!0,mcp:!0,skills:!0,hooks:!0,acp:!1,projectRules:!0},notes:"Benchmark-tier CLI (2026-07): Gemini CLI + Pro/Flash. GEMINI.md; prjct install writes MCP+hooks to ~/.gemini/settings.json."},{id:"antigravity",displayName:"Google Antigravity",kind:"ide",status:"emerging",detectsBy:{homeDirs:[dw.join(".gemini","antigravity")]},contextFiles:["ANTIGRAVITY.md","AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!0,hooks:!1,acp:!1,projectRules:!0},notes:"Uses Antigravity skills under the Gemini config tree."},{id:"opencode",displayName:"OpenCode",kind:"cli",status:"stable",detectsBy:{homeDirs:[".config/opencode"],projectDirs:[".opencode"],commands:["opencode"]},contextFiles:["AGENTS.md","opencode.json","opencode.jsonc"],mcpTargets:[{format:"opencode-json",pathHint:"opencode.jsonc mcp",writable:!1}],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"Benchmark-tier open-source CLI (2026-07): most-starred multi-provider agent. AGENTS.md + plugins + MCP."},{id:"qwen-code",displayName:"Qwen Code",kind:"model-runtime",status:"emerging",detectsBy:{homeDirs:[".qwen"],projectDirs:[".qwen"],commands:["qwen"]},contextFiles:["AGENTS.md","GEMINI.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"Qwen-family coding runtime; treat model/provider choice as separate from runtime setup."},{id:"kimi-cli",displayName:"Kimi CLI",kind:"model-runtime",status:"emerging",detectsBy:{homeDirs:[".kimi"],projectDirs:[".kimi"],commands:["kimi"]},contextFiles:["AGENTS.md"],mcpTargets:[{format:"claude-json",pathHint:"~/.kimi/mcp.json",writable:!0}],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Kimi-family coding runtime; AGENTS.md and MCP/CLI markdown output are the portable contract."},{id:"grok",displayName:"xAI Grok Build",kind:"cli",status:"stable",detectsBy:{homeDirs:[".grok"],commands:["grok"]},contextFiles:["AGENTS.md","CLAUDE.md"],mcpTargets:[{format:"codex-toml",pathHint:"~/.grok/config.toml",writable:!0},{format:"claude-json",pathHint:"~/.claude/mcp.json (Grok Claude-compat fallback)",writable:!0}],supports:{agentsMd:!0,mcp:!0,skills:!0,hooks:!0,acp:!1,projectRules:!1},notes:"Benchmark-tier CLI (2026-07): Grok Build. Native MCP + skill via prjct install (~/.grok/config.toml + ~/.grok/skills/prjct). Hooks still Claude-compat. See harness-surfaces."},{id:"goose",displayName:"Goose",kind:"cli",status:"stable",detectsBy:{homeDirs:[".config/goose"],projectDirs:[".goose"],commands:["goose"]},contextFiles:["AGENTS.md"],mcpTargets:[{format:"generic",pathHint:"Goose extensions",writable:!1}],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Open-source coding agent with extension/MCP-style tool configuration."},{id:"aider",displayName:"Aider",kind:"cli",status:"stable",detectsBy:{projectFiles:[".aider.conf.yml",".aider.conf.yaml"],commands:["aider"]},contextFiles:["AGENTS.md","CONVENTIONS.md"],supports:{agentsMd:!0,mcp:!1,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"CLI pair-programming agent; AGENTS.md provides durable repo instructions."},{id:"cursor",displayName:"Cursor",kind:"ide",status:"stable",detectsBy:{projectDirs:[".cursor"],projectFiles:[".cursorrules"]},contextFiles:["AGENTS.md",".cursor/rules/prjct.mdc"],projectRuleTargets:[{relativePath:".cursor/rules/prjct.mdc",templateKey:"global/CURSOR.mdc",detectPath:".cursor"}],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!0,acp:!1,projectRules:!0},notes:"Benchmark-tier AI IDE (2026-07): agent mode + CLI. Rules under .cursor/rules; prjct install writes ~/.cursor/hooks.json."},{id:"windsurf",displayName:"Windsurf",kind:"ide",status:"legacy",detectsBy:{projectDirs:[".windsurf"],projectFiles:[".windsurfrules"]},contextFiles:["AGENTS.md",".windsurf/rules/prjct.md"],projectRuleTargets:[{relativePath:".windsurf/rules/prjct.md",templateKey:"global/WINDSURF.md",detectPath:".windsurf"}],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"LEGACY (2026-07): Windsurf is no longer a product focus. Keep AGENTS.md + optional .windsurf/rules for residual installs; do not expand surface area. Prefer Cursor, Claude Code, Codex, Gemini CLI, OpenCode, Cline."},{id:"cline",displayName:"Cline",kind:"ide",status:"stable",detectsBy:{projectDirs:[".cline",".clinerules"],projectFiles:[".clinerules"]},contextFiles:["AGENTS.md",".clinerules/"],supports:{agentsMd:!0,mcp:!0,skills:!0,hooks:!0,acp:!0,projectRules:!0},notes:"Benchmark-tier open agent (2026-07): VS Code + multi-model. AGENTS.md, rules, skills, hooks, MCP, ACP."},{id:"roo-code",displayName:"Roo Code",kind:"ide",status:"stable",detectsBy:{projectDirs:[".roo"]},contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"VS Code agent with MCP and project rule surfaces."},{id:"continue",displayName:"Continue",kind:"ide",status:"stable",detectsBy:{projectDirs:[".continue"]},contextFiles:["AGENTS.md"],mcpTargets:[{format:"continue-yaml",pathHint:".continue/mcpServers/",writable:!1}],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"IDE assistant with dedicated MCP server config directory."},{id:"kiro",displayName:"Kiro",kind:"ide",status:"stable",detectsBy:{homeDirs:[".kiro"],projectDirs:[".kiro"]},contextFiles:["AGENTS.md",".kiro/steering/"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!0,acp:!1,projectRules:!0},notes:"Agentic IDE with steering docs and MCP."},{id:"copilot",displayName:"GitHub Copilot coding agent",kind:"hosted",status:"hosted",detectsBy:{projectFiles:[dw.join(".github","copilot-instructions.md")]},contextFiles:["AGENTS.md",".github/copilot-instructions.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"GitHub Copilot coding agent / Copilot CLI (2026-07 benchmark field). Repo AGENTS.md + .github instructions + MCP."},{id:"devin",displayName:"Devin",kind:"hosted",status:"hosted",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Hosted coding agent; repo-level AGENTS.md is the safest portable surface."},{id:"jules",displayName:"Google Jules",kind:"hosted",status:"hosted",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!1,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Hosted coding agent; AGENTS.md carries repo-level prjct instructions."},{id:"zed",displayName:"Zed Agent Panel",kind:"ide",status:"stable",detectsBy:{projectDirs:[".zed"]},contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!0,projectRules:!0},notes:"Editor agent surface with ACP support; AGENTS.md remains the repo contract."},{id:"warp",displayName:"Warp",kind:"ide",status:"stable",detectsBy:{homeDirs:[".warp"]},contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Terminal agent surface; AGENTS.md plus MCP covers portable prjct usage."},{id:"amp",displayName:"Amp",kind:"cli",status:"stable",detectsBy:{homeDirs:[".config/amp"],commands:["amp"]},contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Coding agent runtime; AGENTS.md and MCP are the portable contract."},{id:"factory",displayName:"Factory",kind:"hosted",status:"hosted",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Hosted/agentic development platform; repo instructions are the stable surface."},{id:"augment",displayName:"Augment",kind:"ide",status:"stable",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"IDE agent; universal project instructions avoid model-specific coupling."},{id:"kilo-code",displayName:"Kilo Code",kind:"ide",status:"stable",detectsBy:{projectDirs:[".kilocode"]},contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!0,skills:!1,hooks:!1,acp:!1,projectRules:!0},notes:"Agent runtime in the Cline/Roo family; AGENTS.md and MCP keep it compatible."},{id:"phoenix",displayName:"Phoenix",kind:"hosted",status:"hosted",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!1,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Hosted coding agent; AGENTS.md is the repo-level bridge."},{id:"ona",displayName:"Ona",kind:"hosted",status:"hosted",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!1,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Hosted coding agent; AGENTS.md is the repo-level bridge."},{id:"semgrep",displayName:"Semgrep assistant",kind:"hosted",status:"hosted",contextFiles:["AGENTS.md"],supports:{agentsMd:!0,mcp:!1,skills:!1,hooks:!1,acp:!1,projectRules:!1},notes:"Security/review agent surface; AGENTS.md carries project workflow guidance."}];a(pw,"listProjectRuleTargets")});import Jd from"node:fs/promises";import Fa from"node:path";async function aP(t){let e=yt(t);return e||Jd.readFile(Fa.join(un,"templates",t),"utf-8")}async function cP(t,e,n){let r=Fa.join(t,e);await Jd.mkdir(Fa.dirname(r),{recursive:!0}),await Jd.writeFile(r,await aP(n),"utf-8")}async function gw(t,e={}){let n=new Set(e.agents??[]),r=[];for(let s of pw())(n.has(s.relativePath.split("/")[0].replace(/^\./,""))||s.detectPath&&await L(Fa.join(t,s.detectPath)))&&(await cP(t,s.relativePath,s.templateKey),r.push(s.relativePath));return{written:r}}var fw=h(()=>{"use strict";cr();mw();Q();Pt();a(aP,"loadTemplate");a(cP,"writeRule");a(gw,"writeProjectIdeRules")});var yw={};I(yw,{writeProjectAgentSurfaces:()=>Un});import hw from"node:path";async function Un(t,e={}){if(!e.explicit)return{agentsMd:{action:"unchanged",path:hw.join(t,"AGENTS.md")},ideRules:[]};let n=new Set(e.agents??[]),r=await aw(t),s=await L(hw.join(t,"CLAUDE.md")),o=n.has("claude")||s?await lw(t):void 0,c=await gw(t,e);return{agentsMd:r,...o?{claudeMd:o}:{},ideRules:c.written}}var Ha=h(()=>{"use strict";Q();cw();uw();fw();a(Un,"writeProjectAgentSurfaces")});var Kd,Yd,zd=h(()=>{"use strict";Kt();O();Kd=class{static{a(this,"CustomWorkflowStorage")}createWorkflow(e,n){let r=new Date().toISOString();E.run(e,`INSERT INTO custom_workflows (name, description, created_at, updated_at, is_builtin, enabled, metadata)
|
|
1487
1487
|
VALUES (?, ?, ?, ?, 0, 1, ?)`,n.name,n.description??null,r,r,n.metadata?JSON.stringify(n.metadata):null);let s=E.get(e,"SELECT id FROM custom_workflows WHERE name = ?",n.name);if(!s)throw new Error(`Failed to create workflow: ${n.name}`);return Qe({projectId:e,entityType:"custom_workflows",entityId:String(s.id),eventType:"upsert",data:{id:s.id,name:n.name,description:n.description??null,metadata:n.metadata??null,created_at:r,updated_at:r,is_builtin:0,enabled:1}}),s.id}getWorkflow(e,n){let r=E.get(e,"SELECT * FROM custom_workflows WHERE name = ?",n);return r?this.rowToWorkflow(r):null}getAllWorkflows(e,n=!1){let r=n?"SELECT * FROM custom_workflows ORDER BY is_builtin DESC, name ASC":"SELECT * FROM custom_workflows WHERE enabled = 1 ORDER BY is_builtin DESC, name ASC";return E.query(e,r).map(i=>this.rowToWorkflow(i))}updateWorkflow(e,n,r){if(!this.getWorkflow(e,n))return!1;let i=new Date().toISOString(),o=[],c=[];if(r.description!==void 0&&(o.push("description = ?"),c.push(r.description)),r.enabled!==void 0&&(o.push("enabled = ?"),c.push(r.enabled?1:0)),r.metadata!==void 0&&(o.push("metadata = ?"),c.push(JSON.stringify(r.metadata))),o.length===0)return!1;o.push("updated_at = ?"),c.push(i),c.push(n),E.run(e,`UPDATE custom_workflows SET ${o.join(", ")} WHERE name = ?`,...c);let l=this.getWorkflow(e,n);return l&&Qe({projectId:e,entityType:"custom_workflows",entityId:String(l.id),eventType:"upsert",data:{id:l.id,name:l.name,description:l.description??null,enabled:l.enabled?1:0,metadata:l.metadata??null,updated_at:i}}),!0}deleteWorkflow(e,n){let r=this.getWorkflow(e,n);if(!r)return!1;if(r.isBuiltin)throw new Error(`Cannot delete built-in workflow: ${n}`);return E.run(e,"UPDATE custom_workflows SET enabled = 0 WHERE name = ?",n),Qe({projectId:e,entityType:"custom_workflows",entityId:String(r.id),eventType:"delete",data:{id:r.id,name:n}}),!0}isBuiltin(e,n){return this.getWorkflow(e,n)?.isBuiltin??!1}isReservedName(e){let n=["task","done","ship","sync"],r=["add","rm","gate","list","create","delete","run","help","reset","init"];return n.includes(e)||r.includes(e)}isValidName(e){return/^[a-z0-9-]+$/.test(e)}rowToWorkflow(e){return{id:e.id,name:e.name,description:e.description,createdAt:e.created_at,updatedAt:e.updated_at,isBuiltin:e.is_builtin===1,enabled:e.enabled===1,metadata:e.metadata?JSON.parse(e.metadata):null}}},Yd=new Kd});function Qd(t){let e=t.trust_source==="imported"?"imported":"local",n=lP.includes(t.type)?t.type:"step";return{id:t.id,type:n,command:t.command,position:t.position,action:t.action,description:t.description,enabled:t.enabled===1,timeoutMs:t.timeout_ms,createdAt:t.created_at,sortOrder:t.sort_order,whenExpr:t.when_expr??null,parallel:t.parallel===null?!0:t.parallel===1,trustSource:e}}var lP,Zd,ct,Ua=h(()=>{"use strict";Kt();zd();O();lP=["hook","gate","step","instruction"];a(Qd,"rowToRule");Zd=class{static{a(this,"WorkflowRuleStorage")}addRule(e,n){let r=k.get(e,"SELECT MAX(sort_order) as m FROM workflow_rules WHERE command = ?",n.command),s=n.sortOrder||(r?.m??-1)+1;k.run(e,`INSERT INTO workflow_rules (type, command, position, action, description, enabled, timeout_ms, created_at, sort_order, when_expr, parallel, trust_source)
|
|
1488
1488
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,n.type,n.command,n.position,n.action,n.description??null,n.enabled?1:0,n.timeoutMs,n.createdAt,s,n.whenExpr??null,n.parallel===!1?0:1,n.trustSource??"local");let o=k.get(e,"SELECT last_insert_rowid() as id")?.id??0;return o>0&&Qe({projectId:e,entityType:"workflow_rules",entityId:String(o),eventType:"upsert",data:{id:o,type:n.type,command:n.command,position:n.position,action:n.action,description:n.description??null,enabled:n.enabled?1:0,timeout_ms:n.timeoutMs,sort_order:s,when_expr:n.whenExpr??null,parallel:n.parallel===!1?0:1,trust_source:n.trustSource??"local",created_at:n.createdAt}}),o}removeRule(e,n){return k.get(e,"SELECT id FROM workflow_rules WHERE id = ?",n)?(k.run(e,"DELETE FROM workflow_rules WHERE id = ?",n),Qe({projectId:e,entityType:"workflow_rules",entityId:String(n),eventType:"delete",data:{id:n}}),!0):!1}updateRule(e,n,r){if(!k.get(e,"SELECT id FROM workflow_rules WHERE id = ?",n))return!1;let i={type:{column:"type"},command:{column:"command"},position:{column:"position"},action:{column:"action"},description:{column:"description"},enabled:{column:"enabled",transform:a(l=>l?1:0,"transform")},timeoutMs:{column:"timeout_ms"},createdAt:{column:"created_at"},sortOrder:{column:"sort_order"},whenExpr:{column:"when_expr"},parallel:{column:"parallel",transform:a(l=>l===!1?0:1,"transform")},trustSource:{column:"trust_source"}},o=[],c=[];for(let[l,u]of Object.entries(r)){let d=i[l];if(!d)continue;o.push(`${d.column} = ?`);let m=u;c.push(d.transform?d.transform(m):m)}return o.length===0||(c.push(n),k.run(e,`UPDATE workflow_rules SET ${o.join(", ")} WHERE id = ?`,...c)),!0}getRuleById(e,n){let r=k.get(e,"SELECT * FROM workflow_rules WHERE id = ?",n);return r?Qd(r):null}getRulesForCommand(e,n){let r=Yd.getWorkflow(e,n);return!r||!r.enabled?[]:k.query(e,"SELECT * FROM workflow_rules WHERE command = ? AND enabled = 1 ORDER BY sort_order ASC",n).map(Qd)}getAllRules(e){return k.query(e,"SELECT * FROM workflow_rules ORDER BY command ASC, sort_order ASC").map(Qd)}resetRules(e){let n=k.get(e,"SELECT COUNT(*) as c FROM workflow_rules");return k.run(e,"DELETE FROM workflow_rules"),n?.c??0}},ct=new Zd});import Xe from"node:path";async function uP(t,e){let n=e?.packageManager?.trim().toLowerCase();return n?.startsWith("pnpm@")?"pnpm":n?.startsWith("yarn@")?"yarn":n?.startsWith("bun@")?"bun":n?.startsWith("npm@")?"npm":await L(Xe.join(t,"pnpm-lock.yaml"))?"pnpm":await L(Xe.join(t,"yarn.lock"))?"yarn":await L(Xe.join(t,"bun.lockb"))||await L(Xe.join(t,"bun.lock"))?"bun":(await L(Xe.join(t,"package-lock.json")),"npm")}function Ew(t,e){return t==="yarn"?`yarn ${e}`:t==="pnpm"?`pnpm run ${e}`:t==="bun"?`bun run ${e}`:`npm run ${e}`}function dP(t){return t==="yarn"?"yarn test":t==="pnpm"?"pnpm test":t==="bun"?"bun test":"npm test"}async function Es(t,e){for(let s of pP)if(await L(Xe.join(t,s)))return s;let r=(e??await _n(t)).find(s=>s.endsWith(mP));if(r)return r}async function mn(t){for(let e of gP)if(await L(Xe.join(t,e)))return e}async function Qt(t){let e=Xe.join(t,"package.json"),n=await Oe(e,null);if(n){let c=await uP(t,n),l=n.scripts||{},u={stack:"js",packageManager:c};return l.lint&&(u.lint={tool:c,command:Ew(c,"lint")}),l.typecheck&&(u.typecheck={tool:c,command:Ew(c,"typecheck")}),l.test&&(u.test={tool:c,command:dP(c)}),u.versionFile=await Es(t),u.changelogFile=await mn(t),u}if(await L(Xe.join(t,"pytest.ini"))){let c=await Es(t),l=await mn(t);return{stack:"python",test:{tool:"pytest",command:"pytest"},versionFile:c,changelogFile:l}}let r=await vt(Xe.join(t,"pyproject.toml"),"");if(r.includes("[tool.pytest")||r.includes("pytest")){let c=await Es(t),l=await mn(t);return{stack:"python",test:{tool:"pytest",command:"pytest"},versionFile:c,changelogFile:l}}if(await L(Xe.join(t,"Cargo.toml"))){let c=await mn(t);return{stack:"rust",test:{tool:"cargo",command:"cargo test"},versionFile:"Cargo.toml",changelogFile:c}}if(await L(Xe.join(t,"go.mod"))){let c=await Es(t),l=await mn(t);return{stack:"go",test:{tool:"go",command:"go test ./..."},versionFile:c,changelogFile:l}}let s=await _n(t);if(s.some(c=>c.endsWith(".sln")||c.endsWith(".csproj")||c.endsWith(".fsproj"))){let c=await Es(t,s),l=await mn(t);return{stack:"dotnet",test:{tool:"dotnet",command:"dotnet test"},versionFile:c,changelogFile:l}}if(await L(Xe.join(t,"pom.xml"))){let c=await mn(t);return{stack:"java",test:{tool:"maven",command:"mvn test"},versionFile:"pom.xml",changelogFile:c}}if(await L(Xe.join(t,"gradlew"))&&(await L(Xe.join(t,"build.gradle"))||await L(Xe.join(t,"build.gradle.kts")))){let c=await mn(t);return{stack:"java",test:{tool:"gradle",command:"./gradlew test"},changelogFile:c}}let i=await Es(t),o=await mn(t);return{stack:"unknown",versionFile:i,changelogFile:o}}var pP,mP,gP,Ii=h(()=>{"use strict";Q();a(uP,"detectPackageManager");a(Ew,"pmRun");a(dP,"pmTest");pP=["package.json","Cargo.toml","pyproject.toml","VERSION","version.txt"],mP=".csproj",gP=["CHANGELOG.md","HISTORY.md","NEWS.md","CHANGES.md"];a(Es,"detectVersionFile");a(mn,"detectChangelogFile");a(Qt,"detectProjectCommands")});var ep={};I(ep,{AI_AGENTS:()=>Ga,PROJECT_TYPES:()=>ks,detectInstalledAgents:()=>qa,detectProjectType:()=>Xa,detectStack:()=>Va});import Ba from"node:fs/promises";import Wa from"node:os";import Ae from"node:path";async function Xa(t){try{let e=await Ba.readdir(t);if(e.includes("turbo.json")||e.includes("lerna.json")||e.includes("nx.json"))return"monorepo";if(e.includes("package.json")){let n=Ae.join(t,"package.json"),r=JSON.parse(await Ba.readFile(n,"utf-8")),s={...r.dependencies,...r.devDependencies};if(r.bin)return"cli-tool";if(r.main&&!s.react&&!s.vue&&!s.angular&&!s.express&&!s.hono)return"library";if((s.react||s.vue)&&(s.express||s.hono||s.fastify))return"fullstack";if(s.react||s.vue||s["@angular/core"]||s.next||s.nuxt)return"web-app";if(s.express||s.hono||s.fastify||s.koa||s.nestjs)return"api-backend"}return e.includes("pyproject.toml")||e.includes("setup.py")?e.some(r=>["main.py","app.py","server.py"].includes(r))?"api-backend":"library":e.includes("go.mod")?e.includes("main.go")?"cli-tool":"library":e.includes("Cargo.toml")?"cli-tool":"unknown"}catch{return"unknown"}}async function qa(t){let e=[];await je(Ae.join(Wa.homedir(),".claude"))&&e.push("claude"),await L(Ae.join(t,".cursorrules"))&&e.push("cursor"),await L(Ae.join(t,".windsurfrules"))&&e.push("windsurf"),await L(Ae.join(t,".github","copilot-instructions.md"))&&e.push("copilot"),await je(Ae.join(Wa.homedir(),".gemini"))&&e.push("gemini"),await je(Ae.join(Wa.homedir(),".gemini","antigravity"))&&e.push("antigravity"),await je(Ae.join(t,".opencode"))&&e.push("opencode"),await je(Ae.join(t,".qwen"))&&e.push("qwen-code"),await je(Ae.join(t,".goose"))&&e.push("goose"),(await L(Ae.join(t,".aider.conf.yml"))||await L(Ae.join(t,".aider.conf.yaml")))&&e.push("aider"),(await je(Ae.join(t,".cline"))||await je(Ae.join(t,".clinerules"))||await L(Ae.join(t,".clinerules")))&&e.push("cline"),await je(Ae.join(t,".roo"))&&e.push("roo-code"),await je(Ae.join(t,".continue"))&&e.push("continue"),await je(Ae.join(t,".kiro"))&&e.push("kiro"),await je(Ae.join(t,".zed"))&&e.push("zed");try{let{execAsync:n}=await Promise.resolve().then(()=>(ne(),di));await n("which codex"),e.push("codex")}catch{await je(Ae.join(Wa.homedir(),".codex"))&&e.push("codex")}return e}async function Va(t){let e={language:"Unknown",technologies:[]};try{let n=await Ba.readdir(t);if(n.includes("package.json")){let r=Ae.join(t,"package.json"),s=JSON.parse(await Ba.readFile(r,"utf-8")),i={...s.dependencies,...s.devDependencies};e.language=i.typescript?"TypeScript":"JavaScript",i.next?e.framework="Next.js":i.nuxt?e.framework="Nuxt":i.react?e.framework="React":i.vue?e.framework="Vue":i["@angular/core"]?e.framework="Angular":i.express?e.framework="Express":i.hono?e.framework="Hono":i.fastify?e.framework="Fastify":(i.nestjs||i["@nestjs/core"])&&(e.framework="NestJS"),i.bun||i["@types/bun"]||s.engines?.bun?e.runtime="Bun":e.runtime="Node.js",n.includes("bun.lockb")?e.packageManager="Bun":n.includes("pnpm-lock.yaml")?e.packageManager="pnpm":n.includes("yarn.lock")?e.packageManager="Yarn":n.includes("package-lock.json")&&(e.packageManager="npm"),(i.prisma||i["@prisma/client"])&&e.technologies.push("Prisma"),(i.drizzle||i["drizzle-orm"])&&e.technologies.push("Drizzle"),i.tailwindcss&&e.technologies.push("Tailwind CSS"),i.zod&&e.technologies.push("Zod"),(i.trpc||i["@trpc/server"])&&e.technologies.push("tRPC")}else n.includes("pyproject.toml")||n.includes("requirements.txt")?e.language="Python":n.includes("go.mod")?e.language="Go":n.includes("Cargo.toml")?e.language="Rust":(n.includes("pom.xml")||n.includes("build.gradle"))&&(e.language="Java");return e}catch{return e}}var ks,Ga,Ja=h(()=>{"use strict";Q();ks=[{value:"web-app",title:"Web Application",description:"React, Vue, Angular, Next.js, etc."},{value:"api-backend",title:"API / Backend Service",description:"Express, Hono, FastAPI, etc."},{value:"fullstack",title:"Full-Stack (Monorepo)",description:"Frontend + Backend in one repo"},{value:"cli-tool",title:"CLI Tool",description:"Command-line application"},{value:"library",title:"Library / Package",description:"Reusable npm/pip/cargo package"},{value:"monorepo",title:"Monorepo (Multiple Projects)",description:"Turborepo, Nx, Lerna, etc."}],Ga=[{value:"claude",title:"Claude Code",description:"Anthropic's Claude in VS Code/CLI"},{value:"cursor",title:"Cursor",description:"AI-first code editor"},{value:"windsurf",title:"Windsurf",description:"Codeium's AI IDE"},{value:"copilot",title:"GitHub Copilot",description:"GitHub's AI pair programmer"},{value:"gemini",title:"Gemini CLI",description:"Google's Gemini in terminal"},{value:"codex",title:"OpenAI Codex",description:"OpenAI's coding agent in terminal"},{value:"opencode",title:"OpenCode",description:"Open-source terminal coding agent"},{value:"qwen-code",title:"Qwen Code",description:"Qwen-family coding runtime"},{value:"goose",title:"Goose",description:"Open-source coding agent with extensions"},{value:"aider",title:"Aider",description:"Terminal pair-programming agent"},{value:"cline",title:"Cline",description:"VS Code coding agent"},{value:"roo-code",title:"Roo Code",description:"VS Code coding agent with MCP"},{value:"continue",title:"Continue",description:"IDE assistant with MCP config"},{value:"kiro",title:"Kiro",description:"Agentic IDE with steering docs"},{value:"zed",title:"Zed",description:"Editor agent with ACP support"}];a(Xa,"detectProjectType");a(qa,"detectInstalledAgents");a(Va,"detectStack")});import*as le from"@clack/prompts";import Er from"chalk";var Ni,kw=h(()=>{"use strict";at();Ja();Ni=class{static{a(this,"OnboardingWizard")}projectPath;aborted=!1;detectedType="unknown";confirmedType="unknown";selectedAgents=[];detectedStack={language:"Unknown",technologies:[]};confirmedStack={language:"Unknown",technologies:[]};preferences={verbosity:"normal",autoSync:!0,telemetry:!1};constructor(e=process.cwd()){this.projectPath=e}async run(){le.intro(Er.cyan.bold("\u26A1 prjct-cli setup"));let e=[{id:"project-type",title:"Project Type",run:a(()=>this.stepProjectType(),"run")},{id:"ai-agents",title:"AI Agents",run:a(()=>this.stepAIAgents(),"run")},{id:"stack",title:"Stack Confirmation",run:a(()=>this.stepStack(),"run")},{id:"preferences",title:"Preferences",run:a(()=>this.stepPreferences(),"run")},{id:"summary",title:"Summary",run:a(()=>this.stepSummary(),"run")}];for(let n of e)if(!await n.run()||this.aborted)return this.buildResult(!0);return le.outro(Er.green("Setup complete!")),this.buildResult(!1)}async runNonInteractive(){C.spin("Auto-detecting project configuration..."),this.detectedType=await Xa(this.projectPath),this.confirmedType=this.detectedType;let e=await qa(this.projectPath);return this.selectedAgents=e,this.detectedStack=await Va(this.projectPath),this.confirmedStack=this.detectedStack,C.done("Configuration detected"),this.buildResult(!1)}async stepProjectType(){this.detectedType=await Xa(this.projectPath);let e=ks.findIndex(r=>r.value===this.detectedType),n=await le.select({message:this.detectedType!=="unknown"?`Detected: ${this.getProjectTypeLabel(this.detectedType)}. Is this correct?`:"What type of project is this?",options:ks.map(r=>({label:r.title,hint:r.description,value:r.value})),initialValue:e>=0?ks[e].value:void 0});return le.isCancel(n)?(this.handleCancel(),!1):(this.confirmedType=n||this.detectedType,!0)}async stepAIAgents(){let e=await qa(this.projectPath),n=Ga.map(s=>({label:s.title,hint:s.description,value:s.value})),r=await le.multiselect({message:"Which AI agents do you use?",options:n,initialValues:e,required:!0});return le.isCancel(r)?(this.handleCancel(),!1):(this.selectedAgents=r,!0)}async stepStack(){this.detectedStack=await Va(this.projectPath);let e=this.formatStackDisplay(this.detectedStack);le.note(e,"Detected stack");let n=await le.confirm({message:"Is this stack correct?",initialValue:!0});if(le.isCancel(n))return this.handleCancel(),!1;if(n)this.confirmedStack=this.detectedStack;else{let r=await le.group({language:a(()=>le.text({message:"Primary language:",defaultValue:this.detectedStack.language}),"language"),framework:a(()=>le.text({message:"Framework (optional):",defaultValue:this.detectedStack.framework||""}),"framework")},{onCancel:a(()=>this.handleCancel(),"onCancel")});if(this.aborted)return!1;this.confirmedStack={...this.detectedStack,language:r.language||this.detectedStack.language,framework:r.framework||void 0}}return!0}async stepPreferences(){let e=await le.group({verbosity:a(()=>le.select({message:"Output verbosity:",options:[{label:"Minimal",hint:"Essential output only",value:"minimal"},{label:"Normal (Recommended)",hint:"Balanced information",value:"normal"},{label:"Verbose",hint:"Detailed logging",value:"verbose"}],initialValue:"normal"}),"verbosity"),autoSync:a(()=>le.confirm({message:"Auto-sync context on file changes?",initialValue:!0}),"autoSync")},{onCancel:a(()=>this.handleCancel(),"onCancel")});return this.aborted?!1:(this.preferences={verbosity:e.verbosity||"normal",autoSync:e.autoSync??!0,telemetry:!1},!0)}async stepSummary(){let e=[`${Er.cyan("Project Type:")} ${this.getProjectTypeLabel(this.confirmedType)}`,`${Er.cyan("AI Agents:")} ${this.selectedAgents.map(r=>this.getAgentLabel(r)).join(", ")}`,`${Er.cyan("Stack:")} ${this.formatStackDisplay(this.confirmedStack)}`,`${Er.cyan("Verbosity:")} ${this.preferences.verbosity}`,`${Er.cyan("Auto-sync:")} ${this.preferences.autoSync?"Yes":"No"}`].join(`
|
|
1489
1489
|
`);le.note(e,"Configuration Summary");let n=await le.confirm({message:"Generate configuration with these settings?",initialValue:!0});return le.isCancel(n)||!n?(le.isCancel(n)&&this.handleCancel(),!1):!0}handleCancel(){this.aborted=!0,le.cancel("Setup cancelled. Run again anytime.")}getProjectTypeLabel(e){return ks.find(n=>n.value===e)?.title||"Unknown"}getAgentLabel(e){return Ga.find(n=>n.value===e)?.title||e}formatStackDisplay(e){let n=[e.language];return e.framework&&n.push(e.framework),e.runtime&&e.runtime!=="Node.js"&&n.push(e.runtime),e.technologies.length>0&&n.push(`+ ${e.technologies.slice(0,3).join(", ")}`),n.join(" / ")}buildResult(e){return{projectType:this.confirmedType,agents:this.selectedAgents,stack:this.confirmedStack,preferences:this.preferences,skipped:e}}getSelectedAgents(){return this.selectedAgents}getConfirmedStack(){return this.confirmedStack}getPreferences(){return this.preferences}}});import xt from"node:fs/promises";import $t from"node:path";var tp,fP,$e,ww=h(()=>{"use strict";te();ne();Q();tp=class{static{a(this,"CodebaseAnalyzer")}projectPath=null;init(e=process.cwd()){this.projectPath=e}async readPackageJson(){try{let e=$t.join(this.projectPath,"package.json"),n=await xt.readFile(e,"utf-8");return JSON.parse(n)}catch(e){if(K(e)||e instanceof SyntaxError)return null;throw e}}async readCargoToml(){try{let e=$t.join(this.projectPath,"Cargo.toml");return await xt.readFile(e,"utf-8")}catch(e){if(K(e))return null;throw e}}async readRequirements(){try{let e=$t.join(this.projectPath,"requirements.txt");return await xt.readFile(e,"utf-8")}catch(e){if(K(e))return null;throw e}}async readGoMod(){try{let e=$t.join(this.projectPath,"go.mod");return await xt.readFile(e,"utf-8")}catch(e){if(K(e))return null;throw e}}async readGemfile(){try{let e=$t.join(this.projectPath,"Gemfile");return await xt.readFile(e,"utf-8")}catch(e){if(K(e))return null;throw e}}async readMixExs(){try{let e=$t.join(this.projectPath,"mix.exs");return await xt.readFile(e,"utf-8")}catch(e){if(K(e))return null;throw e}}async readPomXml(){try{let e=$t.join(this.projectPath,"pom.xml");return await xt.readFile(e,"utf-8")}catch(e){if(K(e))return null;throw e}}async readComposerJson(){try{let e=$t.join(this.projectPath,"composer.json"),n=await xt.readFile(e,"utf-8");return JSON.parse(n)}catch(e){if(K(e)||e instanceof SyntaxError)return null;throw e}}async readPyprojectToml(){try{let e=$t.join(this.projectPath,"pyproject.toml");return await xt.readFile(e,"utf-8")}catch(e){if(K(e))return null;throw e}}async getFileExtensions(){try{let{stdout:e}=await H('find . -type f ! -path "*/node_modules/*" ! -path "*/.git/*" ! -path "*/dist/*" ! -path "*/.next/*" | sed "s/.*\\./\\./" | sort | uniq -c | sort -rn',{cwd:this.projectPath}),n={};return e.trim().split(`
|
|
@@ -1710,7 +1710,7 @@ ${Ev(e,n)}`}function Ws(t){let e=Object.entries(t).filter(([,s])=>s!=null);if(e.
|
|
|
1710
1710
|
> ${e}`:`## ${t}`}function kv(t){return`> **WARNING:** ${t}`}function J$(...t){return t.filter(Boolean).join(`
|
|
1711
1711
|
|
|
1712
1712
|
`)}var qn=h(()=>{"use strict";Pt();a(q$,"mdHeader");a(V$,"mdFooter");a(ae,"mdOutput");a(Ev,"mdTable");a(dt,"mdSection");a(Tt,"mdList");a(zc,"mdNextSteps");a(Ws,"mdStats");a(Ut,"mdDone");a(kv,"mdWarn");a(J$,"mdJoin")});import pg from"chalk";function mg(t){return K$[t]??t}function Qc(t,e={}){if(e.quiet)return;let n=Tv[t]||"idle",r=hs.getValidCommands(n);if(r.length===0)return;let s=r.map(i=>({cmd:`p. ${mg(i)}`,desc:wv[i]||i}));console.log(pg.dim(`
|
|
1713
|
-
Next:`));for(let i of s){let o=pg.cyan(i.cmd.padEnd(12));console.log(pg.dim(` ${o} \u2192 ${i.desc}`))}}function Zc(t,e=!1){let n=Tv[t]||"idle";return hs.getValidCommands(n).map(s=>({cmd:e?`prjct ${mg(s)} --md`:`p. ${mg(s)}`,desc:wv[s]||s}))}var wv,K$,Tv,el=h(()=>{"use strict";Cd();wv={task:"Start new work cycle",done:"Complete current work",pause:"Pause and switch context",resume:"Continue paused task",ship:"Ship the feature",reopen:"Reopen for rework",next:"View task queue",sync:"Analyze project",bug:"Report a bug",idea:"Capture an idea"},K$={task:"work"};a(mg,"publicCommand");Tv={task:"working",done:"completed","done-subtask":"working",pause:"paused",resume:"working",ship:"shipped",reopen:"working",next:"idle",sync:"idle",init:"idle",bug:"working",idea:"idle"};a(Qc,"showNextSteps");a(Zc,"getNextSteps")});var tl,Y$,z$,Sv=h(()=>{"use strict";tl=[{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: compact Function/Class/File + CALLS snapshot \u2192 cloud 3D","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:"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:"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"}))],Y$={"-h":"help","--help":"help","-v":"version","--version":"version"},z$=new Set([...tl.filter(t=>t.routingMode==="bin-only").map(t=>t.name),...Object.entries(Y$).filter(([,t])=>tl.some(e=>e.name===t&&e.routingMode==="bin-only")).map(([t])=>t)])});var bv,vv=h(()=>{"use strict";Sv();bv=new Set(tl.filter(t=>t.routing).map(t=>t.name))});var _v={};I(_v,{getGitBranch:()=>Or,getModifiedFiles:()=>gg});async function Or(t){try{let{stdout:e}=await H("git branch --show-current",{cwd:t});return e.trim()||void 0}catch{return}}async function gg(t,e=20){try{let{stdout:n}=await H("git diff --name-only HEAD 2>/dev/null || git diff --name-only 2>/dev/null",{cwd:t});return n.trim().split(`
|
|
1713
|
+
Next:`));for(let i of s){let o=pg.cyan(i.cmd.padEnd(12));console.log(pg.dim(` ${o} \u2192 ${i.desc}`))}}function Zc(t,e=!1){let n=Tv[t]||"idle";return hs.getValidCommands(n).map(s=>({cmd:e?`prjct ${mg(s)} --md`:`p. ${mg(s)}`,desc:wv[s]||s}))}var wv,K$,Tv,el=h(()=>{"use strict";Cd();wv={task:"Start new work cycle",done:"Complete current work",pause:"Pause and switch context",resume:"Continue paused task",ship:"Ship the feature",reopen:"Reopen for rework",next:"View task queue",sync:"Analyze project",bug:"Report a bug",idea:"Capture an idea"},K$={task:"work"};a(mg,"publicCommand");Tv={task:"working",done:"completed","done-subtask":"working",pause:"paused",resume:"working",ship:"shipped",reopen:"working",next:"idle",sync:"idle",init:"idle",bug:"working",idea:"idle"};a(Qc,"showNextSteps");a(Zc,"getNextSteps")});var tl,Y$,z$,Sv=h(()=>{"use strict";tl=[{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: compact Function/Class/File + CALLS snapshot \u2192 cloud 3D","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:"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"}))],Y$={"-h":"help","--help":"help","-v":"version","--version":"version"},z$=new Set([...tl.filter(t=>t.routingMode==="bin-only").map(t=>t.name),...Object.entries(Y$).filter(([,t])=>tl.some(e=>e.name===t&&e.routingMode==="bin-only")).map(([t])=>t)])});var bv,vv=h(()=>{"use strict";Sv();bv=new Set(tl.filter(t=>t.routing).map(t=>t.name))});var _v={};I(_v,{getGitBranch:()=>Or,getModifiedFiles:()=>gg});async function Or(t){try{let{stdout:e}=await H("git branch --show-current",{cwd:t});return e.trim()||void 0}catch{return}}async function gg(t,e=20){try{let{stdout:n}=await H("git diff --name-only HEAD 2>/dev/null || git diff --name-only 2>/dev/null",{cwd:t});return n.trim().split(`
|
|
1714
1714
|
`).filter(r=>r.length>0).slice(0,e)}catch{return[]}}var Bs=h(()=>{"use strict";ne();a(Or,"getGitBranch");a(gg,"getModifiedFiles")});function Q$(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 xv(t,e){let n=go(t,e.taskId,e.workspaceId),r=_(),s=n?.createdAt??r;return k.run(t,`INSERT INTO task_pipeline_state (
|
|
1715
1715
|
project_id, task_id, workspace_id, classification, station,
|
|
1716
1716
|
requires_spec, requires_tests_first, reason, linked_spec_id,
|