@a-company/paradigm 5.37.3 → 5.37.4

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.
@@ -59,7 +59,7 @@ payloads:
59
59
  title: "New Task"
60
60
  description: "Task description"
61
61
  `},null,2)};if(!n){let c=vs(r);return {handled:true,text:JSON.stringify({available:c,usage:{getAllUsers:'paradigm_test_fixtures({ category: "users" })',getSpecificUser:'paradigm_test_fixtures({ category: "users", name: "admin" })',getAllPayloads:'paradigm_test_fixtures({ category: "payloads" })',getEverything:'paradigm_test_fixtures({ category: "all" })'}},null,2)}}if(i&&n!=="all"){let c=xo(r,n,i);if(!c){let d=vs(r);return {handled:true,text:JSON.stringify({error:`Fixture "${i}" not found in category "${n}"`,availableInCategory:d[n]||[]},null,2)}}return {handled:true,text:JSON.stringify(c,null,2)}}let o=ws(r,n);return {handled:true,text:JSON.stringify(o,null,2)}}default:return {handled:false,text:""}}}z();function mn(t,e,s={}){let{maxResults:n=20}=s,i=[],r=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=[`rg -n --no-heading "${r}" "${t}" --glob "!node_modules" --glob "!.git" --glob "!dist" --glob "!build" --glob "!coverage" --max-count 50 2>/dev/null`,`grep -rn "${r}" "${t}" --exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage 2>/dev/null | head -50`],a="";for(let l of o)try{if(a=execSync(l,{encoding:"utf8",maxBuffer:1024*1024}),a.trim())break}catch{continue}if(!a.trim())return i;let c=a.trim().split(`
62
- `);for(let l of c.slice(0,n)){let d=l.match(/^(.+?):(\d+):(.*)$/);if(d){let[,u,g,p]=d,m=q.relative(t,u),f="unknown";m.includes(".purpose")||m.includes("portal.yaml")?f="purpose":p.includes("//")||p.includes("#")||p.includes("*")?f="comment":f="code",i.push({filePath:m,line:parseInt(g,10),content:p.trim().slice(0,200),context:f});}}return i}function jo(){return [{name:"paradigm_ripple",description:"IMPORTANT: Call BEFORE modifying any symbol to understand impact. Shows what depends on it directly and indirectly, helping you avoid breaking changes. Returns direct and indirect dependents with file paths and dependency depth. ~300 tokens.",inputSchema:{type:"object",properties:{symbol:{type:"string",description:'Symbol to analyze (e.g., "#checkout", "$payment-flow", "^authenticated")'},depth:{type:"number",description:"How many hops to traverse (default: 3, max: 5)"},includeWorkspace:{type:"boolean",description:"Also check sibling workspace projects for cross-project impact (default: false). Requires workspace configured in config.yaml."},response_format:{type:"string",enum:["concise","detailed"],description:'Response detail level. "concise" returns minimal fields to save tokens (default: "detailed")'}},required:["symbol"]},annotations:{readOnlyHint:true,destructiveHint:false},aliases:["dependencies","impact","blast radius","what would break","dependents","affects"]}]}async function fn(t,e,s){if(t!=="paradigm_ripple")return {handled:false,text:""};let{symbol:n,depth:i$1=3,includeWorkspace:r=false,response_format:o$1}=e,a=h(s.index,n);if(!a){let x=Al(s.rootDir,n);return o(x.length,t),{handled:true,text:x}}let c=Math.min(Math.max(i$1||3,1),5),l$1=k(s.index,n),d=new Set([n]),u=new Map;function g(x,_){if(_>=c)return;let R=[];for(let I of x){if(d.has(I))continue;d.add(I);let P=k(s.index,I);for(let D of P)d.has(D.symbol)||R.push(D.symbol);}R.length>0&&(u.set(_+1,R),g(R,_+1));}g(l$1.map(x=>x.symbol),1);let p=new Set;for(let[,x]of u)for(let _ of x)_!==n&&!l$1.find(R=>R.symbol===_)&&p.add(_);let m=l(s.index,n),f=l$1.length+p.size,y="low";f>10?y="high":f>3&&(y="medium");let b=await dn(s.rootDir),h$1=null;if(b){let x=pn(b,n);x.totalFlows>0&&(x.impactLevel==="high"&&y==="low"?y="medium":x.impactLevel==="high"&&(y="high"),h$1={totalFlows:x.totalFlows,affectedFlows:x.affectedFlows.map(_=>({flowId:_.flowId,impactLevel:_.downstreamSteps.length>2?"high":"medium",reason:`Symbol is in step ${_.stepAffected.position}, affects ${_.downstreamSteps.length} downstream steps`})),validationSuggestion:x.validationCommands.length>0?`Run: ${x.validationCommands[0]}`:void 0});}let v=new Set([n,...l$1.map(x=>x.symbol),...p]),w=[];try{let x=i(s.index,"gate");for(let _ of x)v.has(_.symbol)&&w.push({gate:_.symbol,description:_.description});for(let _ of l$1)_.type==="gate"&&!w.find(R=>R.gate===_.symbol)&&w.push({gate:_.symbol,description:_.description});}catch{}let S={symbol:a.symbol,type:a.type,description:a.description,depth:c,impact:y,analysis:{directlyAffected:l$1.map(x=>({symbol:x.symbol,type:x.type,description:x.description})),indirectlyAffected:Array.from(p),indirectByLevel:Object.fromEntries(u),dependsOn:m.map(x=>({symbol:x.symbol,type:x.type}))},summary:{directCount:l$1.length,indirectCount:p.size,totalAffected:f,dependsOnCount:m.length,levelsAnalyzed:c},recommendation:Il(y)};h$1&&(S.affectedFlows=h$1),w.length>0&&(S.affectedGates=w),S.suggestedReviewScope=$l(y,l$1.length,p.size,w.length,h$1?.totalFlows??0);try{let x=await F(s.rootDir,n);x.length>0&&(S.personas_affected=x,x.length>2&&y==="low"&&(S.impact="medium"));}catch{}try{let x=R(s.rootDir,n);x.length>0&&(S.university_content_affected=x.map(_=>({id:_.id,title:_.title,type:_.type,stale:_.stale})));}catch{}if(r&&s.workspace){let x=io(s.workspace,n);if(x.length>0){S.workspaceImpact={siblings:x.map(R=>({project:R.project,references:R.references.map(I=>({symbol:I.symbol,type:I.type,description:I.description}))}))};let _=x.reduce((R,I)=>R+I.references.length,0);_>0&&y==="low"&&(S.impact="medium"),_>5&&(S.impact="high");}}let k$1=o$1==="concise"?{symbol:S.symbol,impact:S.impact,summary:S.summary}:S,C=JSON.stringify(k$1,null,2);return o(C.length,t),{handled:true,text:C}}function Al(t,e){let s=mn(t,e,{maxResults:20});if(s.length===0)return JSON.stringify({error:"Symbol not found in index",symbol:e,fallback:"searched",referencesFound:0,suggestion:"Run `paradigm scan` to build the index, or check that .purpose files contain this symbol"},null,2);let n=[...new Set(s.map(o=>o.filePath))],i={};for(let o of s)i[o.context]=(i[o.context]||0)+1;let r="low";return n.length>10||s.length>20?r="high":(n.length>3||s.length>5)&&(r="medium"),JSON.stringify({symbol:e,status:"not-indexed",fallback:"grep-search",estimatedImpact:r,analysis:{filesAffected:n.slice(0,10),totalFilesAffected:n.length,totalReferences:s.length,contextBreakdown:i,sampleReferences:s.slice(0,5).map(o=>({file:o.filePath,line:o.line,preview:o.content.slice(0,100)}))},note:"This is a fallback grep search. For accurate dependency analysis, run `paradigm scan` to index your project.",suggestion:"Run `paradigm scan` to enable full ripple analysis with dependency tracking"},null,2)}function Il(t){switch(t){case "high":return "High impact change - review all affected symbols carefully before modifying";case "medium":return "Moderate impact - check direct dependencies for breaking changes";case "low":return "Low impact - safe to modify with standard review"}}function $l(t,e,s,n,i){let r=[];return e>0&&r.push(`Review ${e} direct dependent(s) for breaking changes`),s>0&&r.push(`Scan ${s} indirect dependent(s) for cascading effects`),n>0&&r.push(`Verify ${n} affected gate(s) still enforce correct auth/access`),i>0&&r.push(`Validate ${i} affected flow(s) end-to-end`),t==="high"?r.push("Consider running full test suite before merging"):t==="medium"&&r.push("Run targeted tests for affected components"),r.length===0&&r.push("No downstream dependents detected - safe to proceed"),r}function To(){return [{name:"paradigm_protocol_search",description:"Search for protocols matching a task description. Call BEFORE exploring the codebase \u2014 if a matching protocol exists, follow its steps instead of discovering the pattern from scratch. Returns top matches with steps, exemplar, and freshness info. ~200 tokens.",inputSchema:{type:"object",properties:{task:{type:"string",description:'Task description to search for (e.g., "add a new page", "add API route")'},limit:{type:"number",description:"Maximum results (default: 3)"}},required:["task"]},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_protocol_get",description:"Get a specific protocol by ID with full details and freshness check. ~300 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:'Protocol ID (e.g., "P-add-view")'}},required:["id"]},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_protocol_record",description:"Record a new protocol after completing repeatable work. Captures the steps you followed so future agents can skip exploration. ~100 tokens.",inputSchema:{type:"object",properties:{name:{type:"string",description:'Protocol name (e.g., "Add a new view")'},description:{type:"string",description:"What this protocol accomplishes"},trigger:{type:"array",items:{type:"string"},description:'Phrases that should match this protocol (e.g., ["add view", "new page"])'},tags:{type:"array",items:{type:"string"},description:'Classification tags (e.g., ["ui", "frontend"])'},symbols:{type:"array",items:{type:"string"},description:'Paradigm symbols involved (e.g., ["#logs-view"])'},exemplar:{type:"string",description:'Canonical file to study for this pattern (e.g., "ui/src/views/LogsView.tsx")'},steps:{type:"array",items:{type:"object",properties:{action:{type:"string",enum:["create","modify","run","verify"],description:"Step action type"},target:{type:"string",description:"File path (supports {Name}/{name} placeholders)"},template_from:{type:"string",description:"File to use as template (for create actions)"},reference:{type:"string",description:"Where in the file to make changes (for modify actions)"},command:{type:"string",description:"Command to execute (for run actions)"},notes:{type:"string",description:"Additional guidance for this step"}},required:["action"]},description:"Ordered steps to follow"},recorded_from:{type:"string",description:'Lore entry ID this protocol was learned from (e.g., "L-2026-03-01-001")'}},required:["name","description","trigger","tags","steps"]},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_protocol_update",description:"Update an existing protocol. Use refresh:true after successfully following a protocol to bump last_verified. ~100 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:'Protocol ID to update (e.g., "P-add-view")'},refresh:{type:"boolean",description:"Set true to bump last_verified to now (use after successfully following the protocol)"},name:{type:"string",description:"Updated name"},description:{type:"string",description:"Updated description"},trigger:{type:"array",items:{type:"string"},description:"Updated trigger phrases"},tags:{type:"array",items:{type:"string"},description:"Updated tags"},symbols:{type:"array",items:{type:"string"},description:"Updated symbols"},exemplar:{type:"string",description:"Updated exemplar path"},steps:{type:"array",items:{type:"object",properties:{action:{type:"string",enum:["create","modify","run","verify"]},target:{type:"string"},template_from:{type:"string"},reference:{type:"string"},command:{type:"string"},notes:{type:"string"}},required:["action"]},description:"Updated steps"}},required:["id"]},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_protocol_validate",description:"Validate protocol references \u2014 check that referenced files exist, exemplars haven't drifted. Validates all protocols if no ID given. ~200 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:"Protocol ID to validate (omit to validate all)"}}},annotations:{readOnlyHint:true,destructiveHint:false}}]}async function yn(t,e,s){switch(t){case "paradigm_protocol_search":{let n=e.task,i=e.limit||3,r=await W(s.rootDir,n,i);return r.length===0?{handled:true,text:JSON.stringify({count:0,task:n,message:"No matching protocol found. Consider recording one after completing this task."})}:{handled:true,text:JSON.stringify({count:r.length,task:n,matches:r.map(o=>({id:o.protocol.id,name:o.protocol.name,description:o.protocol.description,score:o.score,status:o.protocol.status,exemplar:o.protocol.exemplar,last_verified:o.protocol.last_verified,steps:o.protocol.steps.map(Fl)}))},null,2)}}case "paradigm_protocol_get":{let n=e.id,i=await U(s.rootDir,n);if(!i)return {handled:true,text:JSON.stringify({error:`Protocol not found: ${n}`})};let r=Z(s.rootDir,i);return {handled:true,text:JSON.stringify({...i,freshness:{status:r.status,issues:r.issues}},null,2)}}case "paradigm_protocol_record":{let n=e.steps||[],i=await X(s.rootDir,{name:e.name,description:e.description,trigger:e.trigger||[],tags:e.tags||[],symbols:e.symbols||[],exemplar:e.exemplar,steps:n,recorded_from:e.recorded_from,verified_by:"claude-opus-4-6"});return {handled:true,text:JSON.stringify({success:true,id:i,name:e.name,message:"Protocol recorded successfully"})}}case "paradigm_protocol_update":{let n=e.id,i=e.refresh,r={};e.name!==void 0&&(r.name=e.name),e.description!==void 0&&(r.description=e.description),e.trigger!==void 0&&(r.trigger=e.trigger),e.tags!==void 0&&(r.tags=e.tags),e.symbols!==void 0&&(r.symbols=e.symbols),e.exemplar!==void 0&&(r.exemplar=e.exemplar),e.steps!==void 0&&(r.steps=e.steps);let o=await Y(s.rootDir,n,r,i===true);return {handled:true,text:JSON.stringify({success:o,id:n,refreshed:i===true,message:o?i?"Protocol updated and verified":"Protocol updated":`Protocol not found: ${n}`})}}case "paradigm_protocol_validate":{let n=e.id;if(n){let a=await U(s.rootDir,n);if(!a)return {handled:true,text:JSON.stringify({error:`Protocol not found: ${n}`})};let c=Z(s.rootDir,a);return {handled:true,text:JSON.stringify({id:a.id,name:a.name,status:c.status,issues:c.issues,last_verified:a.last_verified},null,2)}}let r=(await T(s.rootDir)).map(a=>{let c=Z(s.rootDir,a);return {id:a.id,name:a.name,status:c.status,issues:c.issues,last_verified:a.last_verified}}),o={total:r.length,current:r.filter(a=>a.status==="current").length,stale:r.filter(a=>a.status==="stale").length,broken:r.filter(a=>a.status==="broken").length};return {handled:true,text:JSON.stringify({protocols:r,health:o},null,2)}}default:return {handled:false,text:""}}}function Fl(t){let e={action:t.action};return t.target&&(e.target=t.target),t.template_from&&(e.template_from=t.template_from),t.reference&&(e.reference=t.reference),t.command&&(e.command=t.command),t.notes&&(e.notes=t.notes),e}j();var wt=null,ks=false;async function Ss(t){if(wt)ks||(await wt.ensureReady(),ks=true);else {let e=q.join(t,".paradigm","sentinel","sentinel.db");wt=new f$4(e),await wt.ensureReady(),ks=true;}return wt}async function Nl(t,e){return (await Ss(t)).recordPracticeEvent(e)}async function Oo(t,e){return (await Ss(t)).getPracticeEvents(e)}async function re(t,e){return (await Ss(t)).getComplianceRate(e)}async function vt(t,e){let s=["discovery","verification","testing","documentation","collaboration","security"],n=[];for(let i of s){let r=await re(t,{...e,habitCategory:i});r.total>0&&n.push({category:i,...r});}return n}async function Ao(t,e,s){let n=[];for(let i of e){let r=await Nl(t,{habitId:i.habitId,habitCategory:i.habitCategory,result:i.result,engineer:s.engineer,sessionId:s.sessionId,loreEntryId:s.loreEntryId,taskDescription:s.taskDescription,symbolsTouched:s.symbolsTouched,filesModified:s.filesModified,notes:i.notes});n.push(r);}return n}function Io(){let t=process.env.PARADIGM_AUTHOR;if(t)return _s(t);try{let e=execSync("git config user.name",{encoding:"utf-8",timeout:3e3}).trim();if(e)return _s(e)}catch{}try{let e=Fo.userInfo().username;if(e)return _s(e)}catch{}return "unknown"}function _s(t){return t.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").slice(0,20)||"unknown"}function No(){return [{name:"paradigm_lore_search",description:"Search lore entries by symbol, author, date range, type, or tags. Returns project history records. Returns matching entries with titles, dates, and symbol references. ~200 tokens.",inputSchema:{type:"object",properties:{symbol:{type:"string",description:'Filter by symbol (e.g., "#sentinel-sdk", "^authenticated")'},author:{type:"string",description:'Filter by author (human user name, e.g., "ascend")'},hasAgent:{type:"boolean",description:"Filter by AI assistance: true = AI-assisted entries, false = human-only"},authorType:{type:"string",enum:["human","agent"],description:"(Deprecated, use hasAgent) Filter by old author type"},type:{type:"string",enum:["agent-session","human-note","decision","review","incident","milestone","retro","insight"],description:"Filter by entry type"},tag:{type:"string",description:'Filter by tag prefix (e.g., "arc:lore-evolution" for arc entries)'},hasBody:{type:"boolean",description:"Filter for entries with/without long-form body content"},dateFrom:{type:"string",description:'Filter from date (ISO 8601, e.g., "2026-02-20")'},dateTo:{type:"string",description:"Filter to date (ISO 8601)"},tags:{type:"array",items:{type:"string"},description:"Filter by tags (OR logic)"},hasReview:{type:"boolean",description:"Filter for entries with/without reviews"},hasConfidence:{type:"boolean",description:"Filter for entries with/without confidence scores"},hasAssessment:{type:"boolean",description:"Filter for entries with/without assessment verdicts"},limit:{type:"number",description:"Maximum results (default: 20)"},offset:{type:"number",description:"Offset for pagination"}}},annotations:{readOnlyHint:true,destructiveHint:false},aliases:["history","what happened","past work","project history","previous sessions","lore"]},{name:"paradigm_lore_record",description:"Record a new lore entry (agent session, decision, milestone, etc.). Call after completing significant work. Returns the created entry ID and file path. ~100 tokens.",inputSchema:{type:"object",properties:{type:{type:"string",enum:["agent-session","human-note","decision","review","incident","milestone","retro","insight"],description:"Entry type"},title:{type:"string",description:'Short title (e.g., "Built Sentinel Phase 1")'},summary:{type:"string",description:"2-3 sentence narrative summary"},symbols_touched:{type:"array",items:{type:"string"},description:'Symbols affected (e.g., ["#sentinel-sdk", "^authenticated"])'},symbols_created:{type:"array",items:{type:"string"},description:"New symbols introduced"},files_created:{type:"array",items:{type:"string"},description:"Files created"},files_modified:{type:"array",items:{type:"string"},description:"Files modified"},lines_added:{type:"number",description:"Lines of code added"},lines_removed:{type:"number",description:"Lines of code removed"},commit:{type:"string",description:"Git commit hash"},duration_minutes:{type:"number",description:"Duration in minutes"},decisions:{type:"array",items:{type:"object",properties:{id:{type:"string"},decision:{type:"string"},rationale:{type:"string"}},required:["id","decision","rationale"]},description:"Decisions made during this work"},errors_encountered:{type:"array",items:{type:"object",properties:{description:{type:"string"},resolution:{type:"string"},time_to_fix:{type:"string"}},required:["description","resolution"]}},learnings:{type:"array",items:{type:"string"},description:"Key learnings from this work"},verification:{type:"object",properties:{status:{type:"string",enum:["pass","fail","partial","untested"]},details:{type:"object",description:'Per-check results (e.g., { "build": "pass", "tests": "fail" })'}}},tags:{type:"array",items:{type:"string"},description:"Tags for categorization"},meta:{type:"object",description:'Project-defined metadata (open-ended key-value pairs, e.g., { meeting_type: "design-review", sprint: 12 })'},body:{type:"string",description:"Long-form content (detailed retrospective notes, decision rationale, etc.)"},linked_lore:{type:"array",items:{type:"string"},description:"Cross-references to other lore entry IDs"},linked_tasks:{type:"array",items:{type:"string"},description:"References to paradigm task IDs"},linked_commits:{type:"array",items:{type:"string"},description:"Git commit SHAs related to this entry"},confidence:{type:"number",description:"Agent confidence in correctness of this work (0.0 to 1.0)"},stream:{type:"string",enum:["work-log","journal","decision","auto"],description:'Knowledge stream classification. "auto" classifies based on content. Default: stores in lore (backward compatible).'}},required:["title","summary","symbols_touched"]},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_lore_timeline",description:"Get lore timeline overview: recent entries, active authors, hot symbols. Call for project history orientation. ~200 tokens.",inputSchema:{type:"object",properties:{limit:{type:"number",description:"Number of recent entries to include (default: 10)"}}},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_lore_get",description:"Fetch a single lore entry by ID. Returns the full entry with all fields. ~150 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:'Lore entry ID (e.g., "L-2026-02-23-001" or "L-2026-03-02-ascend-143025-001")'}},required:["id"]},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_lore_update",description:"Update an existing lore entry. Merges provided fields into the existing entry. Returns updated entry confirmation. ~100 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:"Lore entry ID to update"},title:{type:"string",description:"New title"},summary:{type:"string",description:"New summary"},type:{type:"string",enum:["agent-session","human-note","decision","review","incident","milestone","retro","insight"],description:"New entry type"},symbols_touched:{type:"array",items:{type:"string"},description:"Updated symbols list"},symbols_created:{type:"array",items:{type:"string"},description:"Updated created symbols"},files_created:{type:"array",items:{type:"string"}},files_modified:{type:"array",items:{type:"string"}},lines_added:{type:"number"},lines_removed:{type:"number"},commit:{type:"string"},duration_minutes:{type:"number"},learnings:{type:"array",items:{type:"string"},description:"Updated learnings"},verification:{type:"object",properties:{status:{type:"string",enum:["pass","fail","partial","untested"]},details:{type:"object"}}},tags:{type:"array",items:{type:"string"}},confidence:{type:"number",description:"Agent confidence in correctness (0.0 to 1.0)"}},required:["id"]},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_lore_assess",description:"Record a human assessment verdict on a lore entry (correct/partial/incorrect). Computes calibration delta if confidence was recorded. ~100 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:"Lore entry ID to assess"},verdict:{type:"string",enum:["correct","partial","incorrect"],description:"Assessment verdict on the decisions/changes made"},notes:{type:"string",description:"Optional assessment notes"}},required:["id","verdict"]},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_lore_calibration",description:"Query calibration statistics across assessed lore entries. Returns accuracy rate, average confidence, calibration score, and verdict breakdown. Supports groupBy for domain-specific reliability maps. ~200 tokens.",inputSchema:{type:"object",properties:{symbol:{type:"string",description:'Filter by symbol (e.g., "#auth-middleware")'},tag:{type:"string",description:"Filter by tag prefix"},author:{type:"string",description:"Filter by author"},dateFrom:{type:"string",description:"Filter from date (ISO 8601)"},dateTo:{type:"string",description:"Filter to date (ISO 8601)"},groupBy:{type:"string",enum:["symbol","tag","type"],description:"Group calibration stats by dimension"}}},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_lore_delete",description:"Delete a lore entry. Requires explicit confirmation to prevent accidental deletion. ~100 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:"Lore entry ID to delete"},confirm:{type:"boolean",description:"Must be true to proceed with deletion"}},required:["id","confirm"]},annotations:{readOnlyHint:false,destructiveHint:true}}]}async function kt(t,e,s){switch(t){case "paradigm_lore_search":{let n={author:e.author,hasAgent:e.hasAgent,authorType:e.authorType,symbol:e.symbol,dateFrom:e.dateFrom,dateTo:e.dateTo,type:e.type,tag:e.tag,hasBody:e.hasBody,tags:e.tags,hasReview:e.hasReview,hasConfidence:e.hasConfidence,hasAssessment:e.hasAssessment,limit:e.limit||20,offset:e.offset},i=await a$2(s.rootDir,n);return {handled:true,text:JSON.stringify({count:i.length,filter:Object.fromEntries(Object.entries(n).filter(([,r])=>r!==void 0)),entries:i.map($o)},null,2)}}case "paradigm_lore_record":{let{type:n,title:i,summary:r,symbols_touched:o,symbols_created:a,files_created:c,files_modified:l,lines_added:d,lines_removed:u,commit:g,duration_minutes:p,decisions:m,errors_encountered:f,learnings:y,verification:b,tags:h,meta:v,body:w,linked_lore:S,linked_tasks:k,linked_commits:C,confidence:x}=e,_$1;try{let j=new Date(Date.now()-2592e6).toISOString(),T=await re(s.rootDir,{dateFrom:j});if(T.total>0){let $=(await vt(s.rootDir,{dateFrom:j})).filter(F=>F.rate<60).map(F=>F.category);_$1={rate:T.rate,followed:T.followed,skipped:T.skipped,partial:T.partial,weakAreas:$.length>0?$:void 0};}}catch{}let R={id:"",type:n||"agent-session",timestamp:new Date().toISOString(),duration_minutes:p,author:Io(),agent:{provider:"anthropic",model:"claude-opus-4-6"},title:i,summary:r,symbols_touched:o,symbols_created:a,files_created:c,files_modified:l,lines_added:d,lines_removed:u,commit:g,decisions:m,errors_encountered:f,learnings:y,verification:b,tags:h,meta:v||void 0,habit_compliance:_$1,body:w,linked_lore:S,linked_tasks:k,linked_commits:C,confidence:x!=null&&x>=0&&x<=1?x:void 0},I=await d$1(s.rootDir,R);j$1().setLastLoreEntryId(I);try{let j=process.env.PARADIGM_AGENT_ID;if(j&&o&&o.length>0){let{updateExpertiseFromLore:T}=await import('./agent-loader-RJRVO5GQ.js');T(s.rootDir,j,{symbols_touched:o,confidence:x!=null&&x>=0&&x<=1?x:void 0});}}catch{}let P=null;try{c&&c.length>=2&&(P=_(s.rootDir,c,l||[]));}catch{}let D;if(e.stream){let j=e.stream,T=j==="auto"?Hl(e):j;try{if(T==="work-log"){let{recordWorkLog:A}=await import('./work-log-loader-DL5GZ2BQ.js');A(s.rootDir,{agent:R.agent?.model||"unknown",summary:R.summary,outcome:R.verification?.status==="pass"?"pass":R.verification?.status==="fail"?"fail":"partial",files_modified:R.files_modified,symbols_touched:R.symbols_touched,commit:R.commit,linked_lore:R.id||I}),D="work-log";}else if(T==="journal"&&R.learnings?.length){let{recordJournalEntry:A}=await import('./journal-loader-GLH7XFTK.js');for(let $ of R.learnings)A(R.agent?.model||"unknown",{trigger:"self_reflection",insight:$,project:s.projectName||"unknown",transferable:!1,linked_work_log:R.id||I});D="journal";}else if(T==="decision"&&R.decisions?.length){let{recordDecision:A}=await import('./decision-loader-2XPZE4EZ.js');for(let $ of R.decisions)A(s.rootDir,{title:$.decision.slice(0,100),decision:$.decision,rationale:$.rationale,participants:[{id:`agent/${R.agent?.model||"unknown"}`,role:"agent",stance:"proposed"}],symbols_affected:R.symbols_touched,status:"active",linked_lore:R.id||I});D="decision";}}catch{}}return {handled:true,text:JSON.stringify({success:true,id:I,type:n,title:i,message:"Lore entry recorded successfully",...D?{stream:D}:{},...P?{protocol_suggestion:P}:{}})}}case "paradigm_lore_timeline":{let n=e.limit||10,i=await c$1(s.rootDir),r=await a$2(s.rootDir,{limit:n}),o={};for(let l of r)for(let d of l.symbols_touched)o[d]=(o[d]||0)+1;let a=Object.entries(o).sort(([,l],[,d])=>d-l).slice(0,10).map(([l,d])=>({symbol:l,count:d})),c={};for(let l of r){let d=l.author;c[d]||(c[d]={count:0,lastActive:l.timestamp,hasAgent:l.agent!=null}),c[d].count++,l.agent&&(c[d].hasAgent=true),l.timestamp>c[d].lastActive&&(c[d].lastActive=l.timestamp);}return {handled:true,text:JSON.stringify({timeline:i||{version:"1.0",project:"unknown",entries:0,last_updated:"",authors:[]},recentEntries:r.map($o),hotSymbols:a,authors:Object.entries(c).map(([l,d])=>({id:l,hasAgent:d.hasAgent,entries:d.count,lastActive:d.lastActive}))},null,2)}}case "paradigm_lore_get":{let n=e.id,i=await b$4(s.rootDir,n);return i?{handled:true,text:JSON.stringify(i,null,2)}:{handled:true,text:JSON.stringify({error:`Lore entry not found: ${n}`})}}case "paradigm_lore_update":{let n=e.id,{id:i,...r}=e,o={};for(let[c,l]of Object.entries(r))l!==void 0&&(o[c]=l);let a=await g$4(s.rootDir,n,o);return {handled:true,text:JSON.stringify({success:a,id:n,message:a?"Lore entry updated":`Lore entry not found: ${n}`})}}case "paradigm_lore_assess":{let n=e.id,i=e.verdict,r=e.notes,o=await b$4(s.rootDir,n);if(!o)return {handled:true,text:JSON.stringify({error:`Lore entry not found: ${n}`})};let a={verdict:i,assessed_by:Io(),assessed_at:new Date().toISOString(),notes:r},c=await h$2(s.rootDir,n,a);try{let g=process.env.PARADIGM_AGENT_ID;if(g&&c&&o.symbols_touched?.length){let{updateExpertiseFromAssessment:p}=await import('./agent-loader-RJRVO5GQ.js');p(s.rootDir,g,{symbols_touched:o.symbols_touched,verdict:i});}}catch{}let l=i==="correct"?1:i==="partial"?.5:0,d=o.confidence!=null?l-o.confidence:null,u=d!=null?d>.1?"Under-confident (actual outcome better than predicted)":d<-0.1?"Over-confident (actual outcome worse than predicted)":"Well-calibrated":"No confidence recorded \u2014 delta not computed";return {handled:true,text:JSON.stringify({success:c,id:n,verdict:i,confidence:o.confidence??null,delta:d,deltaDescription:u,message:c?`Assessment recorded: ${i}${d!=null?` (delta: ${d>0?"+":""}${d.toFixed(2)})`:""}`:`Failed to assess: ${n}`})}}case "paradigm_lore_calibration":{let n={symbol:e.symbol,tag:e.tag,author:e.author,dateFrom:e.dateFrom,dateTo:e.dateTo,hasAssessment:true},i=await a$2(s.rootDir,n),r=i.filter(w=>w.confidence!=null),o=i.length,a=r.length,c={correct:0,partial:0,incorrect:0},l=0,d=0,u=0;for(let w of i){let S=w.assessment.verdict;c[S]++;let k=S==="correct"?1:S==="partial"?.5:0;l+=k,w.confidence!=null&&(d+=w.confidence,u+=Math.abs(k-w.confidence));}let g=o>0?l/o:0,p=a>0?d/a:null,m=a>0?l/o-d/a:null,f=a>0?1-u/a:null,y=e.groupBy,b;if(y&&o>0){let w=new Map;for(let S of i){let k=[];y==="symbol"?k=S.symbols_touched||[]:y==="tag"?k=S.tags||[]:y==="type"&&(k=[S.type||"agent-session"]);for(let C of k)w.has(C)||w.set(C,[]),w.get(C).push(S);}b=Array.from(w.entries()).map(([S,k])=>{let C=k.filter(P=>P.confidence!=null),x={correct:0,partial:0,incorrect:0},_=0,R=0,I=0;for(let P of k){let D=P.assessment.verdict;x[D]++;let j=D==="correct"?1:D==="partial"?.5:0;_+=j,P.confidence!=null&&(R+=P.confidence,I+=Math.abs(j-P.confidence));}return {key:S,total:k.length,accuracyRate:_/k.length,avgConfidence:C.length>0?R/C.length:null,calibrationScore:C.length>0?1-I/C.length:null,verdictBreakdown:x}}).sort((S,k)=>k.total-S.total);}let h=[],v=o<5?`Low sample size (N=${o}). Stats may not be representative.`:o<15?`Moderate sample (N=${o}). Trends are directional, not conclusive.`:null;return v&&h.push(v),f!=null&&(f>=.9?h.push("Excellent calibration \u2014 confidence predictions closely match outcomes."):f>=.7?h.push("Good calibration \u2014 some room for improvement in confidence estimates."):f>=.5?h.push("Fair calibration \u2014 significant gap between predicted confidence and outcomes."):h.push("Poor calibration \u2014 confidence predictions diverge substantially from outcomes.")),m!=null&&(m>.15?h.push("Tendency toward under-confidence \u2014 outcomes are better than predicted."):m<-0.15&&h.push("Tendency toward over-confidence \u2014 outcomes are worse than predicted.")),c.incorrect>o*.3&&o>=5&&h.push(`High error rate: ${c.incorrect}/${o} entries assessed as incorrect.`),{handled:true,text:JSON.stringify({totalAssessed:o,totalWithConfidence:a,accuracyRate:Math.round(g*1e3)/1e3,avgConfidence:p!=null?Math.round(p*1e3)/1e3:null,avgDelta:m!=null?Math.round(m*1e3)/1e3:null,calibrationScore:f!=null?Math.round(f*1e3)/1e3:null,verdictBreakdown:c,...b?{groups:b}:{},insights:h},null,2)}}case "paradigm_lore_delete":{let n=e.id;if(!e.confirm)return {handled:true,text:JSON.stringify({success:false,message:"Deletion requires confirm: true"})};let r=await i$1(s.rootDir,n);return {handled:true,text:JSON.stringify({success:r,id:n,message:r?"Lore entry deleted":`Lore entry not found: ${n}`})}}default:return {handled:false,text:""}}}function Hl(t){return t.task_ref||t.files_modified||t.commit?"work-log":t.learnings||t.confidence!==void 0?"journal":t.decisions?.some(s=>s.rationale)?"decision":"work-log"}function $o(t){return {id:t.id,type:t.type,title:t.title,summary:t.summary,author:t.author,agent:t.agent,timestamp:t.timestamp,duration_minutes:t.duration_minutes,symbols_touched:t.symbols_touched,verification:t.verification?.status,review:t.review?{completeness:t.review.completeness,quality:t.review.quality}:null,confidence:t.confidence??null,assessment:t.assessment?t.assessment.verdict:null,assessment_delta:t.assessment_delta??null,tags:t.tags}}function Ho(){return [{name:"paradigm_captain_brief",description:"Cid's pre-task context discovery pipeline. Searches symbols, maps blast radius, checks gates, finds protocols, surfaces warnings, and produces a Context Brief injected into every subsequent agent. Call before starting any multi-file task. ~400 tokens.",inputSchema:{type:"object",properties:{taskDescription:{type:"string",description:"The task to produce a context brief for"},symbols:{type:"array",items:{type:"string"},description:'Optional pre-known symbols to anchor the search (e.g., ["#auth", "^authenticated"])'},depth:{type:"string",enum:["quick","standard","deep"],description:"Brief depth. quick=search+navigate only (<800 tokens). standard=+ripple top 3+wisdom. deep=+ripple top 5+full lore scan. Default: standard"}},required:["taskDescription"]},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_captain_debrief",description:"Cid's post-task maintenance pass. Audits .purpose coverage for touched directories, creates stubs for gaps, queues rich doc areas to Documentor, records lore, and writes the .cid-briefed marker that clears the stop hook. Call after all agents complete. ~200 tokens.",inputSchema:{type:"object",properties:{orchestrationId:{type:"string",description:"The orchestration run ID (from paradigm_orchestrate_inline)"},sessionSummary:{type:"string",description:"What was accomplished in this session"},touchedFiles:{type:"array",items:{type:"string"},description:"Files modified during this session"},newSymbols:{type:"array",items:{type:"string"},description:"New symbols registered during this session"},notes:{type:"string",description:"Optional additional notes from the orchestrating session"}},required:["orchestrationId","sessionSummary","touchedFiles"]},annotations:{readOnlyHint:false,destructiveHint:false}}]}async function St(t,e,s){return t==="paradigm_captain_brief"?ql(e,s):t==="paradigm_captain_debrief"?Ml(e,s):{handled:false,text:""}}async function ql(t,e){let s=t.taskDescription,n=t.symbols||[],i=t.depth||"standard",r=q.join(e.rootDir,".paradigm"),o$1=q.join(r,".cid-session"),a=q.join(r,".cid-briefed");try{E.existsSync(a)&&E.unlinkSync(a);let j={timestamp:new Date().toISOString(),taskDescription:s.slice(0,200),depth:i};E.mkdirSync(r,{recursive:!0}),E.writeFileSync(o$1,JSON.stringify(j,null,2),"utf8");}catch{}let c=Ll(s),l=[],d=new Set;for(let j of n)if(!d.has(j)){d.add(j);let T=Eo(j);l.push({id:j,type:T,description:"Provided as anchor symbol"});}let u=[];try{for(let j of c.slice(0,3)){let A=j$2(e.index,j).slice(0,5);for(let $ of A)if(!d.has($.symbol)){d.add($.symbol);let F=Wl($.type);l.push({id:$.symbol,type:F,description:$.description||"",file:$.file}),u.push($.symbol);}}}catch{}let g={directories:[],files:[]};try{let j=await on("paradigm_navigate",{intent:"context",task:s,response_format:"concise"},e);if(j.handled){let T=JSON.parse(j.text);if(T.files)for(let A of T.files){let $=typeof A=="string"?A:A.path||A.file||"";$&&g.files.push($);}if(T.directories)for(let A of T.directories){let $=typeof A=="string"?A:A.path||A.directory||"";$&&g.directories.push($);}if(T.symbols)for(let A of T.symbols){let $=typeof A=="string"?A:A.id;$&&!d.has($)&&(d.add($),l.push({id:$,type:Eo($),description:typeof A=="object"&&A.description||""}));}}}catch{}let p=new Set(g.directories);for(let j of g.files){let T=q.dirname(j);T&&T!=="."&&p.add(T);}let m=l.slice(0,i==="deep"?5:3),f={affectedFiles:[],affectedSymbols:[],affectedFlows:[],affectedGates:[],fragileSymbols:[]};if(i!=="quick"&&m.length>0)for(let j of m)try{let T=await fn("paradigm_ripple",{symbol:j.id,depth:2,response_format:"concise"},e);if(T.handled){let A=JSON.parse(T.text);if(A.analysis){for(let $ of A.analysis.directlyAffected||[]){let F=$.symbol||$;F&&!f.affectedSymbols.includes(F)&&f.affectedSymbols.push(F);}for(let $ of A.analysis.indirectlyAffected||[])$&&!f.affectedSymbols.includes($)&&f.affectedSymbols.push($);}if(A.affectedFlows?.affectedFlows)for(let $ of A.affectedFlows.affectedFlows){let F=$.flowId||$;F&&!f.affectedFlows.includes(F)&&f.affectedFlows.push(F);}if(A.affectedGates)for(let $ of A.affectedGates){let F=$.gate||$;F&&!f.affectedGates.includes(F)&&f.affectedGates.push(F);}A.impact==="high"&&(f.fragileSymbols.includes(j.id)||f.fragileSymbols.push(j.id));}}catch{}let y=[],b=Gl(s);if(b.length>0)try{let{handleGatesForRoute:j}=await import('./tools-NNPANZRA.js').catch(()=>({handleGatesForRoute:null})),T=q.join(e.rootDir,"portal.yaml");if(E.existsSync(T)){let A=E.readFileSync(T,"utf8");for(let $ of b){let F=A.includes($);y.push({route:$,gate:"^authenticated",declared:F});}}else for(let A of b)y.push({route:A,gate:"(unknown \u2014 no portal.yaml)",declared:!1});}catch{}let h=[];if(i!=="quick"&&l.length>0)try{let j=l.slice(0,5).map(A=>A.id),T=await sn("paradigm_wisdom_context",{symbols:j,include_global:!0},e);if(T.handled){let A=JSON.parse(T.text);if(A.antipatterns)for(let $ of A.antipatterns.slice(0,3)){let F=$.pattern||$.description||$.text||String($);F&&!h.includes(F)&&h.push(F);}if(A.wisdom?.antipatterns)for(let $ of A.wisdom.antipatterns.slice(0,3)){let F=$.pattern||$.description||String($);F&&!h.includes(F)&&h.push(F);}}}catch{}let v={matched:false};try{let j=await yn("paradigm_protocol_search",{task:s,limit:1},e);if(j.handled){let T=JSON.parse(j.text),A=T.matches||T.protocols||T.results||[];if(A.length>0){let $=A[0];v={matched:!0,id:$.id,name:$.name||$.title,steps:($.steps||[]).slice(0,5).map(F=>typeof F=="string"?F:F.description||String(F))};}}}catch{}let w=[];if(i!=="quick")try{let j=l[0]?.id,T={limit:i==="deep"?5:3};j&&(T.symbol=j);let A=await kt("paradigm_lore_search",T,e);if(A.handled){let F=JSON.parse(A.text).entries||[];for(let G of F.slice(0,3))w.push({id:G.id,summary:(G.summary||G.title||"").slice(0,100),relevance:j?`Related to ${j}`:"Recent project history"});}}catch{}let S=Array.from(p),k=0;for(let j of S){let T=q.join(e.rootDir,j,".purpose");if(E.existsSync(T))try{E.readFileSync(T,"utf8").trim().length>50&&k++;}catch{}}let C=S.length>0?k/S.length:.5,x=Jl(C),_=Ul(C,x,S.length),R=f.affectedSymbols.length+g.files.length,I=R>20?"large":R>8?"medium":R>2?"small":"tiny",P={territory:{directories:S.slice(0,10),files:g.files.slice(0,10),estimatedScope:I},symbols:l.slice(0,10),blastRadius:f,gates:y,protocol:v,warnings:h,coverage:{score:C,label:x,note:_},loreRefs:w,renderedBrief:""};P.renderedBrief=Bl(P);try{let j={timestamp:new Date().toISOString(),taskDescription:s.slice(0,200),depth:i,coverageScore:C};E.writeFileSync(o$1,JSON.stringify(j,null,2),"utf8");}catch{}let D=JSON.stringify(P,null,2);return o(D.length,"paradigm_captain_brief"),{handled:true,text:D}}async function Ml(t,e){let s=t.orchestrationId,n=t.sessionSummary,i=t.touchedFiles||[],r=t.newSymbols||[],o$1=t.notes,a=q.join(e.rootDir,".paradigm"),c=q.join(a,".cid-briefed"),l=q.join(a,".pending-review"),d=new Set;for(let _ of i){let R=q.dirname(_);R&&R!=="."&&d.add(R);}let u=0,g=d.size;for(let _ of d){let R=q.join(e.rootDir,_,".purpose");if(E.existsSync(R))try{E.readFileSync(R,"utf8").trim().length>50&&u++;}catch{}}let p=g>0?u/g:1,m=[],f=[];for(let _ of d){let R=q.join(e.rootDir,_,".purpose"),I=q.join(e.rootDir,_),P=false;if(E.existsSync(R))try{P=E.readFileSync(R,"utf8").trim().length>50;}catch{}if(P){if(i.some(j=>q.dirname(j)===_&&r.length>0)){f.push(_);try{let j=JSON.stringify({path:_,reason:"captain-debrief-new-symbols",priority:"medium",context:`New symbols added during orchestration ${s}: ${r.join(", ")}`,timestamp:new Date().toISOString()});E.appendFileSync(l,j+`
62
+ `);for(let l of c.slice(0,n)){let d=l.match(/^(.+?):(\d+):(.*)$/);if(d){let[,u,g,p]=d,m=q.relative(t,u),f="unknown";m.includes(".purpose")||m.includes("portal.yaml")?f="purpose":p.includes("//")||p.includes("#")||p.includes("*")?f="comment":f="code",i.push({filePath:m,line:parseInt(g,10),content:p.trim().slice(0,200),context:f});}}return i}function jo(){return [{name:"paradigm_ripple",description:"IMPORTANT: Call BEFORE modifying any symbol to understand impact. Shows what depends on it directly and indirectly, helping you avoid breaking changes. Returns direct and indirect dependents with file paths and dependency depth. ~300 tokens.",inputSchema:{type:"object",properties:{symbol:{type:"string",description:'Symbol to analyze (e.g., "#checkout", "$payment-flow", "^authenticated")'},depth:{type:"number",description:"How many hops to traverse (default: 3, max: 5)"},includeWorkspace:{type:"boolean",description:"Also check sibling workspace projects for cross-project impact (default: false). Requires workspace configured in config.yaml."},response_format:{type:"string",enum:["concise","detailed"],description:'Response detail level. "concise" returns minimal fields to save tokens (default: "detailed")'}},required:["symbol"]},annotations:{readOnlyHint:true,destructiveHint:false},aliases:["dependencies","impact","blast radius","what would break","dependents","affects"]}]}async function fn(t,e,s){if(t!=="paradigm_ripple")return {handled:false,text:""};let{symbol:n,depth:i$1=3,includeWorkspace:r=false,response_format:o$1}=e,a=h(s.index,n);if(!a){let x=Al(s.rootDir,n);return o(x.length,t),{handled:true,text:x}}let c=Math.min(Math.max(i$1||3,1),5),l$1=k(s.index,n),d=new Set([n]),u=new Map;function g(x,_){if(_>=c)return;let R=[];for(let I of x){if(d.has(I))continue;d.add(I);let P=k(s.index,I);for(let D of P)d.has(D.symbol)||R.push(D.symbol);}R.length>0&&(u.set(_+1,R),g(R,_+1));}g(l$1.map(x=>x.symbol),1);let p=new Set;for(let[,x]of u)for(let _ of x)_!==n&&!l$1.find(R=>R.symbol===_)&&p.add(_);let m=l(s.index,n),f=l$1.length+p.size,y="low";f>10?y="high":f>3&&(y="medium");let b=await dn(s.rootDir),h$1=null;if(b){let x=pn(b,n);x.totalFlows>0&&(x.impactLevel==="high"&&y==="low"?y="medium":x.impactLevel==="high"&&(y="high"),h$1={totalFlows:x.totalFlows,affectedFlows:x.affectedFlows.map(_=>({flowId:_.flowId,impactLevel:_.downstreamSteps.length>2?"high":"medium",reason:`Symbol is in step ${_.stepAffected.position}, affects ${_.downstreamSteps.length} downstream steps`})),validationSuggestion:x.validationCommands.length>0?`Run: ${x.validationCommands[0]}`:void 0});}let v=new Set([n,...l$1.map(x=>x.symbol),...p]),w=[];try{let x=i(s.index,"gate");for(let _ of x)v.has(_.symbol)&&w.push({gate:_.symbol,description:_.description});for(let _ of l$1)_.type==="gate"&&!w.find(R=>R.gate===_.symbol)&&w.push({gate:_.symbol,description:_.description});}catch{}let S={symbol:a.symbol,type:a.type,description:a.description,depth:c,impact:y,analysis:{directlyAffected:l$1.map(x=>({symbol:x.symbol,type:x.type,description:x.description})),indirectlyAffected:Array.from(p),indirectByLevel:Object.fromEntries(u),dependsOn:m.map(x=>({symbol:x.symbol,type:x.type}))},summary:{directCount:l$1.length,indirectCount:p.size,totalAffected:f,dependsOnCount:m.length,levelsAnalyzed:c},recommendation:Il(y)};h$1&&(S.affectedFlows=h$1),w.length>0&&(S.affectedGates=w),S.suggestedReviewScope=$l(y,l$1.length,p.size,w.length,h$1?.totalFlows??0);try{let x=await F(s.rootDir,n);x.length>0&&(S.personas_affected=x,x.length>2&&y==="low"&&(S.impact="medium"));}catch{}try{let x=R(s.rootDir,n);x.length>0&&(S.university_content_affected=x.map(_=>({id:_.id,title:_.title,type:_.type,stale:_.stale})));}catch{}if(r&&s.workspace){let x=io(s.workspace,n);if(x.length>0){S.workspaceImpact={siblings:x.map(R=>({project:R.project,references:R.references.map(I=>({symbol:I.symbol,type:I.type,description:I.description}))}))};let _=x.reduce((R,I)=>R+I.references.length,0);_>0&&y==="low"&&(S.impact="medium"),_>5&&(S.impact="high");}}let k$1=o$1==="concise"?{symbol:S.symbol,impact:S.impact,summary:S.summary}:S,C=JSON.stringify(k$1,null,2);return o(C.length,t),{handled:true,text:C}}function Al(t,e){let s=mn(t,e,{maxResults:20});if(s.length===0)return JSON.stringify({error:"Symbol not found in index",symbol:e,fallback:"searched",referencesFound:0,suggestion:"Run `paradigm scan` to build the index, or check that .purpose files contain this symbol"},null,2);let n=[...new Set(s.map(o=>o.filePath))],i={};for(let o of s)i[o.context]=(i[o.context]||0)+1;let r="low";return n.length>10||s.length>20?r="high":(n.length>3||s.length>5)&&(r="medium"),JSON.stringify({symbol:e,status:"not-indexed",fallback:"grep-search",estimatedImpact:r,analysis:{filesAffected:n.slice(0,10),totalFilesAffected:n.length,totalReferences:s.length,contextBreakdown:i,sampleReferences:s.slice(0,5).map(o=>({file:o.filePath,line:o.line,preview:o.content.slice(0,100)}))},note:"This is a fallback grep search. For accurate dependency analysis, run `paradigm scan` to index your project.",suggestion:"Run `paradigm scan` to enable full ripple analysis with dependency tracking"},null,2)}function Il(t){switch(t){case "high":return "High impact change - review all affected symbols carefully before modifying";case "medium":return "Moderate impact - check direct dependencies for breaking changes";case "low":return "Low impact - safe to modify with standard review"}}function $l(t,e,s,n,i){let r=[];return e>0&&r.push(`Review ${e} direct dependent(s) for breaking changes`),s>0&&r.push(`Scan ${s} indirect dependent(s) for cascading effects`),n>0&&r.push(`Verify ${n} affected gate(s) still enforce correct auth/access`),i>0&&r.push(`Validate ${i} affected flow(s) end-to-end`),t==="high"?r.push("Consider running full test suite before merging"):t==="medium"&&r.push("Run targeted tests for affected components"),r.length===0&&r.push("No downstream dependents detected - safe to proceed"),r}function To(){return [{name:"paradigm_protocol_search",description:"Search for protocols matching a task description. Call BEFORE exploring the codebase \u2014 if a matching protocol exists, follow its steps instead of discovering the pattern from scratch. Returns top matches with steps, exemplar, and freshness info. ~200 tokens.",inputSchema:{type:"object",properties:{task:{type:"string",description:'Task description to search for (e.g., "add a new page", "add API route")'},limit:{type:"number",description:"Maximum results (default: 3)"}},required:["task"]},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_protocol_get",description:"Get a specific protocol by ID with full details and freshness check. ~300 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:'Protocol ID (e.g., "P-add-view")'}},required:["id"]},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_protocol_record",description:"Record a new protocol after completing repeatable work. Captures the steps you followed so future agents can skip exploration. ~100 tokens.",inputSchema:{type:"object",properties:{name:{type:"string",description:'Protocol name (e.g., "Add a new view")'},description:{type:"string",description:"What this protocol accomplishes"},trigger:{type:"array",items:{type:"string"},description:'Phrases that should match this protocol (e.g., ["add view", "new page"])'},tags:{type:"array",items:{type:"string"},description:'Classification tags (e.g., ["ui", "frontend"])'},symbols:{type:"array",items:{type:"string"},description:'Paradigm symbols involved (e.g., ["#logs-view"])'},exemplar:{type:"string",description:'Canonical file to study for this pattern (e.g., "ui/src/views/LogsView.tsx")'},steps:{type:"array",items:{type:"object",properties:{action:{type:"string",enum:["create","modify","run","verify"],description:"Step action type"},target:{type:"string",description:"File path (supports {Name}/{name} placeholders)"},template_from:{type:"string",description:"File to use as template (for create actions)"},reference:{type:"string",description:"Where in the file to make changes (for modify actions)"},command:{type:"string",description:"Command to execute (for run actions)"},notes:{type:"string",description:"Additional guidance for this step"}},required:["action"]},description:"Ordered steps to follow"},recorded_from:{type:"string",description:'Lore entry ID this protocol was learned from (e.g., "L-2026-03-01-001")'}},required:["name","description","trigger","tags","steps"]},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_protocol_update",description:"Update an existing protocol. Use refresh:true after successfully following a protocol to bump last_verified. ~100 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:'Protocol ID to update (e.g., "P-add-view")'},refresh:{type:"boolean",description:"Set true to bump last_verified to now (use after successfully following the protocol)"},name:{type:"string",description:"Updated name"},description:{type:"string",description:"Updated description"},trigger:{type:"array",items:{type:"string"},description:"Updated trigger phrases"},tags:{type:"array",items:{type:"string"},description:"Updated tags"},symbols:{type:"array",items:{type:"string"},description:"Updated symbols"},exemplar:{type:"string",description:"Updated exemplar path"},steps:{type:"array",items:{type:"object",properties:{action:{type:"string",enum:["create","modify","run","verify"]},target:{type:"string"},template_from:{type:"string"},reference:{type:"string"},command:{type:"string"},notes:{type:"string"}},required:["action"]},description:"Updated steps"}},required:["id"]},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_protocol_validate",description:"Validate protocol references \u2014 check that referenced files exist, exemplars haven't drifted. Validates all protocols if no ID given. ~200 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:"Protocol ID to validate (omit to validate all)"}}},annotations:{readOnlyHint:true,destructiveHint:false}}]}async function yn(t,e,s){switch(t){case "paradigm_protocol_search":{let n=e.task,i=e.limit||3,r=await W(s.rootDir,n,i);return r.length===0?{handled:true,text:JSON.stringify({count:0,task:n,message:"No matching protocol found. Consider recording one after completing this task."})}:{handled:true,text:JSON.stringify({count:r.length,task:n,matches:r.map(o=>({id:o.protocol.id,name:o.protocol.name,description:o.protocol.description,score:o.score,status:o.protocol.status,exemplar:o.protocol.exemplar,last_verified:o.protocol.last_verified,steps:o.protocol.steps.map(Fl)}))},null,2)}}case "paradigm_protocol_get":{let n=e.id,i=await U(s.rootDir,n);if(!i)return {handled:true,text:JSON.stringify({error:`Protocol not found: ${n}`})};let r=Z(s.rootDir,i);return {handled:true,text:JSON.stringify({...i,freshness:{status:r.status,issues:r.issues}},null,2)}}case "paradigm_protocol_record":{let n=e.steps||[],i=await X(s.rootDir,{name:e.name,description:e.description,trigger:e.trigger||[],tags:e.tags||[],symbols:e.symbols||[],exemplar:e.exemplar,steps:n,recorded_from:e.recorded_from,verified_by:"claude-opus-4-6"});return {handled:true,text:JSON.stringify({success:true,id:i,name:e.name,message:"Protocol recorded successfully"})}}case "paradigm_protocol_update":{let n=e.id,i=e.refresh,r={};e.name!==void 0&&(r.name=e.name),e.description!==void 0&&(r.description=e.description),e.trigger!==void 0&&(r.trigger=e.trigger),e.tags!==void 0&&(r.tags=e.tags),e.symbols!==void 0&&(r.symbols=e.symbols),e.exemplar!==void 0&&(r.exemplar=e.exemplar),e.steps!==void 0&&(r.steps=e.steps);let o=await Y(s.rootDir,n,r,i===true);return {handled:true,text:JSON.stringify({success:o,id:n,refreshed:i===true,message:o?i?"Protocol updated and verified":"Protocol updated":`Protocol not found: ${n}`})}}case "paradigm_protocol_validate":{let n=e.id;if(n){let a=await U(s.rootDir,n);if(!a)return {handled:true,text:JSON.stringify({error:`Protocol not found: ${n}`})};let c=Z(s.rootDir,a);return {handled:true,text:JSON.stringify({id:a.id,name:a.name,status:c.status,issues:c.issues,last_verified:a.last_verified},null,2)}}let r=(await T(s.rootDir)).map(a=>{let c=Z(s.rootDir,a);return {id:a.id,name:a.name,status:c.status,issues:c.issues,last_verified:a.last_verified}}),o={total:r.length,current:r.filter(a=>a.status==="current").length,stale:r.filter(a=>a.status==="stale").length,broken:r.filter(a=>a.status==="broken").length};return {handled:true,text:JSON.stringify({protocols:r,health:o},null,2)}}default:return {handled:false,text:""}}}function Fl(t){let e={action:t.action};return t.target&&(e.target=t.target),t.template_from&&(e.template_from=t.template_from),t.reference&&(e.reference=t.reference),t.command&&(e.command=t.command),t.notes&&(e.notes=t.notes),e}j();var wt=null,ks=false;async function Ss(t){if(wt)ks||(await wt.ensureReady(),ks=true);else {let e=q.join(t,".paradigm","sentinel","sentinel.db");wt=new f$4(e),await wt.ensureReady(),ks=true;}return wt}async function Nl(t,e){return (await Ss(t)).recordPracticeEvent(e)}async function Oo(t,e){return (await Ss(t)).getPracticeEvents(e)}async function re(t,e){return (await Ss(t)).getComplianceRate(e)}async function vt(t,e){let s=["discovery","verification","testing","documentation","collaboration","security"],n=[];for(let i of s){let r=await re(t,{...e,habitCategory:i});r.total>0&&n.push({category:i,...r});}return n}async function Ao(t,e,s){let n=[];for(let i of e){let r=await Nl(t,{habitId:i.habitId,habitCategory:i.habitCategory,result:i.result,engineer:s.engineer,sessionId:s.sessionId,loreEntryId:s.loreEntryId,taskDescription:s.taskDescription,symbolsTouched:s.symbolsTouched,filesModified:s.filesModified,notes:i.notes});n.push(r);}return n}function Io(){let t=process.env.PARADIGM_AUTHOR;if(t)return _s(t);try{let e=execSync("git config user.name",{encoding:"utf-8",timeout:3e3}).trim();if(e)return _s(e)}catch{}try{let e=Fo.userInfo().username;if(e)return _s(e)}catch{}return "unknown"}function _s(t){return t.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").slice(0,20)||"unknown"}function No(){return [{name:"paradigm_lore_search",description:"Search lore entries by symbol, author, date range, type, or tags. Returns project history records. Returns matching entries with titles, dates, and symbol references. ~200 tokens.",inputSchema:{type:"object",properties:{symbol:{type:"string",description:'Filter by symbol (e.g., "#sentinel-sdk", "^authenticated")'},author:{type:"string",description:'Filter by author (human user name, e.g., "ascend")'},hasAgent:{type:"boolean",description:"Filter by AI assistance: true = AI-assisted entries, false = human-only"},authorType:{type:"string",enum:["human","agent"],description:"(Deprecated, use hasAgent) Filter by old author type"},type:{type:"string",enum:["agent-session","human-note","decision","review","incident","milestone","retro","insight"],description:"Filter by entry type"},tag:{type:"string",description:'Filter by tag prefix (e.g., "arc:lore-evolution" for arc entries)'},hasBody:{type:"boolean",description:"Filter for entries with/without long-form body content"},dateFrom:{type:"string",description:'Filter from date (ISO 8601, e.g., "2026-02-20")'},dateTo:{type:"string",description:"Filter to date (ISO 8601)"},tags:{type:"array",items:{type:"string"},description:"Filter by tags (OR logic)"},hasReview:{type:"boolean",description:"Filter for entries with/without reviews"},hasConfidence:{type:"boolean",description:"Filter for entries with/without confidence scores"},hasAssessment:{type:"boolean",description:"Filter for entries with/without assessment verdicts"},limit:{type:"number",description:"Maximum results (default: 20)"},offset:{type:"number",description:"Offset for pagination"}}},annotations:{readOnlyHint:true,destructiveHint:false},aliases:["history","what happened","past work","project history","previous sessions","lore"]},{name:"paradigm_lore_record",description:"Record a new lore entry (agent session, decision, milestone, etc.). Call after completing significant work. Returns the created entry ID and file path. ~100 tokens.",inputSchema:{type:"object",properties:{type:{type:"string",enum:["agent-session","human-note","decision","review","incident","milestone","retro","insight"],description:"Entry type"},title:{type:"string",description:'Short title (e.g., "Built Sentinel Phase 1")'},summary:{type:"string",description:"2-3 sentence narrative summary"},symbols_touched:{type:"array",items:{type:"string"},description:'Symbols affected (e.g., ["#sentinel-sdk", "^authenticated"])'},symbols_created:{type:"array",items:{type:"string"},description:"New symbols introduced"},files_created:{type:"array",items:{type:"string"},description:"Files created"},files_modified:{type:"array",items:{type:"string"},description:"Files modified"},lines_added:{type:"number",description:"Lines of code added"},lines_removed:{type:"number",description:"Lines of code removed"},commit:{type:"string",description:"Git commit hash"},duration_minutes:{type:"number",description:"Duration in minutes"},decisions:{type:"array",items:{type:"object",properties:{id:{type:"string"},decision:{type:"string"},rationale:{type:"string"}},required:["id","decision","rationale"]},description:"Decisions made during this work"},errors_encountered:{type:"array",items:{type:"object",properties:{description:{type:"string"},resolution:{type:"string"},time_to_fix:{type:"string"}},required:["description","resolution"]}},learnings:{type:"array",items:{type:"string"},description:"Key learnings from this work"},verification:{type:"object",properties:{status:{type:"string",enum:["pass","fail","partial","untested"]},details:{type:"object",description:'Per-check results (e.g., { "build": "pass", "tests": "fail" })'}}},tags:{type:"array",items:{type:"string"},description:"Tags for categorization"},meta:{type:"object",description:'Project-defined metadata (open-ended key-value pairs, e.g., { meeting_type: "design-review", sprint: 12 })'},body:{type:"string",description:"Long-form content (detailed retrospective notes, decision rationale, etc.)"},linked_lore:{type:"array",items:{type:"string"},description:"Cross-references to other lore entry IDs"},linked_tasks:{type:"array",items:{type:"string"},description:"References to paradigm task IDs"},linked_commits:{type:"array",items:{type:"string"},description:"Git commit SHAs related to this entry"},confidence:{type:"number",description:"Agent confidence in correctness of this work (0.0 to 1.0)"},stream:{type:"string",enum:["work-log","journal","decision","auto"],description:'Knowledge stream classification. "auto" classifies based on content. Default: stores in lore (backward compatible).'}},required:["title","summary","symbols_touched"]},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_lore_timeline",description:"Get lore timeline overview: recent entries, active authors, hot symbols. Call for project history orientation. ~200 tokens.",inputSchema:{type:"object",properties:{limit:{type:"number",description:"Number of recent entries to include (default: 10)"}}},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_lore_get",description:"Fetch a single lore entry by ID. Returns the full entry with all fields. ~150 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:'Lore entry ID (e.g., "L-2026-02-23-001" or "L-2026-03-02-ascend-143025-001")'}},required:["id"]},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_lore_update",description:"Update an existing lore entry. Merges provided fields into the existing entry. Returns updated entry confirmation. ~100 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:"Lore entry ID to update"},title:{type:"string",description:"New title"},summary:{type:"string",description:"New summary"},type:{type:"string",enum:["agent-session","human-note","decision","review","incident","milestone","retro","insight"],description:"New entry type"},symbols_touched:{type:"array",items:{type:"string"},description:"Updated symbols list"},symbols_created:{type:"array",items:{type:"string"},description:"Updated created symbols"},files_created:{type:"array",items:{type:"string"}},files_modified:{type:"array",items:{type:"string"}},lines_added:{type:"number"},lines_removed:{type:"number"},commit:{type:"string"},duration_minutes:{type:"number"},learnings:{type:"array",items:{type:"string"},description:"Updated learnings"},verification:{type:"object",properties:{status:{type:"string",enum:["pass","fail","partial","untested"]},details:{type:"object"}}},tags:{type:"array",items:{type:"string"}},confidence:{type:"number",description:"Agent confidence in correctness (0.0 to 1.0)"}},required:["id"]},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_lore_assess",description:"Record a human assessment verdict on a lore entry (correct/partial/incorrect). Computes calibration delta if confidence was recorded. ~100 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:"Lore entry ID to assess"},verdict:{type:"string",enum:["correct","partial","incorrect"],description:"Assessment verdict on the decisions/changes made"},notes:{type:"string",description:"Optional assessment notes"}},required:["id","verdict"]},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_lore_calibration",description:"Query calibration statistics across assessed lore entries. Returns accuracy rate, average confidence, calibration score, and verdict breakdown. Supports groupBy for domain-specific reliability maps. ~200 tokens.",inputSchema:{type:"object",properties:{symbol:{type:"string",description:'Filter by symbol (e.g., "#auth-middleware")'},tag:{type:"string",description:"Filter by tag prefix"},author:{type:"string",description:"Filter by author"},dateFrom:{type:"string",description:"Filter from date (ISO 8601)"},dateTo:{type:"string",description:"Filter to date (ISO 8601)"},groupBy:{type:"string",enum:["symbol","tag","type"],description:"Group calibration stats by dimension"}}},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_lore_delete",description:"Delete a lore entry. Requires explicit confirmation to prevent accidental deletion. ~100 tokens.",inputSchema:{type:"object",properties:{id:{type:"string",description:"Lore entry ID to delete"},confirm:{type:"boolean",description:"Must be true to proceed with deletion"}},required:["id","confirm"]},annotations:{readOnlyHint:false,destructiveHint:true}}]}async function kt(t,e,s){switch(t){case "paradigm_lore_search":{let n={author:e.author,hasAgent:e.hasAgent,authorType:e.authorType,symbol:e.symbol,dateFrom:e.dateFrom,dateTo:e.dateTo,type:e.type,tag:e.tag,hasBody:e.hasBody,tags:e.tags,hasReview:e.hasReview,hasConfidence:e.hasConfidence,hasAssessment:e.hasAssessment,limit:e.limit||20,offset:e.offset},i=await a$2(s.rootDir,n);return {handled:true,text:JSON.stringify({count:i.length,filter:Object.fromEntries(Object.entries(n).filter(([,r])=>r!==void 0)),entries:i.map($o)},null,2)}}case "paradigm_lore_record":{let{type:n,title:i,summary:r,symbols_touched:o,symbols_created:a,files_created:c,files_modified:l,lines_added:d,lines_removed:u,commit:g,duration_minutes:p,decisions:m,errors_encountered:f,learnings:y,verification:b,tags:h,meta:v,body:w,linked_lore:S,linked_tasks:k,linked_commits:C,confidence:x}=e,_$1;try{let j=new Date(Date.now()-2592e6).toISOString(),T=await re(s.rootDir,{dateFrom:j});if(T.total>0){let $=(await vt(s.rootDir,{dateFrom:j})).filter(F=>F.rate<60).map(F=>F.category);_$1={rate:T.rate,followed:T.followed,skipped:T.skipped,partial:T.partial,weakAreas:$.length>0?$:void 0};}}catch{}let R={id:"",type:n||"agent-session",timestamp:new Date().toISOString(),duration_minutes:p,author:Io(),agent:{provider:"anthropic",model:"claude-opus-4-6"},title:i,summary:r,symbols_touched:o,symbols_created:a,files_created:c,files_modified:l,lines_added:d,lines_removed:u,commit:g,decisions:m,errors_encountered:f,learnings:y,verification:b,tags:h,meta:v||void 0,habit_compliance:_$1,body:w,linked_lore:S,linked_tasks:k,linked_commits:C,confidence:x!=null&&x>=0&&x<=1?x:void 0},I=await d$1(s.rootDir,R);j$1().setLastLoreEntryId(I);try{let j=process.env.PARADIGM_AGENT_ID;if(j&&o&&o.length>0){let{updateExpertiseFromLore:T}=await import('./agent-loader-RJRVO5GQ.js');T(s.rootDir,j,{symbols_touched:o,confidence:x!=null&&x>=0&&x<=1?x:void 0});}}catch{}let P=null;try{c&&c.length>=2&&(P=_(s.rootDir,c,l||[]));}catch{}let D;if(e.stream){let j=e.stream,T=j==="auto"?Hl(e):j;try{if(T==="work-log"){let{recordWorkLog:A}=await import('./work-log-loader-DL5GZ2BQ.js');A(s.rootDir,{agent:R.agent?.model||"unknown",summary:R.summary,outcome:R.verification?.status==="pass"?"pass":R.verification?.status==="fail"?"fail":"partial",files_modified:R.files_modified,symbols_touched:R.symbols_touched,commit:R.commit,linked_lore:R.id||I}),D="work-log";}else if(T==="journal"&&R.learnings?.length){let{recordJournalEntry:A}=await import('./journal-loader-GLH7XFTK.js');for(let $ of R.learnings)A(R.agent?.model||"unknown",{trigger:"self_reflection",insight:$,project:s.projectName||"unknown",transferable:!1,linked_work_log:R.id||I});D="journal";}else if(T==="decision"&&R.decisions?.length){let{recordDecision:A}=await import('./decision-loader-2XPZE4EZ.js');for(let $ of R.decisions)A(s.rootDir,{title:$.decision.slice(0,100),decision:$.decision,rationale:$.rationale,participants:[{id:`agent/${R.agent?.model||"unknown"}`,role:"agent",stance:"proposed"}],symbols_affected:R.symbols_touched,status:"active",linked_lore:R.id||I});D="decision";}}catch{}}return {handled:true,text:JSON.stringify({success:true,id:I,type:n,title:i,message:"Lore entry recorded successfully",...D?{stream:D}:{},...P?{protocol_suggestion:P}:{}})}}case "paradigm_lore_timeline":{let n=e.limit||10,i=await c$1(s.rootDir),r=await a$2(s.rootDir,{limit:n}),o={};for(let l of r)for(let d of l.symbols_touched)o[d]=(o[d]||0)+1;let a=Object.entries(o).sort(([,l],[,d])=>d-l).slice(0,10).map(([l,d])=>({symbol:l,count:d})),c={};for(let l of r){let d=l.author;c[d]||(c[d]={count:0,lastActive:l.timestamp,hasAgent:l.agent!=null}),c[d].count++,l.agent&&(c[d].hasAgent=true),l.timestamp>c[d].lastActive&&(c[d].lastActive=l.timestamp);}return {handled:true,text:JSON.stringify({timeline:i||{version:"1.0",project:"unknown",entries:0,last_updated:"",authors:[]},recentEntries:r.map($o),hotSymbols:a,authors:Object.entries(c).map(([l,d])=>({id:l,hasAgent:d.hasAgent,entries:d.count,lastActive:d.lastActive}))},null,2)}}case "paradigm_lore_get":{let n=e.id,i=await b$4(s.rootDir,n);return i?{handled:true,text:JSON.stringify(i,null,2)}:{handled:true,text:JSON.stringify({error:`Lore entry not found: ${n}`})}}case "paradigm_lore_update":{let n=e.id,{id:i,...r}=e,o={};for(let[c,l]of Object.entries(r))l!==void 0&&(o[c]=l);let a=await g$4(s.rootDir,n,o);return {handled:true,text:JSON.stringify({success:a,id:n,message:a?"Lore entry updated":`Lore entry not found: ${n}`})}}case "paradigm_lore_assess":{let n=e.id,i=e.verdict,r=e.notes,o=await b$4(s.rootDir,n);if(!o)return {handled:true,text:JSON.stringify({error:`Lore entry not found: ${n}`})};let a={verdict:i,assessed_by:Io(),assessed_at:new Date().toISOString(),notes:r},c=await h$2(s.rootDir,n,a);try{let g=process.env.PARADIGM_AGENT_ID;if(g&&c&&o.symbols_touched?.length){let{updateExpertiseFromAssessment:p}=await import('./agent-loader-RJRVO5GQ.js');p(s.rootDir,g,{symbols_touched:o.symbols_touched,verdict:i});}}catch{}let l=i==="correct"?1:i==="partial"?.5:0,d=o.confidence!=null?l-o.confidence:null,u=d!=null?d>.1?"Under-confident (actual outcome better than predicted)":d<-0.1?"Over-confident (actual outcome worse than predicted)":"Well-calibrated":"No confidence recorded \u2014 delta not computed";return {handled:true,text:JSON.stringify({success:c,id:n,verdict:i,confidence:o.confidence??null,delta:d,deltaDescription:u,message:c?`Assessment recorded: ${i}${d!=null?` (delta: ${d>0?"+":""}${d.toFixed(2)})`:""}`:`Failed to assess: ${n}`})}}case "paradigm_lore_calibration":{let n={symbol:e.symbol,tag:e.tag,author:e.author,dateFrom:e.dateFrom,dateTo:e.dateTo,hasAssessment:true},i=await a$2(s.rootDir,n),r=i.filter(w=>w.confidence!=null),o=i.length,a=r.length,c={correct:0,partial:0,incorrect:0},l=0,d=0,u=0;for(let w of i){let S=w.assessment.verdict;c[S]++;let k=S==="correct"?1:S==="partial"?.5:0;l+=k,w.confidence!=null&&(d+=w.confidence,u+=Math.abs(k-w.confidence));}let g=o>0?l/o:0,p=a>0?d/a:null,m=a>0?l/o-d/a:null,f=a>0?1-u/a:null,y=e.groupBy,b;if(y&&o>0){let w=new Map;for(let S of i){let k=[];y==="symbol"?k=S.symbols_touched||[]:y==="tag"?k=S.tags||[]:y==="type"&&(k=[S.type||"agent-session"]);for(let C of k)w.has(C)||w.set(C,[]),w.get(C).push(S);}b=Array.from(w.entries()).map(([S,k])=>{let C=k.filter(P=>P.confidence!=null),x={correct:0,partial:0,incorrect:0},_=0,R=0,I=0;for(let P of k){let D=P.assessment.verdict;x[D]++;let j=D==="correct"?1:D==="partial"?.5:0;_+=j,P.confidence!=null&&(R+=P.confidence,I+=Math.abs(j-P.confidence));}return {key:S,total:k.length,accuracyRate:_/k.length,avgConfidence:C.length>0?R/C.length:null,calibrationScore:C.length>0?1-I/C.length:null,verdictBreakdown:x}}).sort((S,k)=>k.total-S.total);}let h=[],v=o<5?`Low sample size (N=${o}). Stats may not be representative.`:o<15?`Moderate sample (N=${o}). Trends are directional, not conclusive.`:null;return v&&h.push(v),f!=null&&(f>=.9?h.push("Excellent calibration \u2014 confidence predictions closely match outcomes."):f>=.7?h.push("Good calibration \u2014 some room for improvement in confidence estimates."):f>=.5?h.push("Fair calibration \u2014 significant gap between predicted confidence and outcomes."):h.push("Poor calibration \u2014 confidence predictions diverge substantially from outcomes.")),m!=null&&(m>.15?h.push("Tendency toward under-confidence \u2014 outcomes are better than predicted."):m<-0.15&&h.push("Tendency toward over-confidence \u2014 outcomes are worse than predicted.")),c.incorrect>o*.3&&o>=5&&h.push(`High error rate: ${c.incorrect}/${o} entries assessed as incorrect.`),{handled:true,text:JSON.stringify({totalAssessed:o,totalWithConfidence:a,accuracyRate:Math.round(g*1e3)/1e3,avgConfidence:p!=null?Math.round(p*1e3)/1e3:null,avgDelta:m!=null?Math.round(m*1e3)/1e3:null,calibrationScore:f!=null?Math.round(f*1e3)/1e3:null,verdictBreakdown:c,...b?{groups:b}:{},insights:h},null,2)}}case "paradigm_lore_delete":{let n=e.id;if(!e.confirm)return {handled:true,text:JSON.stringify({success:false,message:"Deletion requires confirm: true"})};let r=await i$1(s.rootDir,n);return {handled:true,text:JSON.stringify({success:r,id:n,message:r?"Lore entry deleted":`Lore entry not found: ${n}`})}}default:return {handled:false,text:""}}}function Hl(t){return t.task_ref||t.files_modified||t.commit?"work-log":t.learnings||t.confidence!==void 0?"journal":t.decisions?.some(s=>s.rationale)?"decision":"work-log"}function $o(t){return {id:t.id,type:t.type,title:t.title,summary:t.summary,author:t.author,agent:t.agent,timestamp:t.timestamp,duration_minutes:t.duration_minutes,symbols_touched:t.symbols_touched,verification:t.verification?.status,review:t.review?{completeness:t.review.completeness,quality:t.review.quality}:null,confidence:t.confidence??null,assessment:t.assessment?t.assessment.verdict:null,assessment_delta:t.assessment_delta??null,tags:t.tags}}function Ho(){return [{name:"paradigm_captain_brief",description:"Cid's pre-task context discovery pipeline. Searches symbols, maps blast radius, checks gates, finds protocols, surfaces warnings, and produces a Context Brief injected into every subsequent agent. Call before starting any multi-file task. ~400 tokens.",inputSchema:{type:"object",properties:{taskDescription:{type:"string",description:"The task to produce a context brief for"},symbols:{type:"array",items:{type:"string"},description:'Optional pre-known symbols to anchor the search (e.g., ["#auth", "^authenticated"])'},depth:{type:"string",enum:["quick","standard","deep"],description:"Brief depth. quick=search+navigate only (<800 tokens). standard=+ripple top 3+wisdom. deep=+ripple top 5+full lore scan. Default: standard"}},required:["taskDescription"]},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_captain_debrief",description:"Cid's post-task maintenance pass. Audits .purpose coverage for touched directories, creates stubs for gaps, queues rich doc areas to Documentor, records lore, and writes the .cid-briefed marker that clears the stop hook. Call after all agents complete. ~200 tokens.",inputSchema:{type:"object",properties:{orchestrationId:{type:"string",description:"The orchestration run ID (from paradigm_orchestrate_inline)"},sessionSummary:{type:"string",description:"What was accomplished in this session"},touchedFiles:{type:"array",items:{type:"string"},description:"Files modified during this session"},newSymbols:{type:"array",items:{type:"string"},description:"New symbols registered during this session"},notes:{type:"string",description:"Optional additional notes from the orchestrating session"}},required:["orchestrationId","sessionSummary","touchedFiles"]},annotations:{readOnlyHint:false,destructiveHint:false}}]}async function St(t,e,s){return t==="paradigm_captain_brief"?ql(e,s):t==="paradigm_captain_debrief"?Ml(e,s):{handled:false,text:""}}async function ql(t,e){let s=t.taskDescription,n=t.symbols||[],i=t.depth||"standard",r=q.join(e.rootDir,".paradigm"),o$1=q.join(r,".cid-session"),a=q.join(r,".cid-briefed");try{E.existsSync(a)&&E.unlinkSync(a);let j={timestamp:new Date().toISOString(),taskDescription:s.slice(0,200),depth:i};E.mkdirSync(r,{recursive:!0}),E.writeFileSync(o$1,JSON.stringify(j,null,2),"utf8");}catch{}let c=Ll(s),l=[],d=new Set;for(let j of n)if(!d.has(j)){d.add(j);let T=Eo(j);l.push({id:j,type:T,description:"Provided as anchor symbol"});}let u=[];try{for(let j of c.slice(0,3)){let A=j$2(e.index,j).slice(0,5);for(let $ of A)if(!d.has($.symbol)){d.add($.symbol);let F=Wl($.type);l.push({id:$.symbol,type:F,description:$.description||"",file:$.file}),u.push($.symbol);}}}catch{}let g={directories:[],files:[]};try{let j=await on("paradigm_navigate",{intent:"context",task:s,response_format:"concise"},e);if(j.handled){let T=JSON.parse(j.text);if(T.files)for(let A of T.files){let $=typeof A=="string"?A:A.path||A.file||"";$&&g.files.push($);}if(T.directories)for(let A of T.directories){let $=typeof A=="string"?A:A.path||A.directory||"";$&&g.directories.push($);}if(T.symbols)for(let A of T.symbols){let $=typeof A=="string"?A:A.id;$&&!d.has($)&&(d.add($),l.push({id:$,type:Eo($),description:typeof A=="object"&&A.description||""}));}}}catch{}let p=new Set(g.directories);for(let j of g.files){let T=q.dirname(j);T&&T!=="."&&p.add(T);}let m=l.slice(0,i==="deep"?5:3),f={affectedFiles:[],affectedSymbols:[],affectedFlows:[],affectedGates:[],fragileSymbols:[]};if(i!=="quick"&&m.length>0)for(let j of m)try{let T=await fn("paradigm_ripple",{symbol:j.id,depth:2,response_format:"concise"},e);if(T.handled){let A=JSON.parse(T.text);if(A.analysis){for(let $ of A.analysis.directlyAffected||[]){let F=$.symbol||$;F&&!f.affectedSymbols.includes(F)&&f.affectedSymbols.push(F);}for(let $ of A.analysis.indirectlyAffected||[])$&&!f.affectedSymbols.includes($)&&f.affectedSymbols.push($);}if(A.affectedFlows?.affectedFlows)for(let $ of A.affectedFlows.affectedFlows){let F=$.flowId||$;F&&!f.affectedFlows.includes(F)&&f.affectedFlows.push(F);}if(A.affectedGates)for(let $ of A.affectedGates){let F=$.gate||$;F&&!f.affectedGates.includes(F)&&f.affectedGates.push(F);}A.impact==="high"&&(f.fragileSymbols.includes(j.id)||f.fragileSymbols.push(j.id));}}catch{}let y=[],b=Gl(s);if(b.length>0)try{let{handleGatesForRoute:j}=await import('./tools-ZHOHGFXD.js').catch(()=>({handleGatesForRoute:null})),T=q.join(e.rootDir,"portal.yaml");if(E.existsSync(T)){let A=E.readFileSync(T,"utf8");for(let $ of b){let F=A.includes($);y.push({route:$,gate:"^authenticated",declared:F});}}else for(let A of b)y.push({route:A,gate:"(unknown \u2014 no portal.yaml)",declared:!1});}catch{}let h=[];if(i!=="quick"&&l.length>0)try{let j=l.slice(0,5).map(A=>A.id),T=await sn("paradigm_wisdom_context",{symbols:j,include_global:!0},e);if(T.handled){let A=JSON.parse(T.text);if(A.antipatterns)for(let $ of A.antipatterns.slice(0,3)){let F=$.pattern||$.description||$.text||String($);F&&!h.includes(F)&&h.push(F);}if(A.wisdom?.antipatterns)for(let $ of A.wisdom.antipatterns.slice(0,3)){let F=$.pattern||$.description||String($);F&&!h.includes(F)&&h.push(F);}}}catch{}let v={matched:false};try{let j=await yn("paradigm_protocol_search",{task:s,limit:1},e);if(j.handled){let T=JSON.parse(j.text),A=T.matches||T.protocols||T.results||[];if(A.length>0){let $=A[0];v={matched:!0,id:$.id,name:$.name||$.title,steps:($.steps||[]).slice(0,5).map(F=>typeof F=="string"?F:F.description||String(F))};}}}catch{}let w=[];if(i!=="quick")try{let j=l[0]?.id,T={limit:i==="deep"?5:3};j&&(T.symbol=j);let A=await kt("paradigm_lore_search",T,e);if(A.handled){let F=JSON.parse(A.text).entries||[];for(let G of F.slice(0,3))w.push({id:G.id,summary:(G.summary||G.title||"").slice(0,100),relevance:j?`Related to ${j}`:"Recent project history"});}}catch{}let S=Array.from(p),k=0;for(let j of S){let T=q.join(e.rootDir,j,".purpose");if(E.existsSync(T))try{E.readFileSync(T,"utf8").trim().length>50&&k++;}catch{}}let C=S.length>0?k/S.length:.5,x=Jl(C),_=Ul(C,x,S.length),R=f.affectedSymbols.length+g.files.length,I=R>20?"large":R>8?"medium":R>2?"small":"tiny",P={territory:{directories:S.slice(0,10),files:g.files.slice(0,10),estimatedScope:I},symbols:l.slice(0,10),blastRadius:f,gates:y,protocol:v,warnings:h,coverage:{score:C,label:x,note:_},loreRefs:w,renderedBrief:""};P.renderedBrief=Bl(P);try{let j={timestamp:new Date().toISOString(),taskDescription:s.slice(0,200),depth:i,coverageScore:C};E.writeFileSync(o$1,JSON.stringify(j,null,2),"utf8");}catch{}let D=JSON.stringify(P,null,2);return o(D.length,"paradigm_captain_brief"),{handled:true,text:D}}async function Ml(t,e){let s=t.orchestrationId,n=t.sessionSummary,i=t.touchedFiles||[],r=t.newSymbols||[],o$1=t.notes,a=q.join(e.rootDir,".paradigm"),c=q.join(a,".cid-briefed"),l=q.join(a,".pending-review"),d=new Set;for(let _ of i){let R=q.dirname(_);R&&R!=="."&&d.add(R);}let u=0,g=d.size;for(let _ of d){let R=q.join(e.rootDir,_,".purpose");if(E.existsSync(R))try{E.readFileSync(R,"utf8").trim().length>50&&u++;}catch{}}let p=g>0?u/g:1,m=[],f=[];for(let _ of d){let R=q.join(e.rootDir,_,".purpose"),I=q.join(e.rootDir,_),P=false;if(E.existsSync(R))try{P=E.readFileSync(R,"utf8").trim().length>50;}catch{}if(P){if(i.some(j=>q.dirname(j)===_&&r.length>0)){f.push(_);try{let j=JSON.stringify({path:_,reason:"captain-debrief-new-symbols",priority:"medium",context:`New symbols added during orchestration ${s}: ${r.join(", ")}`,timestamp:new Date().toISOString()});E.appendFileSync(l,j+`
63
63
  `,"utf8");}catch{}}}else try{if(!E.existsSync(I))continue;let D=q.basename(_),j=zl(D,_,i);E.writeFileSync(R,j,"utf8"),m.push(_),f.push(_);try{let T=JSON.stringify({path:_,reason:"captain-debrief",priority:"high",context:`Touched during orchestration ${s}. Files: ${i.filter(A=>q.dirname(A)===_).join(", ")}`,timestamp:new Date().toISOString()});E.appendFileSync(l,T+`
64
64
  `,"utf8");}catch{}}catch{}}let y=0;for(let _ of d){let R=q.join(e.rootDir,_,".purpose");if(E.existsSync(R))try{E.readFileSync(R,"utf8").trim().length>50&&y++;}catch{}}let b=g>0?y/g:1,h="";try{let _=await kt("paradigm_lore_record",{type:"agent-session",title:`Cid Debrief: ${n.slice(0,80)}`,summary:n,symbols_touched:r,files_modified:i,tags:["arc:cid-debrief",`orch:${s}`],meta:{orchestrationId:s,coverageScore:{before:p,after:b},coverageAdded:m,...o$1?{notes:o$1}:{}}},e);if(_.handled){let R=JSON.parse(_.text);h=R.id||R.entry?.id||"";}}catch{}let v=false;try{let _={timestamp:new Date().toISOString(),sessionId:s,touchedFiles:i,coverageScore:b};E.mkdirSync(a,{recursive:!0}),E.writeFileSync(c,JSON.stringify(_,null,2),"utf8"),v=!0;}catch{}let w={taskDescription:n,orchestrationId:s,agentContributions:[],coverageDelta:{before:p,after:b},newSymbols:r,touchedFiles:i,notes:o$1||""};try{let _=q.join(a,"events","session-log.jsonl");if(E.existsSync(_)){let P=E.readFileSync(_,"utf8").split(`
65
65
  `).filter(j=>j.trim().length>0).slice(-50),D=new Map;for(let j of P)try{let T=JSON.parse(j),A=T.agentId||T.agent||T.role||"";if(!A)continue;D.has(A)||D.set(A,{contributions:[],symbolsTouched:new Set,patternsObserved:[]});let $=D.get(A),F=T.action||T.event||T.message||"";if(F&&$.contributions.push(String(F).slice(0,120)),Array.isArray(T.symbols))for(let Se of T.symbols)$.symbolsTouched.add(String(Se));let G=T.symbol||"";if(G&&$.symbolsTouched.add(G),Array.isArray(T.patterns))for(let Se of T.patterns)$.patternsObserved.includes(String(Se))||$.patternsObserved.push(String(Se));}catch{}for(let[j,T]of D.entries())w.agentContributions.push({agentId:j,contribution:T.contributions.slice(-3).join(" | "),symbolsTouched:Array.from(T.symbolsTouched).slice(0,10),patternsObserved:T.patternsObserved.slice(0,5)});}}catch{}w.agentContributions.length===0&&w.agentContributions.push({agentId:"session",contribution:n.slice(0,200),symbolsTouched:r.slice(0,10),patternsObserved:[]});let S={coverageAdded:m,delegatedToDocumentor:f,loreEntryId:h,coverageScore:{before:p,after:b,delta:b-p},stopHookCleared:v,sessionInsights:w},k=["","\u2501\u2501\u2501 LEARNING HANDOFF (\u2192 Loid) \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501","","Cid has prepared session insights for Loid's learning pass.","Call paradigm_ambient_learn_postflight with the sessionInsights","from this debrief to complete the session.","","sessionInsights available in: debrief.sessionInsights"].join(`
@@ -78,7 +78,7 @@ components:
78
78
  ${t}:
79
79
  description: "TODO: describe this component"
80
80
  tags: []
81
- `}var Yl=/[@#$%^!?&~][a-zA-Z0-9_-]+/g;var _t={architect:"tier-1",security:"tier-1",advocate:"tier-1",product:"tier-1",operations:"tier-1",sales:"tier-1",legal:"tier-1",ethicist:"tier-1",futurist:"tier-1",compliance:"tier-2",reviewer:"tier-2",designer:"tier-2",copywriter:"tier-2",researcher:"tier-2",analyst:"tier-2",dx:"tier-2",qa:"tier-2",debugger:"tier-2",performance:"tier-2",creative:"tier-2",pm:"tier-2",narrator:"tier-2",e2e:"tier-2",educator:"tier-2",community:"tier-2","content-intel":"tier-2",ai:"tier-2",mediator:"tier-2",presenter:"tier-2",mentor:"tier-2",trainer:"tier-2",a11y:"tier-2",seo:"tier-2",builder:"tier-3",tester:"tier-3",documentor:"tier-3",sysadmin:"tier-3",archivist:"tier-3",release:"tier-3",devops:"tier-3",dba:"tier-3",dataeng:"tier-3",integrator:"tier-3",network:"tier-3",streaming:"tier-3",mobile:"tier-3",gamedev:"tier-3","3d":"tier-3",i18n:"tier-3",translator:"tier-3",forge:"tier-3",secretary:"tier-3",reverser:"tier-3",audio:"tier-3",finance:"tier-3"},hn={"tier-1":"opus","tier-2":"sonnet","tier-3":"haiku"};function Go(t,e,s){try{let i=q.join(e,".paradigm","config.yaml");if(E.existsSync(i)){let o=be.load(E.readFileSync(i,"utf8"))?.["model-resolution"];if(o){let a=s?.modelTier||_t[t]||"tier-2";if(o[a])return o[a]}}}catch{}if(s?.defaultModel)return s.defaultModel;let n=_t[t]||"tier-2";return hn[n]||"sonnet"}var Vl={architect:{min:5e3,max:2e4},security:{min:3e3,max:15e3},reviewer:{min:2e3,max:1e4},builder:{min:1e4,max:5e4},tester:{min:5e3,max:2e4}},xt={architect:`You are the ARCHITECT agent.
81
+ `}var Yl=/[@#$%^!?&~][a-zA-Z0-9_-]+/g;var _t={architect:"tier-1",ftux:"tier-1",security:"tier-1",advocate:"tier-1",product:"tier-1",operations:"tier-1",sales:"tier-1",legal:"tier-1",ethicist:"tier-1",futurist:"tier-1",compliance:"tier-2",reviewer:"tier-2",designer:"tier-2",copywriter:"tier-2",researcher:"tier-2",analyst:"tier-2",dx:"tier-2",qa:"tier-2",debugger:"tier-2",performance:"tier-2",creative:"tier-2",pm:"tier-2",narrator:"tier-2",e2e:"tier-2",educator:"tier-2",community:"tier-2","content-intel":"tier-2",ai:"tier-2",mediator:"tier-2",presenter:"tier-2",mentor:"tier-2",trainer:"tier-2",a11y:"tier-2",seo:"tier-2",builder:"tier-3",tester:"tier-3",documentor:"tier-3",sysadmin:"tier-3",archivist:"tier-3",release:"tier-3",devops:"tier-3",dba:"tier-3",dataeng:"tier-3",integrator:"tier-3",network:"tier-3",streaming:"tier-3",mobile:"tier-3",gamedev:"tier-3","3d":"tier-3",i18n:"tier-3",translator:"tier-3",forge:"tier-3",secretary:"tier-3",reverser:"tier-3",audio:"tier-3",finance:"tier-3"},hn={"tier-1":"opus","tier-2":"sonnet","tier-3":"haiku"};function Go(t,e,s){try{let i=q.join(e,".paradigm","config.yaml");if(E.existsSync(i)){let o=be.load(E.readFileSync(i,"utf8"))?.["model-resolution"];if(o){let a=s?.modelTier||_t[t]||"tier-2";if(o[a])return o[a]}}}catch{}if(s?.defaultModel)return s.defaultModel;let n=_t[t]||"tier-2";return hn[n]||"sonnet"}var Vl={architect:{min:5e3,max:2e4},ftux:{min:4e3,max:18e3},security:{min:3e3,max:15e3},reviewer:{min:2e3,max:1e4},builder:{min:1e4,max:5e4},tester:{min:5e3,max:2e4}},xt={architect:`You are the ARCHITECT agent.
82
82
 
83
83
  ## Your Role
84
84
  You design system architecture, write specifications, and plan features.
@@ -255,7 +255,72 @@ Other agents focus on their domain \u2014 you handle all Paradigm compliance.
255
255
  - Modify source code (.ts, .js, .py, .rs files)
256
256
  - Write implementation code
257
257
  - Change application logic
258
- - Skip .purpose coverage for new code directories`,compliance:`You are the COMPLIANCE agent (Rune).
258
+ - Skip .purpose coverage for new code directories`,ftux:`You are NORA, the FTUX (First-Time User Experience) agent.
259
+
260
+ ## Your Role
261
+ You simulate a first-time user actively trying to use a feature, product, or documentation surface.
262
+ Your job is to surface confusion, gaps, and broken flows BEFORE real users encounter them.
263
+ You are not a quality reviewer \u2014 you are a person trying to use something for the first time.
264
+
265
+ ## Simulation Integrity (CRITICAL RULE)
266
+ You may ONLY read user-facing surfaces. Your allowed reading list per project type:
267
+ - **CLI**: README.md, --help output, docs/guides/**, docs/commands/**, CHANGELOG.md (latest entry only), plugin READMEs, user-visible error strings
268
+ - **Web**: UI labels, empty states, onboarding copy, docs/**, public API docs
269
+ - **Library**: public API docs, type signatures (exported symbols only), examples/**
270
+ - **FORBIDDEN**: source code, .purpose files, internal specs, .paradigm/** metadata, team context
271
+
272
+ This constraint is not optional. The moment you read source code, your simulation is corrupted.
273
+ Your confusion IS the data. If you can't figure something out from user-facing surfaces, that IS the finding.
274
+
275
+ ## Methodology
276
+ For each surface or feature you evaluate:
277
+ 1. **State your goal** \u2014 what a real user would be trying to accomplish ("I want to install the CLI and run my first command")
278
+ 2. **Walk each step** \u2014 simulate clicking, typing, reading, and following instructions exactly as written
279
+ 3. **Note every friction point** \u2014 anything that requires knowledge you shouldn't have, a term you've never seen defined, a step that assumes prior context, a link that leads nowhere, a contradiction
280
+ 4. **Classify and rate each friction point** \u2014 use the output schema below
281
+
282
+ ## Output Schema
283
+ Produce a structured friction report in markdown. Store at: .paradigm/ftux/reports/YYYY-MM-DD.md
284
+
285
+ Required sections:
286
+ \`\`\`
287
+ ## Surface Examined
288
+ [what you read and in what order]
289
+
290
+ ## Task Attempted
291
+ [the user goal you simulated]
292
+
293
+ ## Step-by-Step Walkthrough
294
+ For each step:
295
+ - **Step N**: [what you did / what the surface said to do]
296
+ - Outcome: [success / blocked / confused]
297
+ - Friction: [friction type if any] \u2014 [severity]
298
+ - Note: [specific quote or gap that caused the friction]
299
+
300
+ ## Friction Summary
301
+ | Step | Type | Severity | Description |
302
+ |------|------|----------|-------------|
303
+ | N | missing_coverage | critical | ... |
304
+
305
+ ## Verdict
306
+ [Overall readiness: ready / needs-work / blocked]
307
+ [1-2 sentence summary of the most critical gaps]
308
+ \`\`\`
309
+
310
+ Friction types: missing_coverage | assumed_context | undefined_term | broken_flow | buried_info | contradictory
311
+ Severity: critical | high | medium | low
312
+
313
+ ## What You NEVER Do
314
+ - Read source code or internal specs to fill in gaps you couldn't find in user-facing surfaces
315
+ - Simulate a user who already knows the answer
316
+ - Skip steps because you (the agent) already know how it works
317
+ - Produce vague findings like "could be clearer" \u2014 every finding must cite the specific surface and quote
318
+
319
+ ## When You Run
320
+ - After Builder completes work that touches a user-visible surface
321
+ - When triggered by keywords: ftux, onboarding, "new user", "public ready", release
322
+ - Before Documentor, so gaps can be fixed before .purpose files are updated
323
+ - On demand for any feature when the team needs a first-time user perspective`,compliance:`You are the COMPLIANCE agent (Rune).
259
324
 
260
325
  ## Your Role
261
326
  You plan symbols before implementation and validate coverage after.
@@ -339,7 +404,7 @@ Examples:
339
404
  - "Fix the login bug" \u2192 quick (greenlight or escalate)
340
405
  - "Add user authentication with JWT" \u2192 plan \u2192 architect + security + builder + tester
341
406
  - "Should I use soft delete or hard delete?" \u2192 plan \u2192 architect only (analysis)
342
- - "Refactor the payment module" \u2192 plan \u2192 architect + builder`,inputSchema:{type:"object",properties:{task:{type:"string",description:'The task to orchestrate (e.g., "Build @payment-system with Stripe integration")'},mode:{type:"string",enum:["quick","plan","execute"],description:'Mode: "quick" for lightweight pre-check (advocate + reviewer), "plan" returns suggested agents and plan, "execute" returns prompts ready for Task tool'},agents:{type:"array",items:{type:"string"},description:'Optional: Override which agents to use (e.g., ["architect", "builder"])'}},required:["task"]},annotations:{readOnlyHint:true,destructiveHint:false},aliases:["plan","coordinate","team","multi-agent","orchestrate","agents","spawn agents"]},{name:"paradigm_agent_prompt",description:"Get the complete prompt for a specific agent to execute a task. Use this when you need to spawn an agent via the Task tool with full context.",inputSchema:{type:"object",properties:{agent:{type:"string",enum:["advocate","architect","builder","compliance","tester","reviewer","security","documentor"],description:"The agent role to get prompt for"},task:{type:"string",description:"The specific task for this agent"},handoffContext:{type:"string",description:"Optional: Context passed from a previous agent"},previousAgent:{type:"string",description:"Optional: Name of the agent that handed off"}},required:["agent","task"]},annotations:{readOnlyHint:true,destructiveHint:false}}]}async function Jo(t,e,s){return t==="paradigm_orchestrate_inline"?Kl(e,s):t==="paradigm_agent_prompt"?Xl(e,s):{handled:false,text:""}}async function Kl(t,e){let s=t.task,n=t.mode||"execute",i=t.agents;try{let h=q.join(e.rootDir,".paradigm",".orchestrated");E.writeFileSync(h,new Date().toISOString(),"utf8");}catch{}let r=zo(e.rootDir);if(!r){let h=JSON.stringify({error:"No agents.yaml found",suggestion:"Run `paradigm team init` to set up multi-agent orchestration"},null,2);return o(h.length,"paradigm_orchestrate_inline"),{handled:true,text:h}}let o$1=b$8(e.rootDir);if(o$1&&r.agents){let h={};for(let[v,w]of Object.entries(r.agents))o$1.includes(v)&&(h[v]=w);r.agents=h;}let a=Rt(s),c=[];try{let{processPendingEvents:h,loadNominations:v}=await import('./nomination-engine-KNSOAT4W.js');h(e.rootDir),c=v(e.rootDir,{pending_only:!0,limit:10}).filter(S=>S.urgency==="high"||S.urgency==="critical").map(S=>({agent:S.agent,urgency:S.urgency,brief:S.brief}));}catch{}let l=ad(s);if(n==="quick")return Ql(s,a,l,c,r,e);let d=ed(s,r.agents,i,l,r.orchestration);if(n==="plan"){let h=ld(s,r.agents),v=cd(d,l),w;try{let{loadNotebookEntries:_}=await import('./notebook-loader-CENTDDUJ.js'),R=a.map(D=>D.replace(/^[#$^!~@&%?]/,"").toLowerCase()),I={},P=new Set;for(let D of d.stages)for(let j of D.agents){if(P.has(j.name))continue;P.add(j.name);let T=_(j.name,e.rootDir),A=R.length>0?_(j.name,e.rootDir,{concepts:R}):T;T.length>0&&(I[j.name]={totalEntries:T.length,relevantEntries:A.length});}Object.keys(I).length>0&&(w=I);}catch{}let S=d.stages.flatMap(_=>_.agents.map(R=>R.name)),k=Uo(S,r.agents),C=k.length>0?{edges:k,note:"Shows which agents hand off to which based on agents.yaml handoff_to. Stage ordering was derived from this graph."}:void 0,x=JSON.stringify({task:s,mode:"plan",classification:{type:l.type,complexity:l.complexity,securityRequired:l.securityRequired,costMultiplier:l.costMultiplier},plan:d,suggestedAgents:h,costPreview:v,...C?{collaborationGraph:C}:{},...w?{notebookKnowledge:w,notebookNote:"Agents with relevant notebook entries will have curated knowledge injected into their prompts during execute mode."}:{},...c.length>0?{activeNominations:c,nominationNote:`${c.length} high-urgency agent nomination(s) pending. These agents have been flagged by the system for attention on this project.`}:{},instructions:["Review task classification and cost preview above","Review suggested agents based on task triggers",...C?["Review collaboration graph \u2014 stage ordering was derived from agent handoff_to edges"]:[],...w?["Review notebook knowledge \u2014 agents with relevant entries will receive curated snippets in execute mode"]:[],...c.length>0?["Review active nominations \u2014 agents flagged by the system may need to be included"]:[],'Call again with mode="execute" to get full prompts and execution strategy',"Stages marked canRunParallel: true can be launched simultaneously","After each agent completes, pass handoff context to the next stage"]},null,2);return o(x.length,"paradigm_orchestrate_inline"),{handled:true,text:x}}let u=new Map;try{let{loadAgentProfile:h,buildProfileEnrichment:v}=await import('./agent-loader-RJRVO5GQ.js'),{loadDecisions:w}=await import('./decision-loader-2XPZE4EZ.js'),{loadJournalEntries:S}=await import('./journal-loader-GLH7XFTK.js'),{loadNominations:k}=await import('./nomination-engine-KNSOAT4W.js'),{loadAgentState:C}=await import('./agent-state-KSQ3S7OB.js'),{loadNotebookEntries:x}=await import('./notebook-loader-CENTDDUJ.js'),_=w(e.rootDir,{status:"active",limit:5}).map(P=>({title:P.title,decision:P.decision.slice(0,150)})),R=k(e.rootDir,{pending_only:!0,limit:10}).map(P=>({urgency:P.urgency,brief:P.brief})),I=a.map(P=>P.replace(/^[#$^!~@&%?]/,"").toLowerCase());for(let P of d.stages)for(let D of P.agents)if(!u.has(D.name)){let j=h(e.rootDir,D.name);if(j){if(!c$6(D.name,e.rootDir))continue;let T=S(D.name,{transferable:!0,limit:5}).map(G=>({trigger:G.trigger,insight:G.insight.slice(0,150)})),A=C(D.name,e.rootDir),$;try{let G=x(D.name,e.rootDir,I.length>0?{concepts:I}:void 0);if(G.length>0){let Se=G.sort((ue,Ue)=>Ue.confidence-ue.confidence||new Date(Ue.updated).getTime()-new Date(ue.updated).getTime()).slice(0,5);$=Se.map(ue=>({context:ue.context,snippet:ue.snippet,concepts:ue.concepts}));try{let{recordNotebookReference:ue}=await import('./session-work-log-BX434ZLK.js');ue(e.rootDir,D.name,Se.map(Ue=>Ue.id));}catch{}try{let{incrementApplied:ue}=await import('./notebook-loader-CENTDDUJ.js');for(let Ue of Se)ue(D.name,Ue.id,e.rootDir);}catch{}}}catch{}let F=v(j,a,$,{recentDecisions:_,journalInsights:T,pendingNominations:R},A?{lastSession:A.lastSession,pendingWork:A.pendingWork,recentPatterns:A.recentPatterns,sessionsOnProject:A.sessionsOnProject}:void 0);if(j.permissions){let G=[`
407
+ - "Refactor the payment module" \u2192 plan \u2192 architect + builder`,inputSchema:{type:"object",properties:{task:{type:"string",description:'The task to orchestrate (e.g., "Build @payment-system with Stripe integration")'},mode:{type:"string",enum:["quick","plan","execute"],description:'Mode: "quick" for lightweight pre-check (advocate + reviewer), "plan" returns suggested agents and plan, "execute" returns prompts ready for Task tool'},agents:{type:"array",items:{type:"string"},description:'Optional: Override which agents to use (e.g., ["architect", "builder"])'}},required:["task"]},annotations:{readOnlyHint:true,destructiveHint:false},aliases:["plan","coordinate","team","multi-agent","orchestrate","agents","spawn agents"]},{name:"paradigm_agent_prompt",description:"Get the complete prompt for a specific agent to execute a task. Use this when you need to spawn an agent via the Task tool with full context.",inputSchema:{type:"object",properties:{agent:{type:"string",enum:["advocate","architect","builder","compliance","ftux","tester","reviewer","security","documentor"],description:"The agent role to get prompt for"},task:{type:"string",description:"The specific task for this agent"},handoffContext:{type:"string",description:"Optional: Context passed from a previous agent"},previousAgent:{type:"string",description:"Optional: Name of the agent that handed off"}},required:["agent","task"]},annotations:{readOnlyHint:true,destructiveHint:false}}]}async function Jo(t,e,s){return t==="paradigm_orchestrate_inline"?Kl(e,s):t==="paradigm_agent_prompt"?Xl(e,s):{handled:false,text:""}}async function Kl(t,e){let s=t.task,n=t.mode||"execute",i=t.agents;try{let h=q.join(e.rootDir,".paradigm",".orchestrated");E.writeFileSync(h,new Date().toISOString(),"utf8");}catch{}let r=zo(e.rootDir);if(!r){let h=JSON.stringify({error:"No agents.yaml found",suggestion:"Run `paradigm team init` to set up multi-agent orchestration"},null,2);return o(h.length,"paradigm_orchestrate_inline"),{handled:true,text:h}}let o$1=b$8(e.rootDir);if(o$1&&r.agents){let h={};for(let[v,w]of Object.entries(r.agents))o$1.includes(v)&&(h[v]=w);r.agents=h;}let a=Rt(s),c=[];try{let{processPendingEvents:h,loadNominations:v}=await import('./nomination-engine-KNSOAT4W.js');h(e.rootDir),c=v(e.rootDir,{pending_only:!0,limit:10}).filter(S=>S.urgency==="high"||S.urgency==="critical").map(S=>({agent:S.agent,urgency:S.urgency,brief:S.brief}));}catch{}let l=ad(s);if(n==="quick")return Ql(s,a,l,c,r,e);let d=ed(s,r.agents,i,l,r.orchestration);if(n==="plan"){let h=ld(s,r.agents),v=cd(d,l),w;try{let{loadNotebookEntries:_}=await import('./notebook-loader-CENTDDUJ.js'),R=a.map(D=>D.replace(/^[#$^!~@&%?]/,"").toLowerCase()),I={},P=new Set;for(let D of d.stages)for(let j of D.agents){if(P.has(j.name))continue;P.add(j.name);let T=_(j.name,e.rootDir),A=R.length>0?_(j.name,e.rootDir,{concepts:R}):T;T.length>0&&(I[j.name]={totalEntries:T.length,relevantEntries:A.length});}Object.keys(I).length>0&&(w=I);}catch{}let S=d.stages.flatMap(_=>_.agents.map(R=>R.name)),k=Uo(S,r.agents),C=k.length>0?{edges:k,note:"Shows which agents hand off to which based on agents.yaml handoff_to. Stage ordering was derived from this graph."}:void 0,x=JSON.stringify({task:s,mode:"plan",classification:{type:l.type,complexity:l.complexity,securityRequired:l.securityRequired,costMultiplier:l.costMultiplier},plan:d,suggestedAgents:h,costPreview:v,...C?{collaborationGraph:C}:{},...w?{notebookKnowledge:w,notebookNote:"Agents with relevant notebook entries will have curated knowledge injected into their prompts during execute mode."}:{},...c.length>0?{activeNominations:c,nominationNote:`${c.length} high-urgency agent nomination(s) pending. These agents have been flagged by the system for attention on this project.`}:{},instructions:["Review task classification and cost preview above","Review suggested agents based on task triggers",...C?["Review collaboration graph \u2014 stage ordering was derived from agent handoff_to edges"]:[],...w?["Review notebook knowledge \u2014 agents with relevant entries will receive curated snippets in execute mode"]:[],...c.length>0?["Review active nominations \u2014 agents flagged by the system may need to be included"]:[],'Call again with mode="execute" to get full prompts and execution strategy',"Stages marked canRunParallel: true can be launched simultaneously","After each agent completes, pass handoff context to the next stage"]},null,2);return o(x.length,"paradigm_orchestrate_inline"),{handled:true,text:x}}let u=new Map;try{let{loadAgentProfile:h,buildProfileEnrichment:v}=await import('./agent-loader-RJRVO5GQ.js'),{loadDecisions:w}=await import('./decision-loader-2XPZE4EZ.js'),{loadJournalEntries:S}=await import('./journal-loader-GLH7XFTK.js'),{loadNominations:k}=await import('./nomination-engine-KNSOAT4W.js'),{loadAgentState:C}=await import('./agent-state-KSQ3S7OB.js'),{loadNotebookEntries:x}=await import('./notebook-loader-CENTDDUJ.js'),_=w(e.rootDir,{status:"active",limit:5}).map(P=>({title:P.title,decision:P.decision.slice(0,150)})),R=k(e.rootDir,{pending_only:!0,limit:10}).map(P=>({urgency:P.urgency,brief:P.brief})),I=a.map(P=>P.replace(/^[#$^!~@&%?]/,"").toLowerCase());for(let P of d.stages)for(let D of P.agents)if(!u.has(D.name)){let j=h(e.rootDir,D.name);if(j){if(!c$6(D.name,e.rootDir))continue;let T=S(D.name,{transferable:!0,limit:5}).map(G=>({trigger:G.trigger,insight:G.insight.slice(0,150)})),A=C(D.name,e.rootDir),$;try{let G=x(D.name,e.rootDir,I.length>0?{concepts:I}:void 0);if(G.length>0){let Se=G.sort((ue,Ue)=>Ue.confidence-ue.confidence||new Date(Ue.updated).getTime()-new Date(ue.updated).getTime()).slice(0,5);$=Se.map(ue=>({context:ue.context,snippet:ue.snippet,concepts:ue.concepts}));try{let{recordNotebookReference:ue}=await import('./session-work-log-BX434ZLK.js');ue(e.rootDir,D.name,Se.map(Ue=>Ue.id));}catch{}try{let{incrementApplied:ue}=await import('./notebook-loader-CENTDDUJ.js');for(let Ue of Se)ue(D.name,Ue.id,e.rootDir);}catch{}}}catch{}let F=v(j,a,$,{recentDecisions:_,journalInsights:T,pendingNominations:R},A?{lastSession:A.lastSession,pendingWork:A.pendingWork,recentPatterns:A.recentPatterns,sessionsOnProject:A.sessionsOnProject}:void 0);if(j.permissions){let G=[`
343
408
  ## Permission Constraints`];j.permissions.paths?.deny?.length&&G.push(`**Denied paths:** ${j.permissions.paths.deny.join(", ")}`),j.permissions.paths?.write?.length&&G.push(`**Writable paths:** ${j.permissions.paths.write.join(", ")}`),j.permissions.tools?.deny?.length&&G.push(`**Denied tools:** ${j.permissions.tools.deny.join(", ")}`),j.permissions.dangerous_actions?.length&&G.push(`**Requires approval for:** ${j.permissions.dangerous_actions.join(", ")}`),F+=`
344
409
  `+G.join(`
345
410
  `);}F.trim()&&u.set(D.name,{enrichment:F,nickname:j.nickname});}}}catch{}let g;try{let h=await St("paradigm_captain_brief",{taskDescription:s,symbols:a,depth:"standard"},e);h.handled&&(g=JSON.parse(h.text).renderedBrief);}catch{}let p=[];for(let h of d.stages){let v=[];for(let w of h.agents){let S=r.agents[w.name],k={name:S?.name||w.name,role:S?.role||xt[w.name]||`${w.name} agent`,focus:S?.focus||{reads:["**/*"],writes:["**/*"]},defaultModel:Go(w.name,e.rootDir,S),triggers:S?.triggers,handoff_to:S?.handoff_to,context:S?.context,protocol:S?.protocol},C=u.get(w.name),x=Bo({agent:k,task:w.task,symbols:a,dependsOn:w.dependsOn,profileEnrichment:C?.enrichment,nickname:C?.nickname,captainBrief:g});v.push(x);}p.push({stage:h.stage,canRunParallel:h.canRunParallel,agents:v});}let m=`orch-${Date.now().toString(36)}-${Math.random().toString(36).substring(2,6)}`;dd(e.rootDir,m,s,d);try{let{appendSessionWorkEntry:h}=await import('./session-work-log-BX434ZLK.js');for(let v of p)for(let w of v.agents)h(e.rootDir,{timestamp:new Date().toISOString(),type:"agent-contribution",agent:w.agent,contribution:w.taskDescription?.slice(0,200)||s.slice(0,200),attribution:w.attribution,symbols:a});}catch{}try{let{recordAgentSession:h}=await import('./agent-state-KSQ3S7OB.js'),w=(await import('./session-tracker-D2CH7RJF.js')).default?.session?.sessionId||m;for(let S of p)for(let k of S.agents)h(k.agent,e.rootDir,{sessionId:w,summary:`${k.attribution||k.agent}: ${(k.taskDescription||s).slice(0,200)}`,symbolsTouched:a});}catch{}let f=`thr-orch-${m}`;try{let h=await import('./symphony-loader-VA4UREOM.js'),v=q.basename(e.rootDir),w=`${v}/maestro`;try{h.getMyIdentity(e.rootDir)||h.registerAgent(e.rootDir,"maestro","Maestro (orchestrator)");}catch{}h.createThread(`Orchestration: ${s.slice(0,80)}`,{id:w,name:"Maestro",type:"agent",project:v,role:"orchestrator"});let S=q.join(Fo.homedir(),".paradigm","score","threads"),k=E.readdirSync(S).filter(x=>x.endsWith(".json")).sort(),C=k[k.length-1];if(C){let x=q.join(S,C),_=q.join(S,`${f}.json`),R=JSON.parse(E.readFileSync(x,"utf8"));R.id=f,E.writeFileSync(_,JSON.stringify(R,null,2),"utf8"),x!==_&&E.unlinkSync(x);}for(let x of p)for(let _ of x.agents){let R=h.buildMessage({threadRoot:f,sender:{id:w,name:"Maestro",type:"agent",project:v,role:"orchestrator"},intent:"task",text:`[Maestro] Stage ${x.stage}: Assigned to ${_.attribution||_.agent} \u2014 ${_.taskDescription||s}`,symbols:a,metadata:{task:{stage:x.stage,canRunParallel:x.canRunParallel}}});h.routeMessage(R);}}catch{}let y={orchestrationId:m,task:s,mode:"execute",symbols:a,totalAgents:d.estimatedAgents,...c.length>0?{activeNominations:c}:{},stages:p,executionInstructions:["Execute stages in order (stage 0, then stage 1, etc.)","Agents within a stage can be run in parallel if your environment supports it","Pass handoff context between stages",'Present each agent response as an attributed message using the attribution prefix (e.g., "[architect] Rate limiter should go before ^authenticated")',"Do NOT synthesize agent responses \u2014 show them as distinct contributions from each agent","After all agents in a stage complete, reconcile their outputs before proceeding to the next stage"],finalStep:{mandatory:true,description:"FINAL STEPS (mandatory, in order):",steps:[{order:1,action:"Call paradigm_captain_debrief",args:{orchestrationId:`${m} (use the orchestrationId from this response)`,sessionSummary:"(summarize what was accomplished)",touchedFiles:"(list all files modified during this session)",newSymbols:"(optional: list any new symbols registered)"}},{order:2,action:"Take the sessionInsights from the debrief result and call paradigm_ambient_learn_postflight",args:{sessionId:`${m} (use the orchestrationId from this response)`,context:"(pass the sessionInsights object from the debrief result here)"},note:"This is Loid's learning pass \u2014 she processes what the crew learned and ensures it compounds."},{order:3,action:"Session is complete."}],note:"Step 1 closes the session, updates .purpose coverage, records lore, and clears the stop hook. Step 2 runs Loid's learning pass on the session insights. Both steps are required \u2014 the session is NOT complete until both run."},claudeCode:{method:"Task tool",example:{description:p[0]?.agents[0]?.taskDescription||"Agent task",prompt:"(see agent prompts above)",subagent_type:"general-purpose"},parallel:"Launch multiple Task calls in one message for parallel stages"},sequential:{method:"Execute each role in sequence within this session",steps:d.stages.map((h,v)=>({stage:v,rolePrompt:`Adopt the ${h.agents[0]?.name} role. Focus ONLY on: ${h.agents.map(w=>w.task).join(", ")}`,constraint:v===0?"Design/plan only \u2014 do NOT write implementation code":v===d.stages.length-1?"Verify and test \u2014 do NOT change implementation":"Implement following the design from the previous stage"}))},cli:{method:"paradigm team orchestrate",command:`paradigm team orchestrate "${s}"`,note:"Spawns independent agent processes \u2014 works from any terminal"},symphony:{enabled:true,orchestrationThread:f,instructions:["After each agent completes, call paradigm_symphony_send to report progress. This makes the work visible in Conductor.",'Use intent "context" for analysis, "proposal" for recommendations, "decision" for decisions made',`Set threadRoot to "${f}" so all contributions are in one thread`,"Include the symbols array from the agent relay output"],perAgentInstruction:`When each agent finishes, run: paradigm_symphony_send threadId="${f}" intent="task-complete" text="[agentName] Summary of completed work" symbols=[touched symbols]`,exampleCall:{intent:"context",text:"[architect] Rate limiter should be placed before ^authenticated gate to prevent unauthenticated flood",threadRoot:f,symbols:["#rate-limiter","^authenticated"]}}},b=JSON.stringify(y,null,2);return o(b.length,"paradigm_orchestrate_inline"),{handled:true,text:b}}async function Ql(t,e,s,n,i,r){let o$1=t.toLowerCase(),a;try{let b=await St("paradigm_captain_brief",{taskDescription:t,symbols:e,depth:"quick"},r);if(b.handled){let h=JSON.parse(b.text);a={coverage:`${h.coverage?.label||"unknown"} (${Math.round((h.coverage?.score||0)*100)}%)`,warnings:h.warnings||[]};}}catch{}let c=[];s.securityRequired&&c.push("security-adjacent task (auth, gates, permissions detected)"),s.complexity==="high"&&c.push(`high complexity task (type: ${s.type})`),e.length>=4&&c.push(`${e.length} symbols in scope \u2014 cross-cutting change`);let l=n.filter(b=>b.urgency==="critical");l.length>0&&c.push(`${l.length} critical agent nomination(s) pending`);let d={assumptions:[],risks:[],edgeCases:[],questions:[]};(o$1.includes("simple")||o$1.includes("just")||o$1.includes("only"))&&d.assumptions.push("Task framed as simple \u2014 verify no hidden complexity"),(o$1.includes("always")||o$1.includes("never"))&&d.assumptions.push("Absolute language detected \u2014 edge cases likely exist"),!o$1.includes("error")&&!o$1.includes("fail")&&!o$1.includes("invalid")&&d.assumptions.push("No error/failure handling mentioned \u2014 what happens when it fails?"),e.some(b=>b.startsWith("$"))&&d.risks.push("Flow symbols detected \u2014 multi-step changes have ordering/rollback risk"),e.some(b=>b.startsWith("^"))&&(d.risks.push("Gate symbols detected \u2014 authorization changes require security review"),c.some(b=>b.includes("security"))||c.push("gate symbols in scope \u2014 security review recommended")),s.matchedKeywords.some(b=>["migration","database","schema"].includes(b))&&d.risks.push("Data migration risk \u2014 irreversible changes need rollback plan"),s.matchedKeywords.some(b=>["delete","remove","drop"].includes(b))&&d.risks.push("Destructive operation \u2014 verify nothing depends on removed items"),(o$1.includes("add")||o$1.includes("new"))&&d.edgeCases.push("New feature \u2014 how does it interact with existing features?"),(o$1.includes("refactor")||o$1.includes("rename"))&&d.edgeCases.push("Refactor \u2014 all callers updated? Integration tests cover the change?"),(o$1.includes("fix")||o$1.includes("bug"))&&d.edgeCases.push("Bug fix \u2014 does the fix address the root cause or just the symptom?"),o$1.includes("test")||d.questions.push("How will this be tested?"),e.length===0&&d.questions.push("No symbols referenced \u2014 which components are actually affected?");let u={concerns:[],suggestions:[]};for(let b of e){let h=b.replace(/^[#$^!~@&%?]/,"");!i.agents[h]&&b.startsWith("#");}s.costMultiplier.max>1&&u.concerns.push(`Higher-than-average complexity (${s.costMultiplier.min}x-${s.costMultiplier.max}x baseline) \u2014 consider breaking into smaller tasks`);let g=[];try{let{loadNotebookEntries:b}=await import('./notebook-loader-CENTDDUJ.js'),h=e.map(w=>w.replace(/^[#$^!~@&%?]/,"").toLowerCase()),v=b("advocate",r.rootDir,h.length>0?{concepts:h}:void 0);v.length>0&&(g=v.sort((w,S)=>S.confidence-w.confidence).slice(0,3).map(w=>w.snippet));}catch{}let m=c.length>=2||c.some(b=>b.includes("security")||b.includes("critical"))?"escalate":"greenlight",f={mode:"quick",task:t,verdict:m,classification:{type:s.type,complexity:s.complexity,securityRequired:s.securityRequired},advocate:{agent:"Jinx (advocate)",...d.assumptions.length>0?{assumptions:d.assumptions}:{},...d.risks.length>0?{risks:d.risks}:{},...d.edgeCases.length>0?{edgeCases:d.edgeCases}:{},...d.questions.length>0?{questions:d.questions}:{},...g.length>0?{notebookInsights:g}:{}},reviewer:{agent:"reviewer",...u.concerns.length>0?{concerns:u.concerns}:{},...u.suggestions.length>0?{suggestions:u.suggestions}:{}},...c.length>0?{escalationSignals:c}:{},...n.length>0?{activeNominations:n}:{},...a?{captainBrief:a}:{},symbols:e,instructions:m==="greenlight"?["Quick check passed \u2014 proceed with implementation.","Orchestration enforcement is satisfied.",d.questions.length>0?`Address Jinx's questions during implementation: ${d.questions.join("; ")}`:"No open questions from advocate."]:["Quick check recommends full orchestration.",`Escalation reasons: ${c.join("; ")}`,'Call paradigm_orchestrate_inline mode="plan" for full agent planning.',"Orchestration enforcement is satisfied regardless of verdict."]},y=JSON.stringify(f,null,2);return o(y.length,"paradigm_orchestrate_inline"),{handled:true,text:y}}async function Xl(t,e){let s=t.agent,n=t.task,i=t.handoffContext,r=t.previousAgent,o$1=zo(e.rootDir),a=b$8(e.rootDir);if(a&&!a.includes(s)){let y=JSON.stringify({warning:`Agent "${s}" is not on this project's roster`,suggestion:`Run paradigm_agent_activate id="${s}" to add it, or check .paradigm/roster.yaml`,activeRoster:a},null,2);return o(y.length,"paradigm_agent_prompt"),{handled:true,text:y}}let c=o$1?.agents[s],l={name:c?.name||s,role:c?.role||xt[s]||xt.builder,focus:c?.focus||{reads:["**/*"],writes:["**/*"]},defaultModel:Go(s,e.rootDir,c),triggers:c?.triggers,handoff_to:c?.handoff_to,context:c?.context,protocol:c?.protocol},d=Rt(n),u,g;try{let{loadAgentProfile:y,buildProfileEnrichment:b}=await import('./agent-loader-RJRVO5GQ.js'),{loadDecisions:h}=await import('./decision-loader-2XPZE4EZ.js'),{loadJournalEntries:v}=await import('./journal-loader-GLH7XFTK.js'),{loadNominations:w}=await import('./nomination-engine-KNSOAT4W.js'),{loadNotebookEntries:S}=await import('./notebook-loader-CENTDDUJ.js'),k=y(e.rootDir,s);if(k){g=k.nickname;let C=h(e.rootDir,{status:"active",limit:5}).map(P=>({title:P.title,decision:P.decision.slice(0,150)})),x=v(s,{transferable:!0,limit:5}).map(P=>({trigger:P.trigger,insight:P.insight.slice(0,150)})),_=w(e.rootDir,{pending_only:!0,limit:10}).map(P=>({urgency:P.urgency,brief:P.brief})),R;try{let P=d.map(j=>j.replace(/^[#$^!~@&%?]/,"").toLowerCase()),D=S(s,e.rootDir,P.length>0?{concepts:P}:void 0);if(D.length>0){let j=D.sort((T,A)=>A.confidence-T.confidence||new Date(A.updated).getTime()-new Date(T.updated).getTime()).slice(0,5);R=j.map(T=>({context:T.context,snippet:T.snippet,concepts:T.concepts}));try{let{recordNotebookReference:T}=await import('./session-work-log-BX434ZLK.js');T(e.rootDir,s,j.map(A=>A.id));}catch{}}}catch{}let I=b(k,d,R,{recentDecisions:C,journalInsights:x,pendingNominations:_});if(k.permissions){let P=[`
package/dist/mcp.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import {d,g,h,e,a as a$1,b as b$1,f,c}from'./chunk-CMCQHU46.js';import'./chunk-4UJ4NIEQ.js';import'./chunk-4Q7XYPL4.js';import'./chunk-KLBH26PA.js';import'./chunk-JNSJVCTU.js';import'./chunk-Q2J542ST.js';import'./chunk-XROULIQN.js';import'./chunk-ZUAUFZRJ.js';import'./chunk-3KVVC4WV.js';import {m as m$1,n,p as p$1,h as h$1,i,ma}from'./chunk-FILLU77P.js';import'./chunk-M4UMM6DC.js';import'./chunk-ODVKPZZ4.js';import'./chunk-74SGKSRQ.js';import {j as j$1}from'./chunk-UPFCBVXY.js';import {b,a}from'./chunk-EK4ZRIFJ.js';import'./chunk-4SCKMGTB.js';import'./chunk-DVZWCXB6.js';import'./chunk-QGZRM6ZB.js';import'./chunk-VG7FN2TU.js';import'./chunk-5TAVYPOV.js';import {Server}from'@modelcontextprotocol/sdk/server/index.js';import {StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import {ListResourcesRequestSchema,ReadResourceRequestSchema}from'@modelcontextprotocol/sdk/types.js';import*as p from'fs';import*as m from'path';function se(e){return {id:e.id,symbol:`^${e.id}`,description:e.description,locks:e.locks?.map(s=>({id:s.id,description:s.description,keys:s.keys?.map(n=>n.expression||n),mode:s.mode||"all"})),prizes:e.prizes?.map(s=>({id:s.id,oneTime:s.oneTime}))}}function F(e){let s=e.gateConfig?.gates||[],n=i(e.index,"gate"),t=new Map;for(let o of n){let r=o.symbol.replace(/^\^/,"");t.set(r,{id:r,symbol:o.symbol,description:o.description,source:"purpose",filePath:o.filePath,data:o.data});}for(let o of s)t.set(o.id,{...se(o),source:"portal.yaml"});return Array.from(t.values())}function I(e){let s=e.gateConfig?.flows||[],n=i(e.index,"flow"),t=new Map;for(let o of n){let r=o.symbol.replace(/^\$/,"");t.set(r,{id:r,symbol:o.symbol,description:o.description,source:"purpose",filePath:o.filePath,data:o.data});}for(let o of s)t.set(o.id,{id:o.id,symbol:`$${o.id}`,description:o.description,gates:o.gates,source:"portal.yaml"});return Array.from(t.values())}function U(){return [{uri:"paradigm://wisdom/preferences",name:"Wisdom - Preferences",description:"Team preferences for patterns, testing, and code style",mimeType:"application/json"},{uri:"paradigm://wisdom/antipatterns",name:"Wisdom - Antipatterns",description:"What NOT to do, with reasons and alternatives",mimeType:"application/json"},{uri:"paradigm://wisdom/decisions",name:"Wisdom - Decisions",description:"Architectural Decision Records (ADRs) index",mimeType:"application/json"}]}async function z(e$1,s){if(e$1==="wisdom/preferences"){let n=await e(s);return {handled:true,text:JSON.stringify({version:n.preferences?.version||"1.0",global:n.preferences?.global||{},by_symbol:n.preferences?.by_symbol||{},symbol_count:Object.keys(n.preferences?.by_symbol||{}).length},null,2)}}if(e$1.startsWith("wisdom/preferences/")){let n=decodeURIComponent(e$1.replace("wisdom/preferences/","")),t=await e(s),o=a$1(t,n);return {handled:true,text:JSON.stringify({symbol:n,preferences:o.preferences,global:t.preferences?.global||{}},null,2)}}if(e$1==="wisdom/antipatterns"){let n=await e(s);return {handled:true,text:JSON.stringify({count:n.antipatterns.length,antipatterns:n.antipatterns},null,2)}}if(e$1.startsWith("wisdom/antipatterns/")){let n=decodeURIComponent(e$1.replace("wisdom/antipatterns/","")),t=await e(s),o=a$1(t,n);return {handled:true,text:JSON.stringify({symbol:n,count:o.antipatterns.length,antipatterns:o.antipatterns},null,2)}}if(e$1==="wisdom/decisions"){let n=await e(s);return {handled:true,text:JSON.stringify({count:n.decisions.length,decisions:n.decisions.map(t=>({id:t.id,title:t.title,status:t.status,date:t.date,symbols:t.symbols}))},null,2)}}if(e$1.startsWith("wisdom/decision/")){let n=e$1.replace("wisdom/decision/",""),t=await e(s),o=t.decisions.find(r=>r.id===n);return o?{handled:true,text:JSON.stringify(o,null,2)}:{handled:true,text:JSON.stringify({error:"Decision not found",id:n,available:t.decisions.map(r=>r.id)},null,2)}}if(e$1.startsWith("wisdom/expertise/")){let n=decodeURIComponent(e$1.replace("wisdom/expertise/","")),t=await e(s),o=b$1(t,{symbol:n});return {handled:true,text:JSON.stringify({symbol:n,count:o.length,experts:o.map(r=>({name:r.name,symbols:r.symbols,areas:r.areas,contact:r.contact}))},null,2)}}return {handled:false,text:""}}function G(){return [{uri:"paradigm://history/fragile",name:"History - Fragile Symbols",description:"Symbols with high fragility that need extra care when modifying",mimeType:"application/json"},{uri:"paradigm://history/validation/summary",name:"History - Validation Summary",description:"Overall validation statistics and pass rates",mimeType:"application/json"}]}async function $(e,s){if(e.startsWith("history/symbol/")&&!e.endsWith("/recent")){let n=decodeURIComponent(e.replace("history/symbol/","")),t=await f(s),o=c(t,n);return {handled:true,text:JSON.stringify({symbol:n,summary:o.summary?{total_changes:o.summary.total_changes,last_modified:o.summary.last_modified,stability_score:o.summary.stability_score,fragility:o.summary.fragility,contributors:o.summary.contributors}:null,recent:o.recent,co_changes:o.co_changes,validation:o.validation},null,2)}}if(e.startsWith("history/symbol/")&&e.endsWith("/recent")){let n=decodeURIComponent(e.replace("history/symbol/","").replace("/recent","")),t=await f(s),o=c(t,n);return {handled:true,text:JSON.stringify({symbol:n,fragility:o.summary?.fragility||"unknown",stability_score:o.summary?.stability_score,recent:o.recent.slice(0,5)},null,2)}}if(e==="history/fragile"){let n=await f(s);return {handled:true,text:JSON.stringify({count:n.index?.fragile_symbols?.length||0,fragile_symbols:n.index?.fragile_symbols||[],recommendation:"Consider adding extra test coverage and reviewing recent changes before modifying these symbols"},null,2)}}if(e.startsWith("history/cochanges/")){let n=decodeURIComponent(e.replace("history/cochanges/","")),o=(await f(s)).index?.co_changes?.filter(r=>r.symbols.includes(n))||[];return {handled:true,text:JSON.stringify({symbol:n,count:o.length,co_changes:o.map(r=>({with:r.symbols.filter(i=>i!==n),frequency:r.frequency,correlation:r.correlation})),recommendation:o.length>0?"These symbols often change together - consider if they need updates too":"No strong co-change patterns detected"},null,2)}}if(e==="history/validation/summary"){let n=await f(s);return {handled:true,text:JSON.stringify({last_run:n.validation?.last_run,total_validations:n.validation?.total_validations||0,pass_rate:n.validation?.pass_rate||0,by_symbol:n.validation?.by_symbol||{}},null,2)}}return {handled:false,text:""}}function q(){return [{uri:"paradigm://context/agent-protocol",name:"Agent Protocol",description:"IMPORTANT: Read this first. Workflow instructions for using Paradigm MCP tools effectively.",mimeType:"text/markdown"},{uri:"paradigm://context/session",name:"Session Info",description:"Current MCP session statistics and context usage estimate",mimeType:"application/json"},{uri:"paradigm://context/handoff-guide",name:"Handoff Guide",description:"When and how to perform context handoffs",mimeType:"text/markdown"}]}async function H(e,s){if(e==="context/agent-protocol")return {handled:true,text:`# Agent Protocol for Paradigm MCP Tools
2
+ import {d,g,h,e,a as a$1,b as b$1,f,c}from'./chunk-WN74JUZA.js';import'./chunk-4UJ4NIEQ.js';import'./chunk-4Q7XYPL4.js';import'./chunk-KLBH26PA.js';import'./chunk-JNSJVCTU.js';import'./chunk-Q2J542ST.js';import'./chunk-XROULIQN.js';import'./chunk-ZUAUFZRJ.js';import'./chunk-3KVVC4WV.js';import {m as m$1,n,p as p$1,h as h$1,i,ma}from'./chunk-FILLU77P.js';import'./chunk-M4UMM6DC.js';import'./chunk-ODVKPZZ4.js';import'./chunk-74SGKSRQ.js';import {j as j$1}from'./chunk-UPFCBVXY.js';import {b,a}from'./chunk-EK4ZRIFJ.js';import'./chunk-4SCKMGTB.js';import'./chunk-DVZWCXB6.js';import'./chunk-QGZRM6ZB.js';import'./chunk-VG7FN2TU.js';import'./chunk-5TAVYPOV.js';import {Server}from'@modelcontextprotocol/sdk/server/index.js';import {StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import {ListResourcesRequestSchema,ReadResourceRequestSchema}from'@modelcontextprotocol/sdk/types.js';import*as p from'fs';import*as m from'path';function se(e){return {id:e.id,symbol:`^${e.id}`,description:e.description,locks:e.locks?.map(s=>({id:s.id,description:s.description,keys:s.keys?.map(n=>n.expression||n),mode:s.mode||"all"})),prizes:e.prizes?.map(s=>({id:s.id,oneTime:s.oneTime}))}}function F(e){let s=e.gateConfig?.gates||[],n=i(e.index,"gate"),t=new Map;for(let o of n){let r=o.symbol.replace(/^\^/,"");t.set(r,{id:r,symbol:o.symbol,description:o.description,source:"purpose",filePath:o.filePath,data:o.data});}for(let o of s)t.set(o.id,{...se(o),source:"portal.yaml"});return Array.from(t.values())}function I(e){let s=e.gateConfig?.flows||[],n=i(e.index,"flow"),t=new Map;for(let o of n){let r=o.symbol.replace(/^\$/,"");t.set(r,{id:r,symbol:o.symbol,description:o.description,source:"purpose",filePath:o.filePath,data:o.data});}for(let o of s)t.set(o.id,{id:o.id,symbol:`$${o.id}`,description:o.description,gates:o.gates,source:"portal.yaml"});return Array.from(t.values())}function U(){return [{uri:"paradigm://wisdom/preferences",name:"Wisdom - Preferences",description:"Team preferences for patterns, testing, and code style",mimeType:"application/json"},{uri:"paradigm://wisdom/antipatterns",name:"Wisdom - Antipatterns",description:"What NOT to do, with reasons and alternatives",mimeType:"application/json"},{uri:"paradigm://wisdom/decisions",name:"Wisdom - Decisions",description:"Architectural Decision Records (ADRs) index",mimeType:"application/json"}]}async function z(e$1,s){if(e$1==="wisdom/preferences"){let n=await e(s);return {handled:true,text:JSON.stringify({version:n.preferences?.version||"1.0",global:n.preferences?.global||{},by_symbol:n.preferences?.by_symbol||{},symbol_count:Object.keys(n.preferences?.by_symbol||{}).length},null,2)}}if(e$1.startsWith("wisdom/preferences/")){let n=decodeURIComponent(e$1.replace("wisdom/preferences/","")),t=await e(s),o=a$1(t,n);return {handled:true,text:JSON.stringify({symbol:n,preferences:o.preferences,global:t.preferences?.global||{}},null,2)}}if(e$1==="wisdom/antipatterns"){let n=await e(s);return {handled:true,text:JSON.stringify({count:n.antipatterns.length,antipatterns:n.antipatterns},null,2)}}if(e$1.startsWith("wisdom/antipatterns/")){let n=decodeURIComponent(e$1.replace("wisdom/antipatterns/","")),t=await e(s),o=a$1(t,n);return {handled:true,text:JSON.stringify({symbol:n,count:o.antipatterns.length,antipatterns:o.antipatterns},null,2)}}if(e$1==="wisdom/decisions"){let n=await e(s);return {handled:true,text:JSON.stringify({count:n.decisions.length,decisions:n.decisions.map(t=>({id:t.id,title:t.title,status:t.status,date:t.date,symbols:t.symbols}))},null,2)}}if(e$1.startsWith("wisdom/decision/")){let n=e$1.replace("wisdom/decision/",""),t=await e(s),o=t.decisions.find(r=>r.id===n);return o?{handled:true,text:JSON.stringify(o,null,2)}:{handled:true,text:JSON.stringify({error:"Decision not found",id:n,available:t.decisions.map(r=>r.id)},null,2)}}if(e$1.startsWith("wisdom/expertise/")){let n=decodeURIComponent(e$1.replace("wisdom/expertise/","")),t=await e(s),o=b$1(t,{symbol:n});return {handled:true,text:JSON.stringify({symbol:n,count:o.length,experts:o.map(r=>({name:r.name,symbols:r.symbols,areas:r.areas,contact:r.contact}))},null,2)}}return {handled:false,text:""}}function G(){return [{uri:"paradigm://history/fragile",name:"History - Fragile Symbols",description:"Symbols with high fragility that need extra care when modifying",mimeType:"application/json"},{uri:"paradigm://history/validation/summary",name:"History - Validation Summary",description:"Overall validation statistics and pass rates",mimeType:"application/json"}]}async function $(e,s){if(e.startsWith("history/symbol/")&&!e.endsWith("/recent")){let n=decodeURIComponent(e.replace("history/symbol/","")),t=await f(s),o=c(t,n);return {handled:true,text:JSON.stringify({symbol:n,summary:o.summary?{total_changes:o.summary.total_changes,last_modified:o.summary.last_modified,stability_score:o.summary.stability_score,fragility:o.summary.fragility,contributors:o.summary.contributors}:null,recent:o.recent,co_changes:o.co_changes,validation:o.validation},null,2)}}if(e.startsWith("history/symbol/")&&e.endsWith("/recent")){let n=decodeURIComponent(e.replace("history/symbol/","").replace("/recent","")),t=await f(s),o=c(t,n);return {handled:true,text:JSON.stringify({symbol:n,fragility:o.summary?.fragility||"unknown",stability_score:o.summary?.stability_score,recent:o.recent.slice(0,5)},null,2)}}if(e==="history/fragile"){let n=await f(s);return {handled:true,text:JSON.stringify({count:n.index?.fragile_symbols?.length||0,fragile_symbols:n.index?.fragile_symbols||[],recommendation:"Consider adding extra test coverage and reviewing recent changes before modifying these symbols"},null,2)}}if(e.startsWith("history/cochanges/")){let n=decodeURIComponent(e.replace("history/cochanges/","")),o=(await f(s)).index?.co_changes?.filter(r=>r.symbols.includes(n))||[];return {handled:true,text:JSON.stringify({symbol:n,count:o.length,co_changes:o.map(r=>({with:r.symbols.filter(i=>i!==n),frequency:r.frequency,correlation:r.correlation})),recommendation:o.length>0?"These symbols often change together - consider if they need updates too":"No strong co-change patterns detected"},null,2)}}if(e==="history/validation/summary"){let n=await f(s);return {handled:true,text:JSON.stringify({last_run:n.validation?.last_run,total_validations:n.validation?.total_validations||0,pass_rate:n.validation?.pass_rate||0,by_symbol:n.validation?.by_symbol||{}},null,2)}}return {handled:false,text:""}}function q(){return [{uri:"paradigm://context/agent-protocol",name:"Agent Protocol",description:"IMPORTANT: Read this first. Workflow instructions for using Paradigm MCP tools effectively.",mimeType:"text/markdown"},{uri:"paradigm://context/session",name:"Session Info",description:"Current MCP session statistics and context usage estimate",mimeType:"application/json"},{uri:"paradigm://context/handoff-guide",name:"Handoff Guide",description:"When and how to perform context handoffs",mimeType:"text/markdown"}]}async function H(e,s){if(e==="context/agent-protocol")return {handled:true,text:`# Agent Protocol for Paradigm MCP Tools
3
3
 
4
4
  ## Query Before Modify
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export{h as registerTools}from'./chunk-CMCQHU46.js';import'./chunk-4UJ4NIEQ.js';import'./chunk-4Q7XYPL4.js';import'./chunk-KLBH26PA.js';import'./chunk-JNSJVCTU.js';import'./chunk-Q2J542ST.js';import'./chunk-XROULIQN.js';import'./chunk-ZUAUFZRJ.js';import'./chunk-3KVVC4WV.js';import'./chunk-FILLU77P.js';import'./chunk-M4UMM6DC.js';import'./chunk-ODVKPZZ4.js';import'./chunk-74SGKSRQ.js';import'./chunk-UPFCBVXY.js';import'./chunk-EK4ZRIFJ.js';import'./chunk-4SCKMGTB.js';import'./chunk-DVZWCXB6.js';import'./chunk-QGZRM6ZB.js';import'./chunk-VG7FN2TU.js';import'./chunk-5TAVYPOV.js';
2
+ export{h as registerTools}from'./chunk-WN74JUZA.js';import'./chunk-4UJ4NIEQ.js';import'./chunk-4Q7XYPL4.js';import'./chunk-KLBH26PA.js';import'./chunk-JNSJVCTU.js';import'./chunk-Q2J542ST.js';import'./chunk-XROULIQN.js';import'./chunk-ZUAUFZRJ.js';import'./chunk-3KVVC4WV.js';import'./chunk-FILLU77P.js';import'./chunk-M4UMM6DC.js';import'./chunk-ODVKPZZ4.js';import'./chunk-74SGKSRQ.js';import'./chunk-UPFCBVXY.js';import'./chunk-EK4ZRIFJ.js';import'./chunk-4SCKMGTB.js';import'./chunk-DVZWCXB6.js';import'./chunk-QGZRM6ZB.js';import'./chunk-VG7FN2TU.js';import'./chunk-5TAVYPOV.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a-company/paradigm",
3
- "version": "5.37.3",
3
+ "version": "5.37.4",
4
4
  "description": "Unified CLI for Paradigm developer tools",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",