@a-company/paradigm 5.23.0 → 5.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/{ambient-WEPHBAJD.js → ambient-HYZR42NX.js} +1 -1
  2. package/dist/chunk-73R63P7K.js +2 -0
  3. package/dist/{compliance-TSXLXADI.js → compliance-NLG7KB73.js} +2 -2
  4. package/dist/{docs-RXPN6CK7.js → docs-UIYXJ3O3.js} +1 -1
  5. package/dist/{habits-LX5IWCZM.js → habits-GICVMTJL.js} +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/mcp.js +22 -22
  8. package/dist/platform-server-FXYBBH6E.js +25 -0
  9. package/dist/{serve-JE6UF5P2.js → serve-5W6KOA4R.js} +1 -1
  10. package/dist/university-FJ7OCOA3.js +2 -0
  11. package/package.json +1 -1
  12. package/platform-ui/dist/assets/AmbientSection-BYjt75R1.js +1 -0
  13. package/platform-ui/dist/assets/{CanvasSection-DLW0s-Bu.js → CanvasSection-rKvA_vZj.js} +2 -2
  14. package/platform-ui/dist/assets/{DocsSection-BQ9Hi51g.js → DocsSection-CI9K73M-.js} +1 -1
  15. package/platform-ui/dist/assets/GitSection-DSGj_c6S.js +4 -0
  16. package/platform-ui/dist/assets/{GraphSection-0c9C-w7K.js → GraphSection-CawN7pC5.js} +2 -2
  17. package/platform-ui/dist/assets/LoreSection-oO5dCe6O.js +1 -0
  18. package/platform-ui/dist/assets/{SentinelSection-C4OoME9U.js → SentinelSection-DNgoYMH0.js} +1 -1
  19. package/platform-ui/dist/assets/SymphonySection-C0zfcqv3.js +1 -0
  20. package/platform-ui/dist/assets/TeamSection-Bzd3Dt9Q.js +1 -0
  21. package/platform-ui/dist/assets/UniversitySection-B3ltVfpt.css +1 -0
  22. package/platform-ui/dist/assets/UniversitySection-tBr62R0S.js +1 -0
  23. package/platform-ui/dist/assets/{index-DPpOdAtC.js → index-BaOmyn11.js} +12 -12
  24. package/platform-ui/dist/index.html +1 -1
  25. package/dist/chunk-RMOALQJN.js +0 -2
  26. package/dist/platform-server-2KXHGHFV.js +0 -25
  27. package/platform-ui/dist/assets/AmbientSection-DqQ2mfCO.js +0 -1
  28. package/platform-ui/dist/assets/GitSection-QQeUX6o3.js +0 -4
  29. package/platform-ui/dist/assets/LoreSection--t56kCj2.js +0 -1
  30. package/platform-ui/dist/assets/SymphonySection-B-rvsLxq.js +0 -1
  31. package/platform-ui/dist/assets/TeamSection-CBFmNEEo.js +0 -1
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import {b as b$2}from'./chunk-PUBB7LIT.js';import {f as f$1,n,g,h}from'./chunk-2QO33NYK.js';import {c,b as b$1,d,a}from'./chunk-5TAVYPOV.js';import*as f from'fs';import*as b from'path';import*as P from'js-yaml';import*as Q from'os';var vt={};c(vt,{getJournalStats:()=>ne,loadAllJournalEntries:()=>ee,loadJournalEntries:()=>O,loadJournalEntry:()=>te,recordJournalEntry:()=>z});function G(n){let t=process.env.HOME||process.env.USERPROFILE||"";return b.join(t,".paradigm","agents",n,"journal")}function Zt(){let n=new Date,t=n.toISOString().slice(0,10),e=n.toISOString().slice(11,19).replace(/:/g,""),o=String(Math.floor(Math.random()*999)+1).padStart(3,"0");return `LJ-${t}-${e}-${o}`}function z(n,t){let e=new Date,o=Zt(),i={id:o,agent:n,timestamp:e.toISOString(),...t},r=G(n);f.mkdirSync(r,{recursive:true});let s=b.join(r,`${o}.yaml`);return f.writeFileSync(s,P.dump(i,{lineWidth:120,noRefs:true}),"utf8"),i}function O(n,t){let e=G(n);if(!f.existsSync(e))return [];let o=[],i=f.readdirSync(e).filter(s=>s.endsWith(".yaml"));for(let s of i)try{let a=f.readFileSync(b.join(e,s),"utf8"),c=P.load(a);c&&c.id&&o.push(c);}catch{}let r=o;return t?.trigger&&(r=r.filter(s=>s.trigger===t.trigger)),t?.project&&(r=r.filter(s=>s.project===t.project)),t?.transferable!==void 0&&(r=r.filter(s=>s.transferable===t.transferable)),t?.tag&&(r=r.filter(s=>s.tags?.some(a=>a.startsWith(t.tag)))),t?.dateFrom&&(r=r.filter(s=>s.timestamp>=t.dateFrom)),t?.dateTo&&(r=r.filter(s=>s.timestamp<=t.dateTo)),r.sort((s,a)=>a.timestamp.localeCompare(s.timestamp)),t?.limit&&(r=r.slice(0,t.limit)),r}function te(n,t){let e=G(n),o=b.join(e,`${t}.yaml`);if(!f.existsSync(o))return null;let i=f.readFileSync(o,"utf8");return P.load(i)}function ee(n){let t=process.env.HOME||process.env.USERPROFILE||"",e=b.join(t,".paradigm","agents");if(!f.existsSync(e))return [];let o=[],i=f.readdirSync(e,{withFileTypes:true}).filter(r=>r.isDirectory());for(let r of i){if(n?.agent&&r.name!==n.agent)continue;let s=O(r.name,n);o.push(...s);}return o.sort((r,s)=>s.timestamp.localeCompare(r.timestamp)),n?.limit?o.slice(0,n.limit):o}function ne(n){let t=O(n),e={},o={},i=0;for(let r of t)e[r.trigger]=(e[r.trigger]||0)+1,o[r.project]=(o[r.project]||0)+1,r.transferable&&i++;return {total:t.length,byTrigger:e,byProject:o,transferableCount:i,recentInsights:t.slice(0,5).map(r=>({id:r.id,trigger:r.trigger,insight:r.insight.slice(0,200),timestamp:r.timestamp}))}}var K=b$1(()=>{});var Dt={};c(Dt,{addNotebookEntry:()=>xt,incrementApplied:()=>se,loadNotebookEntries:()=>Et,promoteFromLore:()=>ie,searchNotebooks:()=>re});function Et(n,t,e){let o=new Map,i=b.join(V,n);jt(i,o);let r=b.join(t,Y,n);jt(r,o);let s=Array.from(o.values());if(e?.concepts&&e.concepts.length>0){let a=new Set(e.concepts.map(c=>c.toLowerCase()));s=s.filter(c=>c.concepts.some(d=>a.has(d.toLowerCase())));}if(e?.tags&&e.tags.length>0){let a=new Set(e.tags.map(c=>c.toLowerCase()));s=s.filter(c=>c.tags.some(d=>a.has(d.toLowerCase())));}return s.sort((a,c)=>c.appliedCount-a.appliedCount)}function jt(n,t){if(f.existsSync(n))try{let e=f.readdirSync(n).filter(o=>o.startsWith(oe)&&o.endsWith(X));for(let o of e)try{let i=f.readFileSync(b.join(n,o),"utf-8"),r=P.load(i);r?.id&&t.set(r.id,r);}catch{}}catch{}}function re(n,t,e){let o=Et(n,e),i=t.toLowerCase();return o.filter(r=>r.context.toLowerCase().includes(i)||r.snippet.toLowerCase().includes(i)||r.concepts.some(s=>s.toLowerCase().includes(i))||r.tags.some(s=>s.toLowerCase().includes(i)))}function xt(n,t,e,o){let i=new Date().toISOString(),r=(t.concepts[0]||"entry").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),s=Date.now().toString(36),a=`nb-${r}-${s}`,c={...t,id:a,appliedCount:0,created:i,updated:i},d=e==="global"?b.join(V,n):b.join(o||process.cwd(),Y,n);f.existsSync(d)||f.mkdirSync(d,{recursive:true});let u=`${a}${X}`,l=b.join(d,u),m=P.dump(c,{lineWidth:120,noRefs:true,sortKeys:false});return f.writeFileSync(l,m,"utf-8"),{entry:c,filePath:l}}async function ie(n,t,e,o="global"){let{loadLoreEntry:i}=await import('./lore-loader-XY5MZRR2.js'),r=await i(e,t);if(!r)return null;let s=[];if(r.symbols_touched)for(let d of r.symbols_touched){let u=d.replace(/^[#$^!~]/,"").toLowerCase();s.push(u);}let a=r.summary||"";r.body&&(a+=`
2
+ import {f as f$1,n,g,h}from'./chunk-2QO33NYK.js';import {b as b$2}from'./chunk-PUBB7LIT.js';import {c,b as b$1,d,a}from'./chunk-5TAVYPOV.js';import*as f from'fs';import*as b from'path';import*as P from'js-yaml';import*as Q from'os';var vt={};c(vt,{getJournalStats:()=>ne,loadAllJournalEntries:()=>ee,loadJournalEntries:()=>O,loadJournalEntry:()=>te,recordJournalEntry:()=>z});function G(n){let t=process.env.HOME||process.env.USERPROFILE||"";return b.join(t,".paradigm","agents",n,"journal")}function Zt(){let n=new Date,t=n.toISOString().slice(0,10),e=n.toISOString().slice(11,19).replace(/:/g,""),o=String(Math.floor(Math.random()*999)+1).padStart(3,"0");return `LJ-${t}-${e}-${o}`}function z(n,t){let e=new Date,o=Zt(),i={id:o,agent:n,timestamp:e.toISOString(),...t},r=G(n);f.mkdirSync(r,{recursive:true});let s=b.join(r,`${o}.yaml`);return f.writeFileSync(s,P.dump(i,{lineWidth:120,noRefs:true}),"utf8"),i}function O(n,t){let e=G(n);if(!f.existsSync(e))return [];let o=[],i=f.readdirSync(e).filter(s=>s.endsWith(".yaml"));for(let s of i)try{let a=f.readFileSync(b.join(e,s),"utf8"),c=P.load(a);c&&c.id&&o.push(c);}catch{}let r=o;return t?.trigger&&(r=r.filter(s=>s.trigger===t.trigger)),t?.project&&(r=r.filter(s=>s.project===t.project)),t?.transferable!==void 0&&(r=r.filter(s=>s.transferable===t.transferable)),t?.tag&&(r=r.filter(s=>s.tags?.some(a=>a.startsWith(t.tag)))),t?.dateFrom&&(r=r.filter(s=>s.timestamp>=t.dateFrom)),t?.dateTo&&(r=r.filter(s=>s.timestamp<=t.dateTo)),r.sort((s,a)=>a.timestamp.localeCompare(s.timestamp)),t?.limit&&(r=r.slice(0,t.limit)),r}function te(n,t){let e=G(n),o=b.join(e,`${t}.yaml`);if(!f.existsSync(o))return null;let i=f.readFileSync(o,"utf8");return P.load(i)}function ee(n){let t=process.env.HOME||process.env.USERPROFILE||"",e=b.join(t,".paradigm","agents");if(!f.existsSync(e))return [];let o=[],i=f.readdirSync(e,{withFileTypes:true}).filter(r=>r.isDirectory());for(let r of i){if(n?.agent&&r.name!==n.agent)continue;let s=O(r.name,n);o.push(...s);}return o.sort((r,s)=>s.timestamp.localeCompare(r.timestamp)),n?.limit?o.slice(0,n.limit):o}function ne(n){let t=O(n),e={},o={},i=0;for(let r of t)e[r.trigger]=(e[r.trigger]||0)+1,o[r.project]=(o[r.project]||0)+1,r.transferable&&i++;return {total:t.length,byTrigger:e,byProject:o,transferableCount:i,recentInsights:t.slice(0,5).map(r=>({id:r.id,trigger:r.trigger,insight:r.insight.slice(0,200),timestamp:r.timestamp}))}}var K=b$1(()=>{});var Dt={};c(Dt,{addNotebookEntry:()=>xt,incrementApplied:()=>se,loadNotebookEntries:()=>Et,promoteFromLore:()=>ie,searchNotebooks:()=>re});function Et(n,t,e){let o=new Map,i=b.join(V,n);jt(i,o);let r=b.join(t,Y,n);jt(r,o);let s=Array.from(o.values());if(e?.concepts&&e.concepts.length>0){let a=new Set(e.concepts.map(c=>c.toLowerCase()));s=s.filter(c=>c.concepts.some(d=>a.has(d.toLowerCase())));}if(e?.tags&&e.tags.length>0){let a=new Set(e.tags.map(c=>c.toLowerCase()));s=s.filter(c=>c.tags.some(d=>a.has(d.toLowerCase())));}return s.sort((a,c)=>c.appliedCount-a.appliedCount)}function jt(n,t){if(f.existsSync(n))try{let e=f.readdirSync(n).filter(o=>o.startsWith(oe)&&o.endsWith(X));for(let o of e)try{let i=f.readFileSync(b.join(n,o),"utf-8"),r=P.load(i);r?.id&&t.set(r.id,r);}catch{}}catch{}}function re(n,t,e){let o=Et(n,e),i=t.toLowerCase();return o.filter(r=>r.context.toLowerCase().includes(i)||r.snippet.toLowerCase().includes(i)||r.concepts.some(s=>s.toLowerCase().includes(i))||r.tags.some(s=>s.toLowerCase().includes(i)))}function xt(n,t,e,o){let i=new Date().toISOString(),r=(t.concepts[0]||"entry").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),s=Date.now().toString(36),a=`nb-${r}-${s}`,c={...t,id:a,appliedCount:0,created:i,updated:i},d=e==="global"?b.join(V,n):b.join(o||process.cwd(),Y,n);f.existsSync(d)||f.mkdirSync(d,{recursive:true});let u=`${a}${X}`,l=b.join(d,u),m=P.dump(c,{lineWidth:120,noRefs:true,sortKeys:false});return f.writeFileSync(l,m,"utf-8"),{entry:c,filePath:l}}async function ie(n,t,e,o="global"){let{loadLoreEntry:i}=await import('./lore-loader-XY5MZRR2.js'),r=await i(e,t);if(!r)return null;let s=[];if(r.symbols_touched)for(let d of r.symbols_touched){let u=d.replace(/^[#$^!~]/,"").toLowerCase();s.push(u);}let a=r.summary||"";r.body&&(a+=`
3
3
 
4
4
  `+r.body);let c={source:"lore",loreEntryId:t,originProject:b.basename(e),createdBy:n};return xt(n,{context:r.title||`Promoted from ${t}`,snippet:a,provenance:c,confidence:r.confidence??.7,concepts:s,tags:r.tags||[]},o,e)}function se(n,t,e){let o=b.join(e,Y,n),i=b.join(V,n);for(let r of [o,i]){let s=b.join(r,`${t}${X}`);if(f.existsSync(s))try{let a=f.readFileSync(s,"utf-8"),c=P.load(a);if(c)return c.appliedCount=(c.appliedCount||0)+1,c.updated=new Date().toISOString(),f.writeFileSync(s,P.dump(c,{lineWidth:120,noRefs:!0,sortKeys:!1}),"utf-8"),!0}catch{}}return false}var V,Y,oe,X,Rt=b$1(()=>{V=b.join(Q.homedir(),".paradigm","notebooks"),Y=".paradigm/notebooks",oe="nb-",X=".yaml";});var ft=".paradigm/events",zt="stream.jsonl",I=1e3,N=[];function gt(n){return b.join(n,ft,zt)}function Kt(){let n=Date.now(),t=Math.floor(Math.random()*9999).toString().padStart(4,"0");return `ev-${n}-${t}`}function J(n,t){let e={id:Kt(),timestamp:new Date().toISOString(),...t};N.push(e),N.length>I&&(N=N.slice(-I));try{let o=b.join(n,ft);f.mkdirSync(o,{recursive:!0});let i=gt(n);f.appendFileSync(i,JSON.stringify(e)+`
5
5
  `,"utf8"),Vt(i);}catch{}return e}function Vt(n){try{if(f.statSync(n).size>512*1024){let o=f.readFileSync(n,"utf8").trim().split(`
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import {b as b$1,c as c$1,d}from'./chunk-5TAVYPOV.js';import*as c from'fs';import*as l from'path';import*as y from'js-yaml';var g,R=b$1(()=>{g={enabled:true,thresholds:{minComplianceRate:90,minEvents:20,timeWindowDays:30,minConsecutiveSessions:5,recencyDays:7},demotion:{failureThreshold:3,failureWindowDays:7,cooldownDays:14},neverGraduate:["explore-before-implement","ripple-before-modify","check-fragility","wisdom-before-implement","confidence-on-decisions","university-onboarded","university-content-valid"]};});var M={};c$1(M,{getAllStates:()=>ie,getConfig:()=>te,getState:()=>G,incrementFailure:()=>se,invalidateGraduationCache:()=>ae,isGraduated:()=>oe,loadGraduation:()=>p,markNeverGraduate:()=>ne,saveGraduation:()=>H,setTier:()=>re});function A(e){return l.join(e,".paradigm","graduation.yaml")}function p(e){let t=l.resolve(e);if(m&&b===t&&Date.now()-v<ee)return m;let o=A(t),i;if(c.existsSync(o))try{let r=c.readFileSync(o,"utf8");i=y.load(r);}catch{i={version:"1.0",config:{},states:{}};}else i={version:"1.0",config:{},states:{}};return i.version||(i.version="1.0"),i.config||(i.config={}),i.states||(i.states={}),m=i,b=t,v=Date.now(),i}function H(e,t){let o=l.resolve(e),i=A(o),r=l.dirname(i);c.existsSync(r)||c.mkdirSync(r,{recursive:true});let n=y.dump(t,{lineWidth:120,noRefs:true,sortKeys:true});c.writeFileSync(i,n,"utf8"),m=t,b=o,v=Date.now();}function te(e){let t=p(e);return {...g,...t.config,thresholds:{...g.thresholds,...t.config?.thresholds},demotion:{...g.demotion,...t.config?.demotion},neverGraduate:t.config?.neverGraduate??g.neverGraduate}}function w(e){return {habitId:e,tier:"habit",previousTier:null,graduatedAt:null,demotedAt:null,complianceAtGraduation:0,hookScript:null,failureCount:0,cooldownUntil:null,neverGraduate:false}}function G(e,t){let i=p(e).states[t];return i?{...w(t),...i,habitId:t}:w(t)}function ie(e){let t=p(e),o={};for(let[i,r]of Object.entries(t.states))o[i]={...w(i),...r,habitId:i};return o}function oe(e,t){return G(e,t).tier==="hook"}function re(e,t,o,i){let r=p(e),n=r.states[t]||{};r.states[t]={...n,tier:o,previousTier:n.tier||"habit",...o==="hook"?{graduatedAt:new Date().toISOString(),failureCount:0}:{},...o==="habit"&&n.tier==="hook"?{demotedAt:new Date().toISOString()}:{},...i},H(e,r);}function ne(e,t){let o=p(e);o.states[t]||(o.states[t]={}),o.states[t].neverGraduate=true,o.states[t].tier="habit",H(e,o);}function se(e,t){let o=p(e);o.states[t]||(o.states[t]={});let i=(o.states[t].failureCount||0)+1;return o.states[t].failureCount=i,H(e,o),i}function ae(){m=null,b=null,v=0;}var m,b,v,ee,j=b$1(()=>{R();m=null,b=null,v=0,ee=3e4;});var E=[{id:"explore-before-implement",name:"Explore Before Implementing",description:"Call ripple/navigate/search before modifying existing symbols to understand impact",category:"discovery",trigger:"preflight",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_ripple","paradigm_navigate","paradigm_search","paradigm_related"]}},enabled:true},{id:"ripple-before-modify",name:"Ripple Before Modifying",description:"Run ripple analysis before modifying symbols with dependents",category:"discovery",trigger:"preflight",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_ripple"]}},enabled:true},{id:"check-fragility",name:"Check Fragility",description:"Check history fragility for symbols before modifying frequently-broken code",category:"discovery",trigger:"preflight",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_history_fragility"]}},enabled:true},{id:"wisdom-before-implement",name:"Check Team Wisdom",description:"Check team wisdom (preferences, antipatterns, decisions) before implementing",category:"collaboration",trigger:"preflight",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_wisdom_context","paradigm_wisdom_expert"]}},enabled:true},{id:"verify-before-done",name:"Verify Before Done",description:"Run postflight compliance checks before finishing a session",category:"verification",trigger:"on-stop",severity:"warn",check:{type:"tool-called",params:{tools:["paradigm_pm_postflight"]}},enabled:true},{id:"postflight-compliance",name:"Postflight Compliance",description:"Ensure postflight checks pass without errors before finishing",category:"verification",trigger:"on-stop",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_pm_postflight","paradigm_reindex"]}},enabled:true},{id:"test-new-components",name:"Test New Components",description:"New components should have associated tests or test plan documented",category:"testing",trigger:"postflight",severity:"advisory",check:{type:"tests-exist",params:{patterns:["**/*.test.*","**/*.spec.*","**/tests/**"]}},enabled:true},{id:"purpose-coverage",name:"Purpose File Coverage",description:"All modified source directories should have .purpose file coverage",category:"documentation",trigger:"postflight",severity:"warn",check:{type:"file-exists",params:{patterns:["**/.purpose"]}},enabled:true},{id:"record-lore-for-significant",name:"Record Lore for Significant Changes",description:"Sessions modifying 3+ files should record a lore entry",category:"documentation",trigger:"on-stop",severity:"warn",check:{type:"lore-recorded",params:{}},enabled:true},{id:"gates-for-routes",name:"Gates for Routes",description:"API routes should have corresponding gate declarations in portal.yaml",category:"security",trigger:"postflight",severity:"warn",check:{type:"gates-declared",params:{requireRoutes:true}},enabled:true},{id:"commit-message-symbols",name:"Commit Message Format",description:"Commit messages should follow type(#symbol): format and include a Symbols: trailer",category:"documentation",trigger:"on-commit",severity:"advisory",check:{type:"commit-message-format",params:{messagePatterns:["^(feat|fix|refactor|chore|docs|test|style|perf|ci|build)\\(","Symbols:"]}},enabled:true},{id:"flow-coverage-for-multi-component",name:"Flow Coverage",description:"Changes spanning 3+ components should have a documented $flow",category:"documentation",trigger:"postflight",severity:"advisory",check:{type:"flow-coverage",params:{minSteps:3}},enabled:true},{id:"context-session-awareness",name:"Context Awareness",description:"Use session recovery or context check tools for session continuity",category:"discovery",trigger:"preflight",severity:"advisory",check:{type:"context-checked",params:{contextTools:["paradigm_context_check","paradigm_session_recover","paradigm_session_checkpoint"]}},enabled:true},{id:"aspect-anchors-valid",name:"Aspect Anchors Valid",description:"Aspects touched during the session should have their code anchors validated",category:"verification",trigger:"postflight",severity:"advisory",check:{type:"aspect-anchored",params:{checkAnchors:true}},enabled:true}];var V=E,Y=30*1e3;function K(e){try{let t=l.join(e,".paradigm","config.yaml");if(c.existsSync(t)){let o=c.readFileSync(t,"utf8"),r=y.load(o)?.limits;if(r?.habitsCacheTtlMs&&typeof r.habitsCacheTtlMs=="number")return r.habitsCacheTtlMs}}catch{}return Y}var k=new Map;function z(e){let t=l.resolve(e),o=k.get(t),i=K(t);if(o&&Date.now()-o.loadedAt<i)return o.habits;let r=Q(t);return k.set(t,{habits:r,loadedAt:Date.now()}),r}function Q(e){let t=new Map;for(let s of V)t.set(s.id,{...s});let o=process.env.HOME||process.env.USERPROFILE||"~",i=S(l.join(o,".paradigm","habits.yaml"));i&&D(t,i);let r=T(l.join(o,".paradigm","habits"));for(let s of r)t.set(s.id,s);let n=S(l.join(e,".paradigm","habits.yaml"));n&&D(t,n);let u=T(l.join(e,".paradigm","habits"));for(let s of u)t.set(s.id,s);return Array.from(t.values())}function T(e){if(!c.existsSync(e))return [];try{let t=c.readdirSync(e).filter(i=>i.endsWith(".habit")).sort(),o=[];for(let i of t)try{let r=c.readFileSync(l.join(e,i),"utf8"),n=y.load(r);n?.id&&n?.name&&o.push(n);}catch{}return o}catch{return []}}function S(e){if(!c.existsSync(e))return null;try{let t=c.readFileSync(e,"utf8");return y.load(t)}catch{return null}}function D(e,t){if(t.habits)for(let o of t.habits)e.set(o.id,{...o});if(t.overrides)for(let[o,i]of Object.entries(t.overrides)){let r=e.get(o);r&&J(r,i);}}function J(e,t){t.severity!==void 0&&(e.severity=t.severity),t.enabled!==void 0&&(e.enabled=t.enabled);}function X(e){return e.filter(t=>t.enabled)}function Z(e){let t=l.resolve(e);k.delete(t);}var le=[{id:"explore-before-implement",name:"Explore Before Implementing",description:"Call ripple/navigate/search before modifying existing symbols to understand impact",category:"discovery",trigger:"preflight",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_ripple","paradigm_navigate","paradigm_search","paradigm_related"]}},enabled:true},{id:"ripple-before-modify",name:"Ripple Before Modifying",description:"Run ripple analysis before modifying symbols with dependents",category:"discovery",trigger:"preflight",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_ripple"]}},enabled:true},{id:"check-fragility",name:"Check Fragility",description:"Check history fragility for symbols before modifying frequently-broken code",category:"discovery",trigger:"preflight",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_history_fragility"]}},enabled:true},{id:"wisdom-before-implement",name:"Check Team Wisdom",description:"Check team wisdom (preferences, antipatterns, decisions) before implementing",category:"collaboration",trigger:"preflight",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_wisdom_context","paradigm_wisdom_expert"]}},enabled:true},{id:"verify-before-done",name:"Verify Before Done",description:"Run postflight compliance checks before finishing a session",category:"verification",trigger:"on-stop",severity:"warn",check:{type:"tool-called",params:{tools:["paradigm_pm_postflight"]}},enabled:true},{id:"postflight-compliance",name:"Postflight Compliance",description:"Ensure postflight checks pass without errors before finishing",category:"verification",trigger:"on-stop",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_pm_postflight","paradigm_reindex"]}},enabled:true},{id:"test-new-components",name:"Test New Components",description:"New components should have associated tests or test plan documented",category:"testing",trigger:"postflight",severity:"advisory",check:{type:"tests-exist",params:{patterns:["**/*.test.*","**/*.spec.*","**/tests/**"]}},enabled:true},{id:"purpose-coverage",name:"Purpose File Coverage",description:"All modified source directories should have .purpose file coverage",category:"documentation",trigger:"postflight",severity:"warn",check:{type:"file-exists",params:{patterns:["**/.purpose"]}},enabled:true},{id:"record-lore-for-significant",name:"Record Lore for Significant Changes",description:"Sessions modifying 3+ files should record a lore entry",category:"documentation",trigger:"on-stop",severity:"warn",check:{type:"lore-recorded",params:{}},enabled:true},{id:"confidence-on-decisions",name:"Confidence on Decisions",description:"When recording lore, include a confidence score (0.0-1.0) to enable calibration tracking over time",category:"documentation",trigger:"on-stop",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_lore_record"]}},enabled:true},{id:"gates-for-routes",name:"Gates for Routes",description:"API routes should have corresponding gate declarations in portal.yaml",category:"security",trigger:"postflight",severity:"warn",check:{type:"gates-declared",params:{requireRoutes:true}},enabled:true},{id:"university-content-valid",name:"University Content Valid",description:"Validate university content integrity when files in symbol-covered areas change",category:"quality",trigger:"on-stop",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_university_validate"]}},enabled:true},{id:"university-onboarded",name:"University Onboarding",description:"Call paradigm_university_onboard at session start for project-specific learning content",category:"discovery",trigger:"preflight",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_university_onboard"]}},enabled:false},{id:"orchestration-required",name:"Orchestrate Complex Tasks",description:"Tasks affecting 3+ files or touching security symbols should use paradigm_orchestrate_inline to determine which agents are needed. Ensures security review, test coverage, and documentation.",category:"collaboration",trigger:"preflight",severity:"warn",check:{type:"tool-called",params:{tools:["paradigm_orchestrate_inline"]}},enabled:true},{id:"agent-coverage-validated",name:"Validate Agent Involvement",description:"After completing work, verify that agents with relevant expertise were consulted. Check nominations that were surfaced but not acted on.",category:"collaboration",trigger:"postflight",severity:"advisory",check:{type:"tool-called",params:{tools:["paradigm_ambient_nominations","paradigm_agent_list"]}},enabled:true},{id:"hot-mode-incident",name:"Incident Response Acknowledgment",description:"During incident response, orchestration enforcement is waived. But a post-incident lore entry is required and a postflight review should be scheduled.",category:"collaboration",trigger:"on-stop",severity:"advisory",check:{type:"lore-recorded"},enabled:true}];function ce(e,t){return e.filter(o=>o.enabled&&o.trigger===t)}new Set(le.map(e=>e.id));function F(e,t,o,i,r){let n=ce(e,t);i&&(n=n.filter(a=>!a.platforms||a.platforms.includes(i)));let u=0;if(r)try{let{isGraduated:a}=(j(),d(M)),O=n.length;n=n.filter(q=>!a(r,q.id)),u=O-n.length;}catch{}let s=n.map(a=>ue(a,o)),W=s.filter(a=>a.result==="followed").length,I=s.filter(a=>a.result==="skipped").length,N=s.filter(a=>a.result==="partial").length,_=s.filter(a=>a.result==="skipped"&&a.habit.severity==="block").length;return {trigger:t,evaluations:s,summary:{total:s.length,followed:W,skipped:I,partial:N,blockingViolations:_},blocksCompletion:_>0}}function $(e){return {toolsCalled:e.toolsCalled||[],filesModified:e.filesModified||[],symbolsTouched:e.symbolsTouched||[],loreRecorded:e.loreRecorded||false,hasPortalRoutes:e.hasPortalRoutes||false,taskAddsRoutes:e.taskAddsRoutes||false,taskDescription:e.taskDescription,gitClean:e.gitClean}}function ue(e,t){switch(e.check.type){case "tool-called":return fe(e,t);case "file-exists":return pe(e,t);case "file-modified":return be(e,t);case "lore-recorded":return ge(e,t);case "symbols-registered":return me(e,t);case "gates-declared":return he(e,t);case "tests-exist":return ye(e,t);case "git-clean":return ve(e,t);case "commit-message-format":return Ce(e,t);case "flow-coverage":return He(e,t);case "context-checked":return ke(e,t);case "aspect-anchored":return we(e,t);default:return {habit:e,result:"partial",reason:`Unknown check: ${e.check.type}`}}}function fe(e,t){let o=e.check.params.tools||[];if(o.length===0)return {habit:e,result:"followed",reason:"No tools required"};let i=o.filter(r=>t.toolsCalled.includes(r));return i.length>0?{habit:e,result:"followed",reason:`Called: ${i.join(", ")}`,evidence:i}:t.filesModified.length===0&&t.symbolsTouched.length===0?{habit:e,result:"followed",reason:"No modifications, habit not applicable"}:{habit:e,result:"skipped",reason:`None of [${o.join(", ")}] were called before modifying code`}}function pe(e,t){if(t.filesModified.length===0)return {habit:e,result:"followed",reason:"No files modified"};if(t.filesModified.some(r=>r.endsWith(".purpose")||r.includes(".paradigm/")))return {habit:e,result:"followed",reason:"Purpose files updated"};let i=t.filesModified.filter(r=>!r.endsWith(".md")&&!r.endsWith(".json")&&!r.endsWith(".yaml")&&!r.endsWith(".yml")&&!r.endsWith(".lock")&&!r.endsWith(".purpose")&&!r.includes(".paradigm/"));return i.length===0?{habit:e,result:"followed",reason:"Only non-source files modified"}:{habit:e,result:"skipped",reason:`${i.length} source file(s) without .purpose updates`,evidence:i.slice(0,5)}}function ge(e,t){let o=t.filesModified.filter(i=>!i.endsWith(".md")&&!i.endsWith(".json")&&!i.endsWith(".yaml")&&!i.endsWith(".yml")&&!i.endsWith(".lock")&&!i.endsWith(".purpose")&&!i.includes(".paradigm/"));return o.length<3?{habit:e,result:"followed",reason:"Session not significant (< 3 source files)"}:t.loreRecorded||t.toolsCalled.includes("paradigm_lore_record")?{habit:e,result:"followed",reason:"Lore recorded"}:{habit:e,result:"skipped",reason:`${o.length} source files modified, no lore entry`,evidence:o.slice(0,5)}}function me(e,t){if(t.symbolsTouched.length===0)return {habit:e,result:"followed",reason:"No symbols touched"};let i=["paradigm_purpose_add_component","paradigm_purpose_add_signal","paradigm_purpose_add_flow","paradigm_purpose_add_gate","paradigm_purpose_add_aspect","paradigm_purpose_init"].filter(r=>t.toolsCalled.includes(r));return i.length>0?{habit:e,result:"followed",reason:`Purpose tools called: ${i.join(", ")}`,evidence:i}:{habit:e,result:"partial",reason:`${t.symbolsTouched.length} symbol(s) touched, no purpose registration`}}function he(e,t){if(!t.taskAddsRoutes)return {habit:e,result:"followed",reason:"No routes added"};if(t.hasPortalRoutes)return {habit:e,result:"followed",reason:"Portal.yaml has routes"};let i=["paradigm_gates_for_route","paradigm_portal_add_route","paradigm_portal_add_gate"].filter(r=>t.toolsCalled.includes(r));return i.length>0?{habit:e,result:"followed",reason:`Gate tools called: ${i.join(", ")}`,evidence:i}:{habit:e,result:"skipped",reason:"Routes added without gate declarations"}}function ye(e,t){if(t.filesModified.length===0)return {habit:e,result:"followed",reason:"No files modified"};let o=t.filesModified.filter(r=>r.includes(".test.")||r.includes(".spec.")||r.includes("/tests/")||r.includes("/test/")||r.includes("__tests__"));if(o.length>0)return {habit:e,result:"followed",reason:`Test files: ${o.length}`,evidence:o.slice(0,5)};let i=t.filesModified.filter(r=>!r.endsWith(".md")&&!r.endsWith(".json")&&!r.endsWith(".yaml")&&!r.endsWith(".lock")&&!r.endsWith(".purpose")&&!r.includes(".paradigm/")&&!r.includes("node_modules/"));return i.length===0?{habit:e,result:"followed",reason:"No source files to test"}:{habit:e,result:"partial",reason:`${i.length} source file(s), no test files updated`,evidence:i.slice(0,5)}}function be(e,t){if(t.filesModified.length===0)return {habit:e,result:"followed",reason:"No files modified"};let o=e.check.params.patterns||[];if(o.length===0)return {habit:e,result:"followed",reason:"No patterns specified"};if(e.trigger==="on-stop"&&e.severity==="block"){let r=t.filesModified.filter(n=>o.some(u=>n.includes(u)||l.basename(n)===u));return r.length>0?{habit:e,result:"followed",reason:`Matching files: ${r.join(", ")}`,evidence:r}:{habit:e,result:"partial",reason:`None of [${o.join(", ")}] in git diff yet (may not be committed). Use on-commit trigger for reliable check.`}}let i=t.filesModified.filter(r=>o.some(n=>r.includes(n)||l.basename(r)===n));return i.length>0?{habit:e,result:"followed",reason:`Matching files: ${i.join(", ")}`,evidence:i}:{habit:e,result:"skipped",reason:`None of [${o.join(", ")}] found in modified files`}}function ve(e,t){return t.filesModified.length===0?{habit:e,result:"followed",reason:"No files modified"}:e.trigger==="on-stop"?{habit:e,result:"followed",reason:"git-clean skipped on-stop (uncommitted changes expected before commit)"}:t.gitClean===void 0?{habit:e,result:"partial",reason:"Git status not available"}:t.gitClean?{habit:e,result:"followed",reason:"Working tree is clean \u2014 changes committed"}:{habit:e,result:"skipped",reason:"Uncommitted changes in working tree"}}function Ce(e,t){if(!t.commitMessage)return {habit:e,result:"followed",reason:"No commit message to check (not a commit trigger)"};let o=e.check.params.messagePatterns||["^(feat|fix|refactor|chore|docs|test|style|perf|ci|build)\\(","Symbols:"],i=o.filter(r=>new RegExp(r,"m").test(t.commitMessage));if(i.length===o.length)return {habit:e,result:"followed",reason:"Commit message matches all required patterns",evidence:i};if(i.length>0){let r=o.filter(n=>!new RegExp(n,"m").test(t.commitMessage));return {habit:e,result:"partial",reason:`Matches ${i.length}/${o.length} patterns. Missing: ${r.join(", ")}`}}return {habit:e,result:"skipped",reason:"Commit message does not match required format patterns"}}function He(e,t){let o=t.symbolsTouched.filter(n=>n.startsWith("#"));if(o.length<3)return {habit:e,result:"followed",reason:"Fewer than 3 components touched \u2014 flow not required"};if(t.hasFlowCoverage)return {habit:e,result:"followed",reason:"Flow coverage exists for multi-component changes"};let r=["paradigm_flow_validate","paradigm_flows_affected","paradigm_purpose_add_flow"].filter(n=>t.toolsCalled.includes(n));return r.length>0?{habit:e,result:"followed",reason:`Flow tools called: ${r.join(", ")}`,evidence:r}:{habit:e,result:"skipped",reason:`${o.length} components touched without flow coverage`,evidence:o.slice(0,5)}}function ke(e,t){let i=(e.check.params.contextTools||["paradigm_context_check","paradigm_session_recover","paradigm_session_checkpoint"]).filter(r=>t.toolsCalled.includes(r));return i.length>0?{habit:e,result:"followed",reason:`Context tools called: ${i.join(", ")}`,evidence:i}:t.filesModified.length===0&&t.symbolsTouched.length===0?{habit:e,result:"followed",reason:"No modifications, context check not applicable"}:{habit:e,result:"skipped",reason:"No context/session tools called during session"}}function we(e,t){let o=t.symbolsTouched.filter(i=>i.startsWith("~"));return o.length===0?{habit:e,result:"followed",reason:"No aspects touched"}:t.aspectAnchorsValid===true?{habit:e,result:"followed",reason:"Aspect anchors validated and valid"}:t.toolsCalled.includes("paradigm_aspect_check")?{habit:e,result:"followed",reason:"paradigm_aspect_check was called to validate anchors"}:{habit:e,result:"skipped",reason:`${o.length} aspect(s) touched without anchor validation`,evidence:o.slice(0,5)}}export{z as a,X as b,Z as c,F as d,$ as e};
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import {a,e,d}from'./chunk-RMOALQJN.js';import'./chunk-5TAVYPOV.js';import*as c from'fs';import*as p from'path';import {execSync}from'child_process';import n from'chalk';import*as w from'js-yaml';function R(s){return s.match(/(?:^|\s)((?:\/|\.\/|[a-zA-Z0-9_-]+\/)[^\s,;:'"]+\.[a-zA-Z]{1,10})\b/)?.[1]}async function $(s,l){try{let a$1=a(s),f=[];try{f=execSync("git diff --name-only HEAD",{cwd:s,encoding:"utf8",timeout:5e3}).trim().split(`
2
+ import {a,e,d}from'./chunk-73R63P7K.js';import'./chunk-5TAVYPOV.js';import*as c from'fs';import*as p from'path';import {execSync}from'child_process';import n from'chalk';import*as w from'js-yaml';function R(s){return s.match(/(?:^|\s)((?:\/|\.\/|[a-zA-Z0-9_-]+\/)[^\s,;:'"]+\.[a-zA-Z]{1,10})\b/)?.[1]}async function $(s,l){try{let a$1=a(s),f=[];try{f=execSync("git diff --name-only HEAD",{cwd:s,encoding:"utf8",timeout:5e3}).trim().split(`
3
3
  `).filter(Boolean);}catch{}let i;try{i=execSync("git status --porcelain",{cwd:s,encoding:"utf8",timeout:5e3}).trim()==="";}catch{}let u=p.join(s,"portal.yaml"),g=!1;if(c.existsSync(u))try{let t=c.readFileSync(u,"utf8"),e=w.load(t);g=e?.routes!=null&&Object.keys(e.routes).length>0;}catch{}let r=e({toolsCalled:[],filesModified:f,symbolsTouched:[],loreRecorded:!1,hasPortalRoutes:g,taskAddsRoutes:!1,gitClean:i}),o=d(a$1,l,r),d$1=0;if(o.evaluations.length>0)try{let t=p.join(s,".paradigm","sentinel");if(c.existsSync(t)){let{SentinelStorage:e}=await import('./dist-VGFSP3XM.js'),m=new e(t);for(let b of o.evaluations)m.recordPracticeEvent({habitId:b.habit.id,habitCategory:b.habit.category,result:b.result,engineer:"agent",sessionId:`cli-${Date.now().toString(36)}`,symbolsTouched:[],filesModified:f,notes:b.reason}),d$1++;}}catch{}let h=p.join(s,".paradigm",".habits-blocking");try{if(l==="on-stop"&&o.blocksCompletion){let t=o.evaluations.filter(e=>e.result==="skipped"&&e.habit.severity==="block").map(e=>`${e.habit.name}: ${e.reason}`);c.writeFileSync(h,t.join(`
4
- `),"utf8");}else l==="on-stop"&&c.existsSync(h)&&c.unlinkSync(h);}catch{}return {trigger:l,evaluation:{total:o.summary.total,followed:o.summary.followed,skipped:o.summary.skipped,partial:o.summary.partial,blockingViolations:o.summary.blockingViolations,blocksCompletion:o.blocksCompletion},habits:o.evaluations.map(t=>({id:t.habit.id,name:t.habit.name,category:t.habit.category,severity:t.habit.severity,result:t.result,reason:t.reason,evidence:t.evidence})),recorded:d$1}}catch{return null}}async function P(s,l){let a=p.join(s,".paradigm","aspect-graph.db");if(!c.existsSync(a))return {driftedCount:0,healedCount:0,cleanCount:0,missingCount:0,details:[]};try{let{driftCheckCommand:f}=await import('./drift-ILZE5BFJ.js'),i="",u=console.log;console.log=g=>{i=g;};try{await f({json:!0,autoHeal:l});}finally{console.log=u;}return i?JSON.parse(i):null}catch{return null}}async function B(s){if(!c.existsSync(p.join(s,"portal.yaml")))return null;try{let{checkPortalCompliance:l}=await import('./portal-compliance-4MG5F2GI.js'),a=await l(s);return {status:a.status,declaredButUnusedCount:a.declaredButUnused.length,usedButUndeclaredCount:a.usedButUndeclared.length,properlyDeclaredCount:a.properlyDeclared.length,declaredButUnused:a.declaredButUnused,usedButUndeclared:a.usedButUndeclared,properlyDeclared:a.properlyDeclared}}catch{return null}}async function j(s){try{let{runPostflightLearning:l}=await import('./ambient-WEPHBAJD.js');return await l(s)}catch{return null}}async function A(s){let l=process.cwd(),a=s.trigger||"on-stop",f=s.autoHeal!==false,i=[],u=[],g=await $(l,a),r=await P(l,f),o=await B(l);if(g?.evaluation.blocksCompletion){let t=g.habits.filter(e=>e.result==="skipped"&&e.severity==="block");for(let e of t){let m=`Blocking habit not satisfied: ${e.name} \u2014 ${e.reason}`;i.push(m),u.push({message:m,source:"habits",file:R(e.reason),severity:"blocking"});}}if(r&&r.driftedCount>0){let t=`${r.driftedCount} aspect anchor(s) have drifted (content genuinely changed). Run paradigm_aspect_check to review.`;i.push(t);for(let e of r.details.filter(m=>m.status==="drifted"))u.push({message:`Aspect ~${e.aspectId} drifted at lines ${e.startLine}-${e.endLine}`,source:"drift",file:e.path,severity:"advisory"});u.filter(e=>e.source==="drift").length===0&&u.push({message:t,source:"drift",severity:"advisory"});}if(o&&o.usedButUndeclaredCount>0){let t=`${o.usedButUndeclaredCount} gate(s) used in code but not declared in portal.yaml: ${o.usedButUndeclared.join(", ")}`;i.push(t);for(let e of o.usedButUndeclared)u.push({message:`Gate ^${e} used in code but not declared in portal.yaml`,source:"portal",file:"portal.yaml",severity:"blocking"});}let d=null;s.learn&&(d=await j(l));let h={habits:g,drift:r,portal:o,violations:i,structuredViolations:u,postflight:s.learn?d:void 0};if(s.json)console.log(JSON.stringify(h));else {if(console.log(n.magenta(`
4
+ `),"utf8");}else l==="on-stop"&&c.existsSync(h)&&c.unlinkSync(h);}catch{}return {trigger:l,evaluation:{total:o.summary.total,followed:o.summary.followed,skipped:o.summary.skipped,partial:o.summary.partial,blockingViolations:o.summary.blockingViolations,blocksCompletion:o.blocksCompletion},habits:o.evaluations.map(t=>({id:t.habit.id,name:t.habit.name,category:t.habit.category,severity:t.habit.severity,result:t.result,reason:t.reason,evidence:t.evidence})),recorded:d$1}}catch{return null}}async function P(s,l){let a=p.join(s,".paradigm","aspect-graph.db");if(!c.existsSync(a))return {driftedCount:0,healedCount:0,cleanCount:0,missingCount:0,details:[]};try{let{driftCheckCommand:f}=await import('./drift-ILZE5BFJ.js'),i="",u=console.log;console.log=g=>{i=g;};try{await f({json:!0,autoHeal:l});}finally{console.log=u;}return i?JSON.parse(i):null}catch{return null}}async function B(s){if(!c.existsSync(p.join(s,"portal.yaml")))return null;try{let{checkPortalCompliance:l}=await import('./portal-compliance-4MG5F2GI.js'),a=await l(s);return {status:a.status,declaredButUnusedCount:a.declaredButUnused.length,usedButUndeclaredCount:a.usedButUndeclared.length,properlyDeclaredCount:a.properlyDeclared.length,declaredButUnused:a.declaredButUnused,usedButUndeclared:a.usedButUndeclared,properlyDeclared:a.properlyDeclared}}catch{return null}}async function j(s){try{let{runPostflightLearning:l}=await import('./ambient-HYZR42NX.js');return await l(s)}catch{return null}}async function A(s){let l=process.cwd(),a=s.trigger||"on-stop",f=s.autoHeal!==false,i=[],u=[],g=await $(l,a),r=await P(l,f),o=await B(l);if(g?.evaluation.blocksCompletion){let t=g.habits.filter(e=>e.result==="skipped"&&e.severity==="block");for(let e of t){let m=`Blocking habit not satisfied: ${e.name} \u2014 ${e.reason}`;i.push(m),u.push({message:m,source:"habits",file:R(e.reason),severity:"blocking"});}}if(r&&r.driftedCount>0){let t=`${r.driftedCount} aspect anchor(s) have drifted (content genuinely changed). Run paradigm_aspect_check to review.`;i.push(t);for(let e of r.details.filter(m=>m.status==="drifted"))u.push({message:`Aspect ~${e.aspectId} drifted at lines ${e.startLine}-${e.endLine}`,source:"drift",file:e.path,severity:"advisory"});u.filter(e=>e.source==="drift").length===0&&u.push({message:t,source:"drift",severity:"advisory"});}if(o&&o.usedButUndeclaredCount>0){let t=`${o.usedButUndeclaredCount} gate(s) used in code but not declared in portal.yaml: ${o.usedButUndeclared.join(", ")}`;i.push(t);for(let e of o.usedButUndeclared)u.push({message:`Gate ^${e} used in code but not declared in portal.yaml`,source:"portal",file:"portal.yaml",severity:"blocking"});}let d=null;s.learn&&(d=await j(l));let h={habits:g,drift:r,portal:o,violations:i,structuredViolations:u,postflight:s.learn?d:void 0};if(s.json)console.log(JSON.stringify(h));else {if(console.log(n.magenta(`
5
5
  Paradigm Compliance Check
6
6
  `)),g){let{evaluation:t}=g,e=t.blocksCompletion?n.red:n.green;console.log(n.white(" Habits:")),console.log(` ${e(`${t.followed} followed, ${t.skipped} skipped, ${t.partial} partial`)}`),t.blockingViolations>0&&console.log(n.red(` ${t.blockingViolations} blocking violation(s)`)),console.log();}if(r&&(console.log(n.white(" Drift:")),r.healedCount>0&&console.log(n.green(` Auto-healed: ${r.healedCount} shifted anchor(s)`)),r.cleanCount>0&&console.log(n.green(` Clean: ${r.cleanCount} anchor(s)`)),r.driftedCount>0&&console.log(n.red(` Drifted: ${r.driftedCount} anchor(s)`)),r.missingCount>0&&console.log(n.yellow(` Missing: ${r.missingCount} anchor file(s)`)),console.log()),o){console.log(n.white(" Portal:"));let t=o.status==="compliant"?n.green:o.status==="warnings"?n.yellow:n.red;console.log(` Status: ${t(o.status)}`),o.usedButUndeclaredCount>0&&console.log(n.red(` ${o.usedButUndeclaredCount} undeclared gate(s)`)),console.log();}if(d){if(console.log(n.white(" Postflight Learning:")),d.journalsWritten>0){console.log(n.green(` Journals written: ${d.journalsWritten}`));for(let[t,e]of Object.entries(d.journalsByAgent))e>0&&console.log(n.gray(` ${t}: ${e} entries`));}else console.log(n.gray(" No verdicts to learn from"));d.promoted>0&&console.log(n.green(` Promoted to notebooks: ${d.promoted}`)),console.log();}if(i.length>0){console.log(n.red(` ${i.length} violation(s):`));for(let t of i)console.log(n.red(` - ${t}`));}else console.log(n.green(" All checks passed."));console.log();}i.length>0&&(process.exitCode=1);}export{A as complianceCheckCommand};
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {a,d,e,f,g,b}from'./chunk-BFD3GFRK.js';import'./chunk-5TAVYPOV.js';import n from'chalk';import*as t from'fs';import*as o from'path';import {fileURLToPath}from'url';async function C(c){let s=process.cwd(),e=parseInt(c.port||"3850",10),p=c.open!==false;console.log(n.cyan(`
3
3
  Starting Paradigm Docs...
4
- `));try{let{startPlatformServer:i}=await import('./platform-server-2KXHGHFV.js');await i({projectDir:s,port:e,open:p,sections:["overview","docs"]}),console.log(n.green(` Docs running at ${n.bold(`http://localhost:${e}`)}`)),console.log(n.gray(` Press Ctrl+C to stop
4
+ `));try{let{startPlatformServer:i}=await import('./platform-server-FXYBBH6E.js');await i({projectDir:s,port:e,open:p,sections:["overview","docs"]}),console.log(n.green(` Docs running at ${n.bold(`http://localhost:${e}`)}`)),console.log(n.gray(` Press Ctrl+C to stop
5
5
  `)),await new Promise(()=>{});}catch(i){i.code==="EADDRINUSE"?(console.error(n.red(`
6
6
  Error: Port ${e} is already in use.`)),console.log(n.gray(` Try: paradigm docs serve --port ${e+1}
7
7
  `))):console.error(n.red(`
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import {a,b,c,e,d}from'./chunk-RMOALQJN.js';import'./chunk-5TAVYPOV.js';import*as g from'fs';import*as u from'path';import {execSync}from'child_process';import o from'chalk';import*as C from'js-yaml';var $=".paradigm/habits.yaml",G=new Set(["explore-before-implement","ripple-before-modify","check-fragility","wisdom-before-implement","verify-before-done","postflight-compliance","test-new-components","purpose-coverage","record-lore-for-significant","gates-for-routes"]),x=["discovery","verification","testing","documentation","collaboration","security"],E=["preflight","postflight","on-stop","on-commit"],I=["advisory","warn","block"],P=["tool-called","file-exists","file-modified","lore-recorded","symbols-registered","gates-declared","tests-exist","git-clean"];function T(e,t){let r=u.join(e,$),i=F(r,t);if(i)return {source:"project",...i};let n=process.env.HOME||process.env.USERPROFILE||"~",l=u.join(n,".paradigm","habits.yaml"),c=F(l,t);return c?{source:"global",...c}:G.has(t)?{source:"seed",filePath:"",index:-1}:null}function F(e,t){if(!g.existsSync(e))return null;try{let r=g.readFileSync(e,"utf8"),i=C.load(r);if(!i?.habits)return null;let n=i.habits.findIndex(l=>l.id===t);return n===-1?null:{filePath:e,index:n}}catch{return null}}function D(e){let t=g.readFileSync(e,"utf8"),r=C.load(t);return r.habits||(r.habits=[]),r.overrides||(r.overrides={}),r}function w(e,t){g.writeFileSync(e,C.dump(t,{lineWidth:80,noRefs:true}),"utf8");}function L(e){let t=u.join(e,$);if(!g.existsSync(t)){let r=u.dirname(t);g.existsSync(r)||g.mkdirSync(r,{recursive:true}),w(t,{version:"1.0",habits:[],overrides:{}});}return t}async function J(e){let t=process.cwd(),r;try{r=a(t);}catch(s){console.log(o.red("Failed to load habits:"),s.message);return}if(e.trigger&&(r=r.filter(s=>s.trigger===e.trigger)),e.category&&(r=r.filter(s=>s.category===e.category)),e.json){console.log(JSON.stringify(r,null,2));return}let i=r.filter(s=>s.enabled),n=r.filter(s=>!s.enabled);console.log(o.magenta(`
2
+ import {a,b,c,e,d}from'./chunk-73R63P7K.js';import'./chunk-5TAVYPOV.js';import*as g from'fs';import*as u from'path';import {execSync}from'child_process';import o from'chalk';import*as C from'js-yaml';var $=".paradigm/habits.yaml",G=new Set(["explore-before-implement","ripple-before-modify","check-fragility","wisdom-before-implement","verify-before-done","postflight-compliance","test-new-components","purpose-coverage","record-lore-for-significant","gates-for-routes"]),x=["discovery","verification","testing","documentation","collaboration","security"],E=["preflight","postflight","on-stop","on-commit"],I=["advisory","warn","block"],P=["tool-called","file-exists","file-modified","lore-recorded","symbols-registered","gates-declared","tests-exist","git-clean"];function T(e,t){let r=u.join(e,$),i=F(r,t);if(i)return {source:"project",...i};let n=process.env.HOME||process.env.USERPROFILE||"~",l=u.join(n,".paradigm","habits.yaml"),c=F(l,t);return c?{source:"global",...c}:G.has(t)?{source:"seed",filePath:"",index:-1}:null}function F(e,t){if(!g.existsSync(e))return null;try{let r=g.readFileSync(e,"utf8"),i=C.load(r);if(!i?.habits)return null;let n=i.habits.findIndex(l=>l.id===t);return n===-1?null:{filePath:e,index:n}}catch{return null}}function D(e){let t=g.readFileSync(e,"utf8"),r=C.load(t);return r.habits||(r.habits=[]),r.overrides||(r.overrides={}),r}function w(e,t){g.writeFileSync(e,C.dump(t,{lineWidth:80,noRefs:true}),"utf8");}function L(e){let t=u.join(e,$);if(!g.existsSync(t)){let r=u.dirname(t);g.existsSync(r)||g.mkdirSync(r,{recursive:true}),w(t,{version:"1.0",habits:[],overrides:{}});}return t}async function J(e){let t=process.cwd(),r;try{r=a(t);}catch(s){console.log(o.red("Failed to load habits:"),s.message);return}if(e.trigger&&(r=r.filter(s=>s.trigger===e.trigger)),e.category&&(r=r.filter(s=>s.category===e.category)),e.json){console.log(JSON.stringify(r,null,2));return}let i=r.filter(s=>s.enabled),n=r.filter(s=>!s.enabled);console.log(o.magenta(`
3
3
  Habits (${i.length} active, ${n.length} disabled)
4
4
  `));let l=["preflight","postflight","on-stop","on-commit"];for(let s of l){let y=r.filter(d=>d.trigger===s);if(y.length!==0){console.log(o.cyan(` ${s}:`));for(let d of y){let a=d.enabled?o.green("ON"):o.gray("OFF"),m=d.severity==="block"?o.red(d.severity):d.severity==="warn"?o.yellow(d.severity):o.gray(d.severity);console.log(` ${a} ${o.white(d.id)} [${m}] - ${d.name}`),console.log(o.gray(` ${d.description}`));}console.log();}}let c=u.join(t,$);g.existsSync(c)?console.log(o.gray(` Config: ${$}`)):console.log(o.gray(" Config: using seed habits only (run 'paradigm habits init' to customize)")),console.log();}async function W(e){let t=process.cwd(),r;try{r=a(t);}catch(c){console.log(o.red("Failed to load habits:"),c.message);return}let i=b(r),n=null;try{let{SentinelStorage:c}=await import('./dist-VGFSP3XM.js'),s=u.join(t,".paradigm","sentinel");if(g.existsSync(s)){let y=new c(s),d=e.period||"30d",a=parseInt(d.replace("d",""),10)||30,m=d==="all"?void 0:new Date(Date.now()-a*24*60*60*1e3).toISOString(),v=y.getComplianceRate({dateFrom:m}),f=y.getPracticeEvents({dateFrom:m,limit:500}),b=new Map;for(let h of f){let p=h.habitCategory,S=b.get(p)||{followed:0,skipped:0,partial:0};S[h.result]++,b.set(p,S);}let j=Array.from(b.entries()).map(([h,p])=>{let S=p.followed+p.skipped+p.partial,O=S>0?Math.round((p.followed+p.partial*.5)/S*100):100;return {category:h,rate:O,total:S}}).sort((h,p)=>h.rate-p.rate);n={total:v.total,followed:v.followed,skipped:v.skipped,partial:v.partial,rate:v.rate,byCategory:j};}}catch{}if(e.json){console.log(JSON.stringify({habits:{total:r.length,enabled:i.length},practice:n},null,2));return}console.log(o.magenta(`
5
5
  Habits Practice Profile
package/dist/index.js CHANGED
@@ -13,4 +13,4 @@ ${l.magenta("\u2569 ")}${l.cyan("\u2534 \u2534\u2534\u2514\u2500\u2534 \u2534\u
13
13
  Usage: paradigm scan <command>
14
14
  `),console.log("Commands:"),console.log(" auto [path] Auto-generate .purpose files from code analysis"),console.log("\nRun `paradigm scan auto --help` for options.\n");});var R=i.command("flow").description("Flow management commands");R.command("diagram <flowId>").description("Generate Mermaid diagram for a flow").option("-o, --output <path>","Output file path").action(async(t,o)=>{let{flowDiagramCommand:a}=await import('./flow-POQP27WA.js');await a(t,o);});R.action(()=>{R.outputHelp();});var s=i.command("team").description("Multi-agent orchestration commands");s.command("init [path]").description("Initialize team configuration with default agents").option("-f, --force","Overwrite existing configuration").option("--configure-models","Force model configuration prompts").option("--no-configure-models","Skip model configuration").option("--json","Output as JSON").action(async(t,o)=>{let{teamInitCommand:a}=await import('./team-MKLPUTW7.js');await a(t,{...o,configureModels:o.configureModels,noConfigureModels:o.configureModels===false});});s.command("status [path]").description("Show current team status").option("--running","Show only running orchestrations").option("--id <id>","Show specific orchestration").option("--json","Output as JSON").action(async(t,o)=>{let{teamStatusCommand:a}=await import('./team-MKLPUTW7.js');await a(t,o);});s.command("handoff [path]").description("Hand off current task to another agent").requiredOption("-t, --to <agent>","Target agent name").option("-s, --summary <text>","Summary of what was done").option("--json","Output as JSON").action(async(t,o)=>{let{teamHandoffCommand:a}=await import('./team-MKLPUTW7.js');await a(t,o);});s.command("accept [handoff-id] [path]").description("Accept a pending handoff").option("-n, --note <text>","Acceptance note").option("--json","Output as JSON").action(async(t,o,a)=>{let{teamAcceptCommand:n}=await import('./team-MKLPUTW7.js');await n(t,o,a);});s.command("check [path]").description("Check for conflicts and team health issues").option("--json","Output as JSON").action(async(t,o)=>{let{teamCheckCommand:a}=await import('./team-MKLPUTW7.js');await a(t,o);});s.command("history [path]").description("Show full activity log").option("-l, --limit <number>","Number of entries to show","50").option("--json","Output as JSON").action(async(t,o)=>{let{teamHistoryCommand:a}=await import('./team-MKLPUTW7.js');await a(t,{...o,limit:parseInt(o.limit)});});s.command("reset [path]").description("Reset team state for fresh start").option("-f, --force","Force reset even with pending work").option("--json","Output as JSON").action(async(t,o)=>{let{teamResetCommand:a}=await import('./team-MKLPUTW7.js');await a(t,o);});s.command("spawn <agent> [path]").description("Spawn an AI agent to work on a task").requiredOption("-t, --task <task>","Task for the agent to perform").option("-m, --model <model>","Model to use: opus, sonnet, haiku").option("-p, --provider <provider>","Provider: auto, claude, claude-code, claude-cli, manual").option("--budget <budget>",'Budget limits (e.g., "tokens=100000,cost=2")').option("--timeout <ms>","Timeout in milliseconds").option("--checkpoint","Pause for approval before writes/deletes").option("-q, --quiet","Suppress output").option("--json","Output as JSON").action(async(t,o,a)=>{let{teamSpawnCommand:n}=await import('./spawn-UH5RENSE.js');await n(t,o,a);});s.command("orchestrate <task> [path]").description("Orchestrate a multi-agent task").option("--solo","Run in solo mode (single Claude)").option("--faceted","Run in faceted mode (multi-agent, default)").option("--compare","Run both modes and compare results").option("--background","Run in background mode (returns immediately)").option("--notify <methods>","Notification methods: bell,desktop,file,webhook (default: bell)").option("-m, --model <model>","Orchestrator model: opus, sonnet, haiku").option("-p, --provider <provider>","Provider: auto, claude, claude-code, claude-cli, manual").option("--budget <budget>",'Budget limits (e.g., "tokens=500000,cost=5")').option("--checkpoint","Pause for approval between agents").option("--live","Stream agent output live").option("--pm","Enable PM governance (compliance checks before/after)").option("-q, --quiet","Suppress output").option("--json","Output as JSON").action(async(t,o,a)=>{let{teamOrchestrateCommand:n}=await import('./orchestrate-4L3NJCV5.js');await n(t,o,a);});s.command("diff <orchestration-id> [path]").description("Show diff of changes from a completed orchestration").option("--full","Show full file contents").option("--json","Output as JSON").action(async(t,o,a)=>{let{teamDiffCommand:n}=await import('./diff-YM6ZV3UI.js');await n(t,o,a);});s.command("accept-orch <orchestration-id> [path]").description("Accept orchestration changes").option("-n, --note <text>","Acceptance note").option("--json","Output as JSON").action(async(t,o,a)=>{let{teamAcceptOrchestrationCommand:n}=await import('./accept-orchestration-CLT6SAYW.js');await n(t,o,a);});s.command("reject-orch <orchestration-id> [path]").description("Reject orchestration changes").option("-r, --reason <text>","Rejection reason").option("--cleanup","Delete created files").option("--json","Output as JSON").action(async(t,o,a)=>{let{teamRejectOrchestrationCommand:n}=await import('./accept-orchestration-CLT6SAYW.js');await n(t,o,a);});s.command("cost [path]").description("Show cost summary for orchestrations").option("--from <date>","From date (ISO format)").option("--to <date>","To date (ISO format)").option("--days <n>","Last N days").option("-d, --detailed","Show detailed breakdown").option("--json","Output as JSON").action(async(t,o)=>{let{teamCostCommand:a}=await import('./cost-PK4KIF7R.js');await a(t,o);});s.command("export [path]").description("Export orchestration data").option("-f, --format <format>","Output format: json, csv","json").option("--from <date>","From date (ISO format)").option("--to <date>","To date (ISO format)").option("-o, --output <file>","Output file path").action(async(t,o)=>{let{teamExportCommand:a}=await import('./export-CV5KCTPS.js');await a(t,o);});s.command("providers [path]").description("Show available agent providers and their status").option("--set <provider>","Set preferred provider: auto, claude, claude-code, claude-cli, manual").option("--json","Output as JSON").action(async(t,o)=>{let{teamProvidersCommand:a}=await import('./providers-4PXMWA7V.js');await a(t,o);});s.command("models [path]").description("Configure or view agent model assignments").option("--refresh","Refresh model cache from environment").option("--json","Output as JSON").action(async(t,o)=>{let{teamModelsCommand:a}=await import('./team-MKLPUTW7.js');await a(t,o);});var z=s.command("agents").description("Agent management commands");z.command("suggest <task>").description("Suggest agents for a task based on triggers").option("--json","Output as JSON").action(async(t,o)=>{let{agentsSuggestCommand:a}=await import('./agents-suggest-HYTFMQD3.js');await a(t,o);});z.action(()=>{console.log(`
15
15
  Usage: paradigm team agents <command>
16
- `),console.log("Commands:"),console.log(" suggest <task> Suggest agents for a task based on triggers"),console.log("\nRun `paradigm team agents suggest --help` for options.\n");});s.action(async()=>{let{teamStatusCommand:t}=await import('./team-MKLPUTW7.js');await t(void 0,{});});var U=i.command("plugin").description("Plugin management commands");U.command("check").description("Check for updates to installed Claude Code plugins").option("-u, --update","Pull latest changes for all stale marketplace clones").action(async t=>{let{pluginCheckCommand:o}=await import('./check-THVGY4R5.js');await o(t);});U.action(async()=>{let{pluginCheckCommand:t}=await import('./check-THVGY4R5.js');await t({});});var j=i.command("workspace").description("Multi-project workspace commands");j.command("init").description("Create a .paradigm-workspace file from sibling projects").option("-n, --name <name>","Workspace name (default: directory name)").option("-f, --force","Overwrite existing workspace file").action(async t=>{let{workspaceInitCommand:o}=await import('./workspace-2ODL5WLY.js');await o(t);});j.command("status").description("Show workspace member status and symbol counts").option("--json","Output as JSON").action(async t=>{let{workspaceStatusCommand:o}=await import('./workspace-2ODL5WLY.js');await o(t);});j.command("reindex").description("Rebuild scan-index.json for all workspace members").option("-q, --quiet","Suppress progress output").action(async t=>{let{workspaceReindexCommand:o}=await import('./workspace-2ODL5WLY.js');await o(t);});j.action(async()=>{let{workspaceStatusCommand:t}=await import('./workspace-2ODL5WLY.js');await t({});});i.command("doctor").description("Health check - validate Paradigm setup").option("--context","Run only context audit checks (CLAUDE.md quality)").action(async t=>{let{doctorCommand:o}=await import('./doctor-HMQBF2WK.js');await o(t);});i.command("integrity").description("Symbol integrity check \u2014 broken refs, duplicates, orphans, missing anchors").option("--json","Output machine-readable JSON").action(async t=>{let{integrityCommand:o}=await import('./integrity-UYDOOJDP.js');await o(t);});i.command("review").description("Automated two-stage review pipeline \u2014 spec compliance + code quality").option("--pr <number>","Review a PR via gh CLI").option("--ci","Exit 1 on blocking findings").option("--deep","Include code quality checks (eval, secrets, console.log)").option("--json","Output machine-readable JSON").action(async t=>{let{reviewCommand:o}=await import('./review-6UAH6V3R.js');await o(t);});i.command("sweep").description("Entropy detection and cleanup \u2014 find orphaned symbols, stale purpose files, phantom gates").option("--dry","Report only, no fixes applied").option("--skip-fix","Same as --dry").option("-q, --quiet","Minimal output").action(async t=>{let{sweepCommand:o}=await import('./sweep-HU74OPVW.js');await o(t);});var K=i.command("drift").description("Aspect anchor drift detection");K.command("check").description("Check aspect anchors for drift and auto-heal shifted anchors").option("--json","Output as JSON").option("--auto-heal","Auto-heal shifted anchors (default: true)").option("--no-auto-heal","Disable auto-healing").action(async t=>{let{driftCheckCommand:o}=await import('./drift-ILZE5BFJ.js');await o(t);});var I=i.command("global").description("Manage Global Brain (~/.paradigm/)");I.command("clean").description("Remove old files from ~/.paradigm/ (Global Brain rotation)").option("--older-than <duration>","Remove files older than duration (e.g., 90d, 30d, 7d)","90d").option("-n, --dry-run","Show what would be deleted without deleting").action(async t=>{let{globalCleanCommand:o}=await import('./global-C44FW4G2.js');await o(t);});I.action(()=>{I.outputHelp();});i.command("watch").description("Watch for changes and auto-sync IDE files").action(async()=>{let{watchCommand:t}=await import('./watch-LRM5XD46.js');await t();});i.command("summary").description("Generate .paradigm/project.md with project stats").action(async()=>{let{summaryCommand:t}=await import('./summary-ZJLQ6KHB.js');await t();});i.command("constellation [path]").alias("const").description("Generate .paradigm/constellation.json - symbol relationship graph for AI agents").option("-f, --format <format>","Output format: json or yaml","json").option("-o, --output <path>","Custom output path").option("-q, --quiet","Suppress output").action(async(t,o)=>{let{constellationCommand:a}=await import('./constellation-CG7C4WFE.js');await a(t,o);});i.command("beacon [path]").description("Generate .paradigm/beacon.md - quick-start orientation for AI agents").option("-r, --refresh","Regenerate even if beacon exists").option("-o, --output <path>","Custom output path").option("--json","Output as JSON (for AI agent queries)").option("-q, --quiet","Suppress output").action(async(t,o)=>{let{beaconCommand:a}=await import('./beacon-5QVYV5DF.js');await a(t,o);});i.command("ripple <symbol> [path]").description("Show change impact analysis for a symbol").option("-d, --depth <depth>","Analysis depth (default: 1)","1").option("--json","Output as JSON").option("-q, --quiet","Suppress output").action(async(t,o,a)=>{let{rippleCommand:n}=await import('./ripple-ZGDITCGB.js');await n(t,o,a);});var b=i.command("thread").description("Session continuity - pass context between AI agent sessions");b.command("show [path]").alias("s").description("Show current thread").option("--json","Output as JSON (for AI agent queries)").action(async(t,o)=>{let{threadShowCommand:a}=await import('./thread-HFXK65D4.js');await a(t,o);});b.command("save <message> [path]").description("Save activity to the thread trail").option("-q, --quiet","Suppress output").action(async(t,o,a)=>{let{threadSaveCommand:n}=await import('./thread-HFXK65D4.js');await n(t,o,a);});b.command("todo <task> [path]").description("Add a loose end (unfinished task)").option("-q, --quiet","Suppress output").action(async(t,o,a)=>{let{threadTodoCommand:n}=await import('./thread-HFXK65D4.js');await n(t,o,a);});b.command("note <note> [path]").description("Add a breadcrumb (note for next agent)").option("-q, --quiet","Suppress output").action(async(t,o,a)=>{let{threadNoteCommand:n}=await import('./thread-HFXK65D4.js');await n(t,o,a);});b.command("clear [path]").description("Clear the thread").option("-q, --quiet","Suppress output").action(async(t,o)=>{let{threadClearCommand:a}=await import('./thread-HFXK65D4.js');await a(t,o);});b.option("--json","Output as JSON (for AI agent queries)").action(async t=>{let{threadShowCommand:o}=await import('./thread-HFXK65D4.js');await o(void 0,t);});var x=i.command("echo").description("Error-to-symbol mapping - find related symbols for error codes");x.command("lookup <errorCode> [path]").alias("l").description("Look up an error code").option("--json","Output as JSON (for AI agent queries)").action(async(t,o,a)=>{let{echoCommand:n}=await import('./echo-UPTQUEDU.js');await n(t,o,a);});x.command("init [path]").description("Create .paradigm/echoes.yaml template").option("-q, --quiet","Suppress output").action(async(t,o)=>{let{echoInitCommand:a}=await import('./echo-UPTQUEDU.js');await a(t,o);});x.command("list [path]").alias("ls").description("List all error mappings").action(async t=>{let{echoListCommand:o}=await import('./echo-UPTQUEDU.js');await o(t);});x.argument("[errorCode]","Error code to look up").option("--json","Output as JSON (for AI agent queries)").action(async(t,o)=>{if(t){let{echoCommand:a}=await import('./echo-UPTQUEDU.js');await a(t,void 0,o);}else {let{echoListCommand:a}=await import('./echo-UPTQUEDU.js');await a();}});var u=i.command("tutorial").description("Interactive tutorial system");u.command("start [path]").description("Start the tutorial").action(async t=>{let{tutorialStartCommand:o}=await import('./tutorial-UC6YQMNN.js');await o(t);});u.command("step [n] [path]").description("Show tutorial step").action(async(t,o)=>{let{tutorialStepCommand:a}=await import('./tutorial-UC6YQMNN.js');await a(o,t);});u.command("checkpoint [path]").description("Validate current checkpoint").action(async t=>{let{tutorialCheckpointCommand:o}=await import('./tutorial-UC6YQMNN.js');await o(t);});u.command("next [path]").description("Move to next step").action(async t=>{let{tutorialNextCommand:o}=await import('./tutorial-UC6YQMNN.js');await o(t);});u.command("status [path]").description("Show tutorial progress").action(async t=>{let{tutorialStatusCommand:o}=await import('./tutorial-UC6YQMNN.js');await o(t);});u.command("reset [path]").description("Reset tutorial to beginning").action(async t=>{let{tutorialResetCommand:o}=await import('./tutorial-UC6YQMNN.js');await o(t);});u.command("bugs [path]").description("List intentional bugs").action(async t=>{let{tutorialBugsCommand:o}=await import('./tutorial-UC6YQMNN.js');await o(t);});var w=i.command("mcp").description("MCP server configuration for AI clients");w.command("setup").description("Configure MCP server for detected AI clients").option("-c, --client <client>","Target client: cursor, claude-desktop, continue, cline, all").option("-f, --force","Overwrite existing config").option("--json","Output as JSON").option("--no-gitignore","Do not add config to .gitignore").action(async t=>{let{mcpSetupCommand:o}=await import('./setup-KPIMRZ4Q.js');await o(t);});w.command("status").description("Show MCP configuration status across clients").option("--json","Output as JSON").action(async t=>{let{mcpStatusCommand:o}=await import('./setup-KPIMRZ4Q.js');await o(t);});w.command("list").alias("ls").description("List all configured MCP servers across all clients").option("--json","Output as JSON").action(async t=>{let{mcpListCommand:o}=await import('./setup-KPIMRZ4Q.js');await o(t);});w.command("remove [server]").alias("rm").description("Remove MCP server from client configs").option("-c, --client <client>","Target client: cursor, claude-desktop, continue, cline, all").option("-f, --force","Skip confirmation").option("--json","Output as JSON").action(async(t,o)=>{let{mcpRemoveCommand:a}=await import('./setup-KPIMRZ4Q.js');await a(t,o);});w.command("use-dev").description("Switch MCP configs to use local dev build").option("-c, --client <client>","Target client: cursor, claude-desktop, claude-code, continue, cline").option("--json","Output as JSON").action(async t=>{let{mcpUseDevCommand:o}=await import('./switch-CTW4PDGI.js');await o(t);});w.command("use-prod").description("Switch MCP configs back to global production binary").option("-c, --client <client>","Target client: cursor, claude-desktop, claude-code, continue, cline").option("--json","Output as JSON").action(async t=>{let{mcpUseProdCommand:o}=await import('./switch-CTW4PDGI.js');await o(t);});w.action(async()=>{let{mcpSwitchStatusCommand:t}=await import('./switch-CTW4PDGI.js');await t({});});i.command("promote").description("Copy local build to production (~/.paradigm-cli/)").option("-f, --force","Create production directory if missing").option("--skip-build","Skip npm run build step").option("--json","Output as JSON").action(async t=>{let{promoteCommand:o}=await import('./promote-NJQDZBZA.js');await o(t);});var v=i.command("wisdom").description("Team wisdom - preferences, antipatterns, decisions, expertise");v.command("show [symbol]").description("Display wisdom for symbols or overview").option("--json","Output as JSON").action(async(t,o)=>{let{wisdomShowCommand:a}=await import('./wisdom-XZ3QKPNP.js');await a(t,o);});v.command("init").description("Initialize wisdom directory with templates").option("-f, --force","Overwrite existing files").action(async t=>{let{wisdomInitCommand:o}=await import('./wisdom-XZ3QKPNP.js');await o(t);});v.command("add-antipattern").description("Add a new antipattern").requiredOption("--id <id>","Antipattern ID (e.g., api-001)").requiredOption("--symbols <symbols>","Comma-separated symbols").requiredOption("--description <desc>","What NOT to do").requiredOption("--reason <reason>","Why this is bad").requiredOption("--alternative <alt>","What to do instead").action(async t=>{let{wisdomAddAntipatternCommand:o}=await import('./wisdom-XZ3QKPNP.js');await o(t);});v.command("decide").description("Create a new decision record (ADR)").requiredOption("--id <id>","Decision ID (e.g., 001)").requiredOption("--title <title>","Decision title").requiredOption("--symbols <symbols>","Comma-separated symbols").requiredOption("--context <context>","Context/problem").requiredOption("--decision <decision>","The decision made").option("--status <status>","Status: proposed, accepted","proposed").action(async t=>{let{wisdomDecideCommand:o}=await import('./wisdom-XZ3QKPNP.js');await o(t);});v.command("expert [query]").description("Find experts for symbols or areas").option("--json","Output as JSON").action(async(t,o)=>{let{wisdomExpertCommand:a}=await import('./wisdom-XZ3QKPNP.js');await a(t,o);});v.option("--json","Output as JSON").action(async t=>{let{wisdomShowCommand:o}=await import('./wisdom-XZ3QKPNP.js');await o(void 0,t);});var y=i.command("history").description("Implementation history - tracking changes, validation, fragility");y.command("show [symbol]").description("Display history for symbols or overview").option("--json","Output as JSON").option("-l, --limit <number>","Number of entries","10").action(async(t,o)=>{let{historyShowCommand:a}=await import('./history-UW454SDP.js');await a(t,{...o,limit:parseInt(o.limit)});});y.command("init").description("Initialize history directory").option("-f, --force","Overwrite existing files").action(async t=>{let{historyInitCommand:o}=await import('./history-UW454SDP.js');await o(t);});y.command("fragile").description("Show fragile symbols that need extra care").option("--json","Output as JSON").action(async t=>{let{historyFragileCommand:o}=await import('./history-UW454SDP.js');await o(t);});y.command("reindex").description("Regenerate index from log").action(async()=>{let{historyReindexCommand:t}=await import('./history-UW454SDP.js');await t();});y.command("record").description("Record an implementation event").requiredOption("--type <type>","Type: implement, refactor, rollback").requiredOption("--symbols <symbols>","Comma-separated symbols").requiredOption("--description <desc>","What was done").option("--intent <intent>","Intent: feature, fix, refactor").option("--commit <hash>","Git commit hash").option("--reason <reason>","Reason for rollback").action(async t=>{let{historyRecordCommand:o}=await import('./history-UW454SDP.js');await o(t);});y.command("validate").description("Record a validation result").requiredOption("--result <result>","Result: pass, fail, partial").option("--ref <id>","Implementation ID being validated").option("--passed <n>","Tests passed").option("--failed <n>","Tests failed").action(async t=>{let{historyValidateCommand:o}=await import('./history-UW454SDP.js');await o({...t,passed:t.passed?parseInt(t.passed):void 0,failed:t.failed?parseInt(t.failed):void 0});});y.option("--json","Output as JSON").action(async t=>{let{historyShowCommand:o}=await import('./history-UW454SDP.js');await o(void 0,t);});var N=i.command("hooks").description("Git hooks for automatic history capture");N.command("install").description("Install git hooks, Claude Code hooks, and Cursor hooks").option("-f, --force","Overwrite existing hooks").option("--post-commit","Only install post-commit hook").option("--pre-push","Only install pre-push hook").option("--claude-code","Only install Claude Code hooks (stop + pre-commit)").option("--cursor","Only install Cursor hooks (.cursor/hooks.json)").option("--dry-run","Show what would be installed without making changes").action(async t=>{let{hooksInstallCommand:o}=await import('./hooks-E7HQQ57M.js');await o(t);});N.command("uninstall").description("Remove paradigm hooks (git hooks, or --cursor for Cursor hooks)").option("--cursor","Remove Cursor hooks instead of git hooks").option("--dry-run","Show what would be removed without making changes").action(async t=>{let{hooksUninstallCommand:o}=await import('./hooks-E7HQQ57M.js');await o(t);});N.command("status").description("Check git hooks status").action(async()=>{let{hooksStatusCommand:t}=await import('./hooks-E7HQQ57M.js');await t();});N.action(async()=>{let{hooksStatusCommand:t}=await import('./hooks-E7HQQ57M.js');await t();});var r=i.command("triage").description("Semantic error triage - incident management and pattern matching");r.command("list").alias("ls").description("List recent incidents with matched patterns").option("-l, --limit <number>","Maximum incidents to show","10").option("-s, --status <status>","Filter by status: open, investigating, resolved, wont-fix, all").option("--symbol <symbol>","Filter by symbol (e.g., @checkout, ^auth)").option("-e, --env <environment>","Filter by environment").option("--search <text>","Search in error messages").option("--from <date>","Filter from date (ISO format)").option("--to <date>","Filter to date (ISO format)").option("--json","Output as JSON").action(async t=>{let{triageListCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});r.command("show <id>").description("Show full incident details").option("--timeline","Include flow timeline").option("--json","Output as JSON").action(async(t,o)=>{let{triageShowCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});r.command("resolve <id>").description("Mark incident as resolved").option("-p, --pattern <patternId>","Pattern that led to resolution").option("-c, --commit <hash>","Git commit hash of fix").option("--pr <url>","Pull request URL").option("-n, --notes <text>","Resolution notes").option("--wont-fix","Mark as will not fix").action(async(t,o)=>{let{triageResolveCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});r.command("note <id> <note>").description("Add a note to an incident").action(async(t,o)=>{let{triageNoteCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});r.command("link <id1> <id2>").description("Link two related incidents").action(async(t,o)=>{let{triageLinkCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});var g=r.command("patterns").description("Manage failure patterns");g.command("list").alias("ls").description("List all patterns").option("--source <source>","Filter by source: manual, suggested, imported, community").option("--min-confidence <score>","Minimum confidence score").option("--json","Output as JSON").action(async t=>{let{triagePatternsListCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});g.command("show <id>").description("Show pattern details").option("--json","Output as JSON").action(async(t,o)=>{let{triagePatternsShowCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});g.command("add").description("Create a new pattern").requiredOption("--id <id>","Pattern ID (kebab-case)").requiredOption("--name <name>","Human-readable name").option("--description <text>","Pattern description").option("--symbols <pairs>",'Symbol criteria (e.g., "feature:@checkout,gate:^auth")').option("--error-contains <keywords>","Error keywords (comma-separated)").option("--missing-signals <signals>","Expected missing signals (comma-separated)").option("--strategy <strategy>","Resolution strategy: retry, fallback, fix-data, fix-code, ignore, escalate","fix-code").option("--priority <priority>","Priority: low, medium, high, critical","medium").option("--code-hint <text>","Code hint for resolution").option("--tags <tags>","Tags (comma-separated)").option("--from-incident <id>","Generate suggestion from incident").action(async t=>{let{triagePatternsAddCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});g.command("delete <id>").alias("rm").description("Delete a pattern").action(async t=>{let{triagePatternsDeleteCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});g.command("test <id>").description("Test pattern against historical incidents").option("-l, --limit <number>","Max incidents to test against","100").option("--json","Output as JSON").action(async(t,o)=>{let{triagePatternsTestCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});g.command("seed").description("Load built-in seed patterns").action(async()=>{let{triagePatternsSeedCommand:t}=await import('./triage-FCWOZASE.js');await t();});g.action(async()=>{let{triagePatternsListCommand:t}=await import('./triage-FCWOZASE.js');await t({});});r.command("export <type>").description("Export patterns or full backup (type: patterns, backup)").option("-o, --output <path>","Output file path").option("--include-private","Include private patterns").action(async(t,o)=>{let{triageExportCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});r.command("import <file>").description("Import patterns from JSON file").option("--overwrite","Overwrite existing patterns").action(async(t,o)=>{let{triageImportCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});r.command("restore <file>").description("Restore from full backup").action(async t=>{let{triageRestoreCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});r.command("stats").description("Show statistics dashboard").option("-p, --period <period>","Time period: 1d, 7d, 30d, 90d","7d").option("--symbol <symbol>","Show health for specific symbol").option("--json","Output as JSON").action(async t=>{let{triageStatsCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});r.command("record").description("Manually record an incident").requiredOption("--error <message>","Error message").requiredOption("-e, --env <environment>","Environment").option("--feature <symbol>","Feature symbol (@...)").option("--component <symbol>","Component symbol (#...)").option("--flow <symbol>","Flow symbol ($...)").option("--gate <symbol>","Gate symbol (^...)").option("--signal <symbol>","Signal symbol (!...)").option("--state <symbol>","State symbol (%...)").option("--integration <symbol>","Integration symbol (&...)").option("--service <name>","Service name").option("--version <version>","App version").option("--stack <trace>","Stack trace").option("--json","Output as JSON").action(async t=>{let{triageRecordCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});r.option("-l, --limit <number>","Maximum incidents to show","10").option("-s, --status <status>","Filter by status").option("--json","Output as JSON").action(async t=>{let{triageListCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});var c=i.command("lore").description("Project lore - timeline of everything that happened to this project");c.command("list").alias("ls").description("List recent lore entries").option("--author <author>","Filter by author").option("--type <type>","Filter by type: agent-session, human-note, decision, review, incident, milestone, retro, insight").option("--symbol <symbol>","Filter by symbol").option("--tags <tags>","Filter by tags (comma-separated)").option("--from <date>","Filter from date (ISO format, e.g., 2026-02-20)").option("--to <date>","Filter to date (ISO format)").option("-l, --limit <number>","Number of entries","20").option("--json","Output as JSON").action(async t=>{let{loreListCommand:o}=await import('./list-YKIQNKGB.js');await o(t);});c.command("show <id>").description("Show full detail for a lore entry").option("--json","Output as JSON").action(async(t,o)=>{let{loreShowCommand:a}=await import('./show-PJ5LFLIL.js');await a(t,o);});c.command("record").description("Record a new lore entry (human note, milestone, etc.)").option("--type <type>","Entry type: human-note, decision, milestone, retro, insight","human-note").option("--author <author>","Author name").option("--title <title>","Entry title").option("--summary <summary>","Entry summary").option("--symbols <symbols>","Comma-separated symbols").option("--tags <tags>","Comma-separated tags").option("--files-modified <files>","Comma-separated files modified").option("--files-created <files>","Comma-separated files created").option("--commit <hash>","Git commit hash").option("--learnings <items>","Comma-separated learnings").option("--duration <minutes>","Duration in minutes").option("--meta <json>",`Project-defined metadata as JSON (e.g., '{"sprint": 12}')`).option("--body <text>","Long-form content (detailed notes, rationale, etc.)").option("--link-lore <ids>","Comma-separated lore entry IDs to link").option("--link-commits <shas>","Comma-separated git commit SHAs to link").option("--confidence <number>","Confidence in correctness (0.0 to 1.0)").action(async t=>{let{loreRecordCommand:o}=await import('./record-YXPB34MY.js');await o(t);});c.command("review <id>").description("Add a review to a lore entry").option("--reviewer <name>","Reviewer name").option("--completeness <n>","Completeness score (1-5)","3").option("--quality <n>","Quality score (1-5)","3").option("--notes <text>","Review notes").action(async(t,o)=>{let{loreReviewCommand:a}=await import('./review-77QI6VOC.js');await a(t,o);});c.command("assess <id> <verdict>").description("Record an assessment verdict on a lore entry (correct/partial/incorrect)").option("--assessor <name>","Assessor name").option("--notes <text>","Assessment notes").action(async(t,o,a)=>{let{loreAssessCommand:n}=await import('./assess-UFPYEJKP.js');await n(t,o,a);});c.command("calibration").description("Show calibration statistics across assessed lore entries").option("--symbol <symbol>","Filter by symbol").option("--tag <tag>","Filter by tag").option("--author <author>","Filter by author").option("--group-by <dimension>","Group by: symbol, tag, type").option("--json","Output as JSON").action(async t=>{let{loreCalibrationCommand:o}=await import('./calibration-OLJYB5HN.js');await o(t);});c.command("edit <id>").description("Edit an existing lore entry").option("--title <title>","New title").option("--summary <summary>","New summary").option("--type <type>","New type: agent-session, human-note, decision, review, incident, milestone").option("--symbols <symbols>","Comma-separated symbols").option("--tags <tags>","Comma-separated tags").option("--learnings <items>","Comma-separated learnings").action(async(t,o)=>{let{loreEditCommand:a}=await import('./edit-GUU3HBVW.js');await a(t,o);});c.command("delete <id>").description("Delete a lore entry").option("-y, --yes","Skip confirmation").option("--dry-run","Show what would be deleted without making changes").action(async(t,o)=>{let{loreDeleteCommand:a}=await import('./delete-P5VULXR4.js');await a(t,o);});c.command("migrate-assessments").description("Migrate assessment entries to lore with arc: tags").option("--dry-run","Show what would be migrated without making changes").action(async t=>{let{loreMigrateAssessmentsCommand:o}=await import('./migrate-assessments-GEI5WMI2.js');await o(t);});c.command("retag").description("Add or remove tags from matching lore entries").option("--add <tag>","Tag to add").option("--remove <tag>","Tag to remove").option("--type <type>","Filter by entry type").option("--symbol <symbol>","Filter by symbol").option("--author <author>","Filter by author").option("--from <date>","Filter from date").option("--to <date>","Filter to date").option("--tags <tags>","Filter by existing tags (comma-separated)").option("--dry-run","Show what would change without making changes").action(async t=>{let{loreRetagCommand:o}=await import('./retag-N5XF3KXP.js');await o(t);});c.command("timeline").description("Show lore timeline grouped by date with hot symbols and authors").option("-l, --limit <number>","Number of entries","20").option("--json","Output as JSON").action(async t=>{let{loreTimelineCommand:o}=await import('./timeline-K3ZFKJ3R.js');await o(t);});c.option("-p, --port <port>","Port to run on","3840").option("--no-open","Don't open browser automatically").action(async t=>{let{loreServeCommand:o}=await import('./serve-L52ZUTU6.js');await o(void 0,t);});i.command("serve").description("Launch Paradigm Platform \u2014 unified development management UI").option("-p, --port <port>","Port to run on","3850").option("--no-open","Don't open browser automatically").option("--sections <list>","Comma-separated sections to enable (e.g., lore,graph,git)").action(async t=>{let{serveCommand:o}=await import('./serve-JE6UF5P2.js');await o(t);});var X=i.command("graph").description("Interactive symbol relationship graph").argument("[path]","Project directory",void 0).option("-p, --port <port>","Port to run on","3841").option("--no-open","Don't open browser automatically").action(async(t,o)=>{let{graphCommand:a}=await import('./graph-CNDE5TAT.js');await a(t,o);});X.command("generate").description("Generate a named graph file in .paradigm/graphs/").argument("<name>","Graph name (used as filename: {name}.graph.json)").argument("[path]","Project directory",void 0).option("-s, --symbols <list>","Comma-separated symbol names to include").option("-g, --group <spec...>",'Group spec: "Label:#sym1,#sym2" (repeatable)').option("-l, --link <spec...>",'Link spec: "Source>Target:label" (repeatable)').action(async(t,o,a)=>{let{graphGenerateCommand:n}=await import('./graph-CNDE5TAT.js');await n(t,o,a);});var m=i.command("habits").description("Behavioral habits - practice tracking and compliance");m.command("list").alias("ls").description("List all configured habits").option("--trigger <trigger>","Filter by trigger: preflight, postflight, on-stop, on-commit").option("--category <category>","Filter by category: discovery, verification, testing, documentation, collaboration, security").option("--json","Output as JSON").action(async t=>{let{habitsListCommand:o}=await import('./habits-LX5IWCZM.js');await o(t);});m.command("status").description("Show practice profile with compliance rates").option("-p, --period <period>","Time period: 7d, 30d, 90d, all","30d").option("--json","Output as JSON").action(async t=>{let{habitsStatusCommand:o}=await import('./habits-LX5IWCZM.js');await o(t);});m.command("init").description("Initialize habits.yaml with seed habits").option("-f, --force","Overwrite existing file").action(async t=>{let{habitsInitCommand:o}=await import('./habits-LX5IWCZM.js');await o(t);});m.command("check").description("Evaluate habit compliance for a trigger point").requiredOption("-t, --trigger <trigger>","Trigger: preflight, postflight, on-stop, on-commit").option("--record","Record practice events to Sentinel").option("--json","Output as JSON").option("--files <files>","Comma-separated files modified (default: git diff)").option("--symbols <symbols>","Comma-separated symbols touched").action(async t=>{let{habitsCheckCommand:o}=await import('./habits-LX5IWCZM.js');await o(t);});m.command("add").description("Add a custom habit").requiredOption("--id <id>","Habit ID (kebab-case)").requiredOption("--name <name>","Human-readable name").requiredOption("--description <desc>","What this habit enforces").requiredOption("--category <category>","Category: discovery, verification, testing, documentation, collaboration, security").requiredOption("--trigger <trigger>","Trigger: preflight, postflight, on-stop, on-commit").option("--severity <severity>","Severity: advisory, warn, block","advisory").option("--tools <tools>","Comma-separated tools to check (for tool-called check type)").option("--check-type <type>","Check type: tool-called, file-exists, file-modified, lore-recorded, symbols-registered, gates-declared, tests-exist, git-clean","tool-called").option("--patterns <patterns>","Comma-separated patterns (for file-exists, file-modified, tests-exist check types)").action(async t=>{let{habitsAddCommand:o}=await import('./habits-LX5IWCZM.js');await o({...t,checkType:t.checkType});});m.command("edit <id>").description("Edit a habit (seed habits: only severity/enabled; custom: all fields)").option("--name <name>","New name").option("--description <desc>","New description").option("--category <category>","New category").option("--trigger <trigger>","New trigger").option("--severity <severity>","New severity: advisory, warn, block").option("--enabled <bool>","Enable or disable: true, false").option("--check-type <type>","New check type").option("--patterns <patterns>","Comma-separated patterns").option("--tools <tools>","Comma-separated tools").action(async(t,o)=>{let{habitsEditCommand:a}=await import('./habits-LX5IWCZM.js');await a(t,{...o,checkType:o.checkType});});m.command("remove <id>").description("Remove a custom habit (seed habits cannot be removed, only disabled)").option("-y, --yes","Skip confirmation").action(async(t,o)=>{let{habitsRemoveCommand:a}=await import('./habits-LX5IWCZM.js');await a(t,o);});m.command("enable <id>").description("Enable a habit").action(async t=>{let{habitsToggleCommand:o}=await import('./habits-LX5IWCZM.js');await o(t,"enable");});m.command("disable <id>").description("Disable a habit").action(async t=>{let{habitsToggleCommand:o}=await import('./habits-LX5IWCZM.js');await o(t,"disable");});m.action(async()=>{let{habitsListCommand:t}=await import('./habits-LX5IWCZM.js');await t({});});var D=i.command("graduate").description("Automation tier graduation \u2014 migrate habits to hooks");D.command("status",{isDefault:true}).description("Show current automation tier of every habit").option("--json","Output as JSON").action(async t=>{let{graduateStatusCommand:o}=await import('./graduate-3BBSC27A.js');await o(t);});D.command("promote <habitId>").description("Graduate a habit to hook tier (skip MCP evaluation)").action(async t=>{let{graduatePromoteCommand:o}=await import('./graduate-3BBSC27A.js');await o(t);});D.command("demote <habitId>").description("Demote a habit from hook back to habit tier").option("--cooldown <days>","Cooldown period in days before re-graduation","14").action(async(t,o)=>{let{graduateDemoteCommand:a}=await import('./graduate-3BBSC27A.js');await a(t,o);});var h=i.command("persona").description("Personas \u2014 actor-driven journey testing");h.command("list",{isDefault:true}).alias("ls").description("List all personas").option("--tag <tag>","Filter by tag").option("--trigger <type>","Filter by trigger type (root, invitation, signup, api)").option("--gate <gate>","Filter by gate usage").option("--json","Output as JSON").action(async t=>{let{personaListCommand:o}=await import('./persona-STQWZH5P.js');await o(t);});h.command("show <id>").description("Show full persona detail").option("--json","Output as JSON").action(async(t,o)=>{let{personaShowCommand:a}=await import('./persona-STQWZH5P.js');await a(t,o);});h.command("validate [id]").description("Validate persona schema and cross-references").option("--json","Output as JSON").action(async(t,o)=>{let{personaValidateCommand:a}=await import('./persona-STQWZH5P.js');await a(t,o);});h.command("coverage").description("Coverage report \u2014 routes and gates with/without persona coverage").option("--json","Output as JSON").action(async t=>{let{personaCoverageCommand:o}=await import('./persona-STQWZH5P.js');await o(t);});h.command("run <id>").description("Execute persona journey against a running server").requiredOption("--base-url <url>","Base URL (e.g. http://localhost:3000)").option("--dry-run","Show steps without making HTTP requests").option("--json","Output as JSON").action(async(t,o)=>{let{personaRunCommand:a}=await import('./persona-STQWZH5P.js');await a(t,o);});h.command("affected <symbol>").description("Show which personas reference a given symbol (gate, flow, signal)").option("--json","Output as JSON").action(async(t,o)=>{let{personaAffectedCommand:a}=await import('./persona-STQWZH5P.js');await a(t,o);});h.command("delete <id>").description("Delete a persona").action(async t=>{let{personaDeleteCommand:o}=await import('./persona-STQWZH5P.js');await o(t);});var Y=i.command("sentinel").description("Sentinel \u2014 semantic error monitoring");Y.command("defend [path]",{isDefault:true}).description("Launch the Sentinel UI - unified codebase intelligence visualizer").option("-p, --port <port>","Port to run on","3838").option("--no-open","Don't open browser automatically").action(async(t,o)=>{let{sentinelCommand:a}=await import('./sentinel-HYAZ3CO5.js');await a(t,o);});i.command("conductor").description("Launch Paradigm Conductor \u2014 multimodal mission control for Claude Code sessions").option("--build","Force rebuild the native binary").option("--install","Install Conductor binary to ~/.paradigm/conductor/bin/").option("-v, --verbose","Show build output").action(async t=>{let{conductorCommand:o}=await import('./conductor-Y5IXELTL.js');await o(t);});var p=i.command("university").description("Per-project university - knowledge base, quizzes, learning paths & PLSAT certification");p.command("serve").description("Launch Paradigm University learning platform").option("-p, --port <port>","Port to run on","3839").option("--no-open","Don't open browser automatically").action(async t=>{let{universityServeCommand:o}=await import('./serve-OY6XYL7F.js');await o(void 0,t);});p.command("list").alias("ls").description("List university content").option("--type <type>","Filter by type: note, policy, guide, runbook, quiz, path").option("--tag <tag>","Filter by tag").option("--difficulty <level>","Filter by difficulty: beginner, intermediate, advanced").option("--symbol <symbol>","Filter by Paradigm symbol").option("-l, --limit <number>","Number of entries","20").option("--json","Output as JSON").action(async t=>{let{universityListCommand:o}=await import('./list-5IUGP3ZB.js');await o(t);});p.command("add <type>").description("Create university content (note, policy, guide, runbook, quiz)").option("--title <title>","Content title (required)").option("--body <text>","Content body (markdown)").option("--tags <tags>","Comma-separated tags").option("--symbols <symbols>","Comma-separated Paradigm symbols").option("--difficulty <level>","Difficulty: beginner, intermediate, advanced").option("--minutes <n>","Estimated reading time in minutes").action(async(t,o)=>{let{universityAddCommand:a}=await import('./add-P76GEMGF.js');await a(t,o);});p.command("show <id>").description("Show a content item in full").option("--json","Output as JSON").action(async(t,o)=>{let{universityShowCommand:a}=await import('./show-BOAVWZPZ.js');await a(t,o);});p.command("quiz <id>").description("Take an interactive quiz in the terminal").action(async t=>{let{universityQuizCommand:o}=await import('./quiz-FE5UGAY2.js');await o(t);});p.command("status").description("Show university content overview and completion stats").option("--json","Output as JSON").action(async t=>{let{universityStatusCommand:o}=await import('./status-A37ECYNJ.js');await o(t);});p.command("validate").description("Validate university content integrity").option("--deep","Enable deep cross-reference checks against scan-index").option("--id <id>","Validate a specific content item").option("--json","Output as JSON").action(async t=>{let{universityValidateCommand:o}=await import('./validate-C6SMKGYD.js');await o(t);});p.option("-p, --port <port>","Port to run on","3839").option("--no-open","Don't open browser automatically").action(async t=>{let{universityServeCommand:o}=await import('./serve-OY6XYL7F.js');await o(void 0,t);});var L=i.command("docs").description("Auto-generated documentation from the symbol graph");L.command("serve").description("Launch interactive docs viewer in browser").option("-p, --port <port>","Port number (default: 3850)").option("--no-open","Do not open browser automatically").action(async t=>{let{docsServeCommand:o}=await import('./docs-RXPN6CK7.js');await o(t);});L.command("build").description("Build static documentation site").option("-o, --output <dir>","Output directory (default: from config or .paradigm/docs-site)").action(async t=>{let{docsBuildCommand:o}=await import('./docs-RXPN6CK7.js');await o(t);});L.action(async()=>{let{docsServeCommand:t}=await import('./docs-RXPN6CK7.js');await t({});});var f=i.command("pipeline").description("Spec pipeline \u2014 structured feature workflow with configurable gates");f.command("start <description>").description("Create a new pipeline for a feature").option("--template <template>","Pipeline template (add-feature, bug-fix, security-change, refactor)","add-feature").option("--gates <gates>","Custom gate modes: specify,plan,task,implement,validate").action(async(t,o)=>{let{pipelineStartCommand:a}=await import('./pipeline-MZUITRVN.js');await a(t,o);});f.command("status [feature]").description("Show pipeline status").action(async t=>{let{pipelineStatusCommand:o}=await import('./pipeline-MZUITRVN.js');await o(t);});f.command("advance <feature>").description("Advance pipeline past current gate").action(async t=>{let{pipelineAdvanceCommand:o}=await import('./pipeline-MZUITRVN.js');await o(t);});f.command("configure <feature>").description("Change gate mode on active pipeline").requiredOption("--stage <stage>","Stage to configure").requiredOption("--gate <gate>","New gate mode (auto, manual, sentinel)").option("--reason <reason>","Reason for change").action(async(t,o)=>{let{pipelineConfigureCommand:a}=await import('./pipeline-MZUITRVN.js');await a(t,o);});f.command("abort <feature>").description("Cancel a pipeline").action(async t=>{let{pipelineAbortCommand:o}=await import('./pipeline-MZUITRVN.js');await o(t);});f.command("list").description("List all active pipelines").action(async()=>{let{pipelineListCommand:t}=await import('./pipeline-MZUITRVN.js');await t();});f.action(async()=>{let{pipelineListCommand:t}=await import('./pipeline-MZUITRVN.js');await t();});var e=i.command("symphony").description("Symphony \u2014 agent-to-agent messaging for multi-session collaboration");e.command("join").description("Join this session to the Symphony network").option("--remote <ip>","Connect to remote Symphony server").action(async t=>{let{symphonyJoinCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});e.command("leave").description("Remove this session from the Symphony network").action(async()=>{let{symphonyLeaveCommand:t}=await import('./symphony-QI63XL62.js');await t();});e.command("whoami").description("Show this agent's identity and linked peers").action(async()=>{let{symphonyWhoamiCommand:t}=await import('./symphony-QI63XL62.js');await t();});e.command("list").alias("ls").description("List all joined agents").option("--json","Output as JSON").action(async t=>{let{symphonyListCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});e.command("send <message>").description("Send a note to agents").option("--to <agent>","Send to specific agent (omit for broadcast)").option("--thread <id>","Reply to existing thread").action(async(t,o)=>{let{symphonySendCommand:a}=await import('./symphony-QI63XL62.js');await a(t,o);});e.command("read").description("Show unread notes").action(async()=>{let{symphonyReadCommand:t}=await import('./symphony-QI63XL62.js');await t();});e.command("inbox").description("Show unread notes (alias for read)").action(async()=>{let{symphonyReadCommand:t}=await import('./symphony-QI63XL62.js');await t();});e.command("threads").description("List all threads").option("--json","Output as JSON").action(async t=>{let{symphonyThreadsCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});e.command("thread <id>").description("Show full thread conversation").action(async t=>{let{symphonyThreadCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});e.command("resolve <id>").description("Mark a thread as resolved").option("--decision <text>","Decision text to record").action(async(t,o)=>{let{symphonyResolveCommand:a}=await import('./symphony-QI63XL62.js');await a(t,o);});e.command("status").description("Show Symphony network status").option("--json","Output as JSON").action(async t=>{let{symphonyStatusCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});e.command("serve").description("Start Symphony relay server for cross-machine networking").option("--port <port>","Port to listen on","3939").option("--public","Show connection string for internet access").action(async t=>{let{symphonyServeCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});var q=e.command("peers").description("Manage trusted remote peers");q.command("list",{isDefault:true}).description("List trusted peers and their agents").option("--json","Output as JSON").action(async t=>{let{symphonyPeersCommand:o}=await import('./peers-P2KXU7ZK.js');await o(t);});q.command("revoke <id>").description("Revoke trust for a peer (disconnects immediately)").action(async t=>{let{symphonyPeersRevokeCommand:o}=await import('./peers-P2KXU7ZK.js');await o(t);});q.command("forget").description("Clear all peer trust records").option("--force","Skip confirmation").action(async t=>{let{symphonyPeersForgetCommand:o}=await import('./peers-P2KXU7ZK.js');await o(t);});q.action(async()=>{let{symphonyPeersCommand:t}=await import('./peers-P2KXU7ZK.js');await t({});});e.command("request <file>").description("Request a file from another agent").option("--from <agent>","Agent to request from").option("--reason <text>","Why this file is needed").action(async(t,o)=>{let{symphonyRequestCommand:a}=await import('./symphony-QI63XL62.js');await a(t,o);});e.command("requests").description("List pending file requests").action(async()=>{let{symphonyRequestsCommand:t}=await import('./symphony-QI63XL62.js');await t();});e.command("approve <id>").description("Approve a file request").option("--redact","Strip sensitive lines before sending").action(async(t,o)=>{let{symphonyApproveCommand:a}=await import('./symphony-QI63XL62.js');await a(t,o);});e.command("deny <id>").description("Deny a file request").option("--reason <text>","Reason for denial").action(async(t,o)=>{let{symphonyDenyCommand:a}=await import('./symphony-QI63XL62.js');await a(t,o);});e.command("watch").description("Watch inbox in real-time \u2014 zero AI tokens, pure file monitoring").option("--interval <ms>","Poll interval in milliseconds (default: 2000)").option("--thread <id>","Only show messages from this thread").option("--quiet","Minimal output \u2014 messages only, no header").action(async t=>{let{symphonyWatchCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});e.action(async()=>{let{symphonyStatusCommand:t}=await import('./symphony-QI63XL62.js');await t({});});var J=i.command("notebook").description("Agent notebook management \u2014 curated snippet libraries");J.command("list").alias("ls").description("List notebook entries").option("--agent <id>","Filter by agent ID").option("--json","Output as JSON").action(async t=>{let{notebookListCommand:o}=await import('./notebook-PE3JSYZI.js');await o(t);});J.command("show <id>").description("Show a specific notebook entry").option("--agent <id>","Agent ID").option("--json","Output as JSON").action(async(t,o)=>{let{notebookShowCommand:a}=await import('./notebook-PE3JSYZI.js');await a(t,o);});J.command("export").description("Export notebook entries").option("--agent <id>","Filter by agent ID").option("--format <format>","Output format: yaml or json (default: yaml)").action(async t=>{let{notebookExportCommand:o}=await import('./notebook-PE3JSYZI.js');await o(t);});J.action(async()=>{let{notebookListCommand:t}=await import('./notebook-PE3JSYZI.js');await t({});});var d=i.command("agent").description("Agent identity management \u2014 persistent profiles with expertise tracking");d.command("list").alias("ls").description("List all agent identity profiles").option("--json","Output as JSON").option("--global","Show only global profiles").option("--project","Show only project-level profiles").action(async t=>{let{agentListCommand:o}=await import('./agent-UUTYOFTH.js');await o(t);});d.command("show <id>").description("Show full agent profile with expertise table").option("--json","Output as JSON").action(async(t,o)=>{let{agentShowCommand:a}=await import('./agent-UUTYOFTH.js');await a(t,o);});d.command("create <id>").description("Create a new .agent identity file").option("-r, --role <role>","Agent role description").option("-d, --description <desc>","Extended description").option("-g, --global","Create in global ~/.paradigm/agents/ (default)").option("--deny-paths <patterns>",'Comma-separated glob patterns to deny (e.g., ".env*,*.key")').action(async(t,o)=>{let{agentCreateCommand:a}=await import('./agent-UUTYOFTH.js');await a(t,{...o,global:o.global!==false});});d.command("sync <id>").description("Bootstrap expertise from existing project lore").option("-n, --dry-run","Show what would change without writing").option("--json","Output as JSON").action(async(t,o)=>{let{agentSyncCommand:a}=await import('./agent-UUTYOFTH.js');await a(t,o);});var A=d.command("roster").description("Manage per-project agent roster (.paradigm/roster.yaml)");A.command("init").description("Create a roster based on detected project type").option("-f, --force","Overwrite existing roster").option("--json","Output as JSON").action(async t=>{let{rosterInitCommand:o}=await import('./roster-K2QILE7K.js');await o(t);});A.command("add <ids...>").description("Add one or more agents to the active roster").option("--json","Output as JSON").action(async(t,o)=>{let{rosterAddCommand:a}=await import('./roster-K2QILE7K.js');await a(t,o);});A.command("remove <ids...>").description("Remove one or more agents from the active roster").option("--json","Output as JSON").action(async(t,o)=>{let{rosterRemoveCommand:a}=await import('./roster-K2QILE7K.js');await a(t,o);});A.option("--json","Output as JSON").action(async t=>{let{rosterShowCommand:o}=await import('./roster-K2QILE7K.js');await o(t);});d.command("bench <id>").description("Bench an agent \u2014 Maestro will skip it during orchestration").action(async t=>{let{agentBenchCommand:o}=await import('./agent-UUTYOFTH.js');await o(t);});d.command("activate <id>").description("Activate a benched agent \u2014 restore to Maestro orchestration").action(async t=>{let{agentActivateCommand:o}=await import('./agent-UUTYOFTH.js');await o(t);});d.action(async()=>{let{agentListCommand:t}=await import('./agent-UUTYOFTH.js');await t({});});var O=i.command("enforcement").description("Manage enforcement configuration (check severities and levels)");O.command("set <level>").description("Set enforcement level preset (strict, balanced, minimal)").action(async t=>{let{enforcementSetCommand:o}=await import('./enforcement-MKFUH4TE.js');await o(t);});O.command("override <check-id> <severity>").description("Set a per-check severity override (block, warn, off)").action(async(t,o)=>{let{enforcementOverrideCommand:a}=await import('./enforcement-MKFUH4TE.js');await a(t,o);});O.command("reset [check-id]").description("Remove a per-check override, or all overrides if no check-id given").action(async t=>{let{enforcementResetCommand:o}=await import('./enforcement-MKFUH4TE.js');await o(t);});O.command("resolve").description("Output the fully resolved severity map (used by stop hook)").option("--json","Output as JSON").action(async t=>{let{enforcementResolveCommand:o}=await import('./enforcement-MKFUH4TE.js');await o(t);});O.command("status",{isDefault:true}).description("Show enforcement status table (default)").option("--json","Output as JSON").action(async t=>{let{enforcementStatusCommand:o}=await import('./enforcement-MKFUH4TE.js');await o(t);});i.command("compliance-check").description("Run all compliance checks (habits, drift, portal) in a single process").option("--json","Output as JSON").option("--auto-heal","Auto-heal drift violations").option("--trigger <event>","Trigger context (e.g., on-stop)","on-stop").option("--learn","Run postflight learning pass (convert session verdicts to journal entries)").action(async t=>{let{complianceCheckCommand:o}=await import('./compliance-TSXLXADI.js');await o(t);});i.parse();
16
+ `),console.log("Commands:"),console.log(" suggest <task> Suggest agents for a task based on triggers"),console.log("\nRun `paradigm team agents suggest --help` for options.\n");});s.action(async()=>{let{teamStatusCommand:t}=await import('./team-MKLPUTW7.js');await t(void 0,{});});var U=i.command("plugin").description("Plugin management commands");U.command("check").description("Check for updates to installed Claude Code plugins").option("-u, --update","Pull latest changes for all stale marketplace clones").action(async t=>{let{pluginCheckCommand:o}=await import('./check-THVGY4R5.js');await o(t);});U.action(async()=>{let{pluginCheckCommand:t}=await import('./check-THVGY4R5.js');await t({});});var j=i.command("workspace").description("Multi-project workspace commands");j.command("init").description("Create a .paradigm-workspace file from sibling projects").option("-n, --name <name>","Workspace name (default: directory name)").option("-f, --force","Overwrite existing workspace file").action(async t=>{let{workspaceInitCommand:o}=await import('./workspace-2ODL5WLY.js');await o(t);});j.command("status").description("Show workspace member status and symbol counts").option("--json","Output as JSON").action(async t=>{let{workspaceStatusCommand:o}=await import('./workspace-2ODL5WLY.js');await o(t);});j.command("reindex").description("Rebuild scan-index.json for all workspace members").option("-q, --quiet","Suppress progress output").action(async t=>{let{workspaceReindexCommand:o}=await import('./workspace-2ODL5WLY.js');await o(t);});j.action(async()=>{let{workspaceStatusCommand:t}=await import('./workspace-2ODL5WLY.js');await t({});});i.command("doctor").description("Health check - validate Paradigm setup").option("--context","Run only context audit checks (CLAUDE.md quality)").action(async t=>{let{doctorCommand:o}=await import('./doctor-HMQBF2WK.js');await o(t);});i.command("integrity").description("Symbol integrity check \u2014 broken refs, duplicates, orphans, missing anchors").option("--json","Output machine-readable JSON").action(async t=>{let{integrityCommand:o}=await import('./integrity-UYDOOJDP.js');await o(t);});i.command("review").description("Automated two-stage review pipeline \u2014 spec compliance + code quality").option("--pr <number>","Review a PR via gh CLI").option("--ci","Exit 1 on blocking findings").option("--deep","Include code quality checks (eval, secrets, console.log)").option("--json","Output machine-readable JSON").action(async t=>{let{reviewCommand:o}=await import('./review-6UAH6V3R.js');await o(t);});i.command("sweep").description("Entropy detection and cleanup \u2014 find orphaned symbols, stale purpose files, phantom gates").option("--dry","Report only, no fixes applied").option("--skip-fix","Same as --dry").option("-q, --quiet","Minimal output").action(async t=>{let{sweepCommand:o}=await import('./sweep-HU74OPVW.js');await o(t);});var K=i.command("drift").description("Aspect anchor drift detection");K.command("check").description("Check aspect anchors for drift and auto-heal shifted anchors").option("--json","Output as JSON").option("--auto-heal","Auto-heal shifted anchors (default: true)").option("--no-auto-heal","Disable auto-healing").action(async t=>{let{driftCheckCommand:o}=await import('./drift-ILZE5BFJ.js');await o(t);});var I=i.command("global").description("Manage Global Brain (~/.paradigm/)");I.command("clean").description("Remove old files from ~/.paradigm/ (Global Brain rotation)").option("--older-than <duration>","Remove files older than duration (e.g., 90d, 30d, 7d)","90d").option("-n, --dry-run","Show what would be deleted without deleting").action(async t=>{let{globalCleanCommand:o}=await import('./global-C44FW4G2.js');await o(t);});I.action(()=>{I.outputHelp();});i.command("watch").description("Watch for changes and auto-sync IDE files").action(async()=>{let{watchCommand:t}=await import('./watch-LRM5XD46.js');await t();});i.command("summary").description("Generate .paradigm/project.md with project stats").action(async()=>{let{summaryCommand:t}=await import('./summary-ZJLQ6KHB.js');await t();});i.command("constellation [path]").alias("const").description("Generate .paradigm/constellation.json - symbol relationship graph for AI agents").option("-f, --format <format>","Output format: json or yaml","json").option("-o, --output <path>","Custom output path").option("-q, --quiet","Suppress output").action(async(t,o)=>{let{constellationCommand:a}=await import('./constellation-CG7C4WFE.js');await a(t,o);});i.command("beacon [path]").description("Generate .paradigm/beacon.md - quick-start orientation for AI agents").option("-r, --refresh","Regenerate even if beacon exists").option("-o, --output <path>","Custom output path").option("--json","Output as JSON (for AI agent queries)").option("-q, --quiet","Suppress output").action(async(t,o)=>{let{beaconCommand:a}=await import('./beacon-5QVYV5DF.js');await a(t,o);});i.command("ripple <symbol> [path]").description("Show change impact analysis for a symbol").option("-d, --depth <depth>","Analysis depth (default: 1)","1").option("--json","Output as JSON").option("-q, --quiet","Suppress output").action(async(t,o,a)=>{let{rippleCommand:n}=await import('./ripple-ZGDITCGB.js');await n(t,o,a);});var b=i.command("thread").description("Session continuity - pass context between AI agent sessions");b.command("show [path]").alias("s").description("Show current thread").option("--json","Output as JSON (for AI agent queries)").action(async(t,o)=>{let{threadShowCommand:a}=await import('./thread-HFXK65D4.js');await a(t,o);});b.command("save <message> [path]").description("Save activity to the thread trail").option("-q, --quiet","Suppress output").action(async(t,o,a)=>{let{threadSaveCommand:n}=await import('./thread-HFXK65D4.js');await n(t,o,a);});b.command("todo <task> [path]").description("Add a loose end (unfinished task)").option("-q, --quiet","Suppress output").action(async(t,o,a)=>{let{threadTodoCommand:n}=await import('./thread-HFXK65D4.js');await n(t,o,a);});b.command("note <note> [path]").description("Add a breadcrumb (note for next agent)").option("-q, --quiet","Suppress output").action(async(t,o,a)=>{let{threadNoteCommand:n}=await import('./thread-HFXK65D4.js');await n(t,o,a);});b.command("clear [path]").description("Clear the thread").option("-q, --quiet","Suppress output").action(async(t,o)=>{let{threadClearCommand:a}=await import('./thread-HFXK65D4.js');await a(t,o);});b.option("--json","Output as JSON (for AI agent queries)").action(async t=>{let{threadShowCommand:o}=await import('./thread-HFXK65D4.js');await o(void 0,t);});var x=i.command("echo").description("Error-to-symbol mapping - find related symbols for error codes");x.command("lookup <errorCode> [path]").alias("l").description("Look up an error code").option("--json","Output as JSON (for AI agent queries)").action(async(t,o,a)=>{let{echoCommand:n}=await import('./echo-UPTQUEDU.js');await n(t,o,a);});x.command("init [path]").description("Create .paradigm/echoes.yaml template").option("-q, --quiet","Suppress output").action(async(t,o)=>{let{echoInitCommand:a}=await import('./echo-UPTQUEDU.js');await a(t,o);});x.command("list [path]").alias("ls").description("List all error mappings").action(async t=>{let{echoListCommand:o}=await import('./echo-UPTQUEDU.js');await o(t);});x.argument("[errorCode]","Error code to look up").option("--json","Output as JSON (for AI agent queries)").action(async(t,o)=>{if(t){let{echoCommand:a}=await import('./echo-UPTQUEDU.js');await a(t,void 0,o);}else {let{echoListCommand:a}=await import('./echo-UPTQUEDU.js');await a();}});var u=i.command("tutorial").description("Interactive tutorial system");u.command("start [path]").description("Start the tutorial").action(async t=>{let{tutorialStartCommand:o}=await import('./tutorial-UC6YQMNN.js');await o(t);});u.command("step [n] [path]").description("Show tutorial step").action(async(t,o)=>{let{tutorialStepCommand:a}=await import('./tutorial-UC6YQMNN.js');await a(o,t);});u.command("checkpoint [path]").description("Validate current checkpoint").action(async t=>{let{tutorialCheckpointCommand:o}=await import('./tutorial-UC6YQMNN.js');await o(t);});u.command("next [path]").description("Move to next step").action(async t=>{let{tutorialNextCommand:o}=await import('./tutorial-UC6YQMNN.js');await o(t);});u.command("status [path]").description("Show tutorial progress").action(async t=>{let{tutorialStatusCommand:o}=await import('./tutorial-UC6YQMNN.js');await o(t);});u.command("reset [path]").description("Reset tutorial to beginning").action(async t=>{let{tutorialResetCommand:o}=await import('./tutorial-UC6YQMNN.js');await o(t);});u.command("bugs [path]").description("List intentional bugs").action(async t=>{let{tutorialBugsCommand:o}=await import('./tutorial-UC6YQMNN.js');await o(t);});var w=i.command("mcp").description("MCP server configuration for AI clients");w.command("setup").description("Configure MCP server for detected AI clients").option("-c, --client <client>","Target client: cursor, claude-desktop, continue, cline, all").option("-f, --force","Overwrite existing config").option("--json","Output as JSON").option("--no-gitignore","Do not add config to .gitignore").action(async t=>{let{mcpSetupCommand:o}=await import('./setup-KPIMRZ4Q.js');await o(t);});w.command("status").description("Show MCP configuration status across clients").option("--json","Output as JSON").action(async t=>{let{mcpStatusCommand:o}=await import('./setup-KPIMRZ4Q.js');await o(t);});w.command("list").alias("ls").description("List all configured MCP servers across all clients").option("--json","Output as JSON").action(async t=>{let{mcpListCommand:o}=await import('./setup-KPIMRZ4Q.js');await o(t);});w.command("remove [server]").alias("rm").description("Remove MCP server from client configs").option("-c, --client <client>","Target client: cursor, claude-desktop, continue, cline, all").option("-f, --force","Skip confirmation").option("--json","Output as JSON").action(async(t,o)=>{let{mcpRemoveCommand:a}=await import('./setup-KPIMRZ4Q.js');await a(t,o);});w.command("use-dev").description("Switch MCP configs to use local dev build").option("-c, --client <client>","Target client: cursor, claude-desktop, claude-code, continue, cline").option("--json","Output as JSON").action(async t=>{let{mcpUseDevCommand:o}=await import('./switch-CTW4PDGI.js');await o(t);});w.command("use-prod").description("Switch MCP configs back to global production binary").option("-c, --client <client>","Target client: cursor, claude-desktop, claude-code, continue, cline").option("--json","Output as JSON").action(async t=>{let{mcpUseProdCommand:o}=await import('./switch-CTW4PDGI.js');await o(t);});w.action(async()=>{let{mcpSwitchStatusCommand:t}=await import('./switch-CTW4PDGI.js');await t({});});i.command("promote").description("Copy local build to production (~/.paradigm-cli/)").option("-f, --force","Create production directory if missing").option("--skip-build","Skip npm run build step").option("--json","Output as JSON").action(async t=>{let{promoteCommand:o}=await import('./promote-NJQDZBZA.js');await o(t);});var v=i.command("wisdom").description("Team wisdom - preferences, antipatterns, decisions, expertise");v.command("show [symbol]").description("Display wisdom for symbols or overview").option("--json","Output as JSON").action(async(t,o)=>{let{wisdomShowCommand:a}=await import('./wisdom-XZ3QKPNP.js');await a(t,o);});v.command("init").description("Initialize wisdom directory with templates").option("-f, --force","Overwrite existing files").action(async t=>{let{wisdomInitCommand:o}=await import('./wisdom-XZ3QKPNP.js');await o(t);});v.command("add-antipattern").description("Add a new antipattern").requiredOption("--id <id>","Antipattern ID (e.g., api-001)").requiredOption("--symbols <symbols>","Comma-separated symbols").requiredOption("--description <desc>","What NOT to do").requiredOption("--reason <reason>","Why this is bad").requiredOption("--alternative <alt>","What to do instead").action(async t=>{let{wisdomAddAntipatternCommand:o}=await import('./wisdom-XZ3QKPNP.js');await o(t);});v.command("decide").description("Create a new decision record (ADR)").requiredOption("--id <id>","Decision ID (e.g., 001)").requiredOption("--title <title>","Decision title").requiredOption("--symbols <symbols>","Comma-separated symbols").requiredOption("--context <context>","Context/problem").requiredOption("--decision <decision>","The decision made").option("--status <status>","Status: proposed, accepted","proposed").action(async t=>{let{wisdomDecideCommand:o}=await import('./wisdom-XZ3QKPNP.js');await o(t);});v.command("expert [query]").description("Find experts for symbols or areas").option("--json","Output as JSON").action(async(t,o)=>{let{wisdomExpertCommand:a}=await import('./wisdom-XZ3QKPNP.js');await a(t,o);});v.option("--json","Output as JSON").action(async t=>{let{wisdomShowCommand:o}=await import('./wisdom-XZ3QKPNP.js');await o(void 0,t);});var y=i.command("history").description("Implementation history - tracking changes, validation, fragility");y.command("show [symbol]").description("Display history for symbols or overview").option("--json","Output as JSON").option("-l, --limit <number>","Number of entries","10").action(async(t,o)=>{let{historyShowCommand:a}=await import('./history-UW454SDP.js');await a(t,{...o,limit:parseInt(o.limit)});});y.command("init").description("Initialize history directory").option("-f, --force","Overwrite existing files").action(async t=>{let{historyInitCommand:o}=await import('./history-UW454SDP.js');await o(t);});y.command("fragile").description("Show fragile symbols that need extra care").option("--json","Output as JSON").action(async t=>{let{historyFragileCommand:o}=await import('./history-UW454SDP.js');await o(t);});y.command("reindex").description("Regenerate index from log").action(async()=>{let{historyReindexCommand:t}=await import('./history-UW454SDP.js');await t();});y.command("record").description("Record an implementation event").requiredOption("--type <type>","Type: implement, refactor, rollback").requiredOption("--symbols <symbols>","Comma-separated symbols").requiredOption("--description <desc>","What was done").option("--intent <intent>","Intent: feature, fix, refactor").option("--commit <hash>","Git commit hash").option("--reason <reason>","Reason for rollback").action(async t=>{let{historyRecordCommand:o}=await import('./history-UW454SDP.js');await o(t);});y.command("validate").description("Record a validation result").requiredOption("--result <result>","Result: pass, fail, partial").option("--ref <id>","Implementation ID being validated").option("--passed <n>","Tests passed").option("--failed <n>","Tests failed").action(async t=>{let{historyValidateCommand:o}=await import('./history-UW454SDP.js');await o({...t,passed:t.passed?parseInt(t.passed):void 0,failed:t.failed?parseInt(t.failed):void 0});});y.option("--json","Output as JSON").action(async t=>{let{historyShowCommand:o}=await import('./history-UW454SDP.js');await o(void 0,t);});var N=i.command("hooks").description("Git hooks for automatic history capture");N.command("install").description("Install git hooks, Claude Code hooks, and Cursor hooks").option("-f, --force","Overwrite existing hooks").option("--post-commit","Only install post-commit hook").option("--pre-push","Only install pre-push hook").option("--claude-code","Only install Claude Code hooks (stop + pre-commit)").option("--cursor","Only install Cursor hooks (.cursor/hooks.json)").option("--dry-run","Show what would be installed without making changes").action(async t=>{let{hooksInstallCommand:o}=await import('./hooks-E7HQQ57M.js');await o(t);});N.command("uninstall").description("Remove paradigm hooks (git hooks, or --cursor for Cursor hooks)").option("--cursor","Remove Cursor hooks instead of git hooks").option("--dry-run","Show what would be removed without making changes").action(async t=>{let{hooksUninstallCommand:o}=await import('./hooks-E7HQQ57M.js');await o(t);});N.command("status").description("Check git hooks status").action(async()=>{let{hooksStatusCommand:t}=await import('./hooks-E7HQQ57M.js');await t();});N.action(async()=>{let{hooksStatusCommand:t}=await import('./hooks-E7HQQ57M.js');await t();});var r=i.command("triage").description("Semantic error triage - incident management and pattern matching");r.command("list").alias("ls").description("List recent incidents with matched patterns").option("-l, --limit <number>","Maximum incidents to show","10").option("-s, --status <status>","Filter by status: open, investigating, resolved, wont-fix, all").option("--symbol <symbol>","Filter by symbol (e.g., @checkout, ^auth)").option("-e, --env <environment>","Filter by environment").option("--search <text>","Search in error messages").option("--from <date>","Filter from date (ISO format)").option("--to <date>","Filter to date (ISO format)").option("--json","Output as JSON").action(async t=>{let{triageListCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});r.command("show <id>").description("Show full incident details").option("--timeline","Include flow timeline").option("--json","Output as JSON").action(async(t,o)=>{let{triageShowCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});r.command("resolve <id>").description("Mark incident as resolved").option("-p, --pattern <patternId>","Pattern that led to resolution").option("-c, --commit <hash>","Git commit hash of fix").option("--pr <url>","Pull request URL").option("-n, --notes <text>","Resolution notes").option("--wont-fix","Mark as will not fix").action(async(t,o)=>{let{triageResolveCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});r.command("note <id> <note>").description("Add a note to an incident").action(async(t,o)=>{let{triageNoteCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});r.command("link <id1> <id2>").description("Link two related incidents").action(async(t,o)=>{let{triageLinkCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});var g=r.command("patterns").description("Manage failure patterns");g.command("list").alias("ls").description("List all patterns").option("--source <source>","Filter by source: manual, suggested, imported, community").option("--min-confidence <score>","Minimum confidence score").option("--json","Output as JSON").action(async t=>{let{triagePatternsListCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});g.command("show <id>").description("Show pattern details").option("--json","Output as JSON").action(async(t,o)=>{let{triagePatternsShowCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});g.command("add").description("Create a new pattern").requiredOption("--id <id>","Pattern ID (kebab-case)").requiredOption("--name <name>","Human-readable name").option("--description <text>","Pattern description").option("--symbols <pairs>",'Symbol criteria (e.g., "feature:@checkout,gate:^auth")').option("--error-contains <keywords>","Error keywords (comma-separated)").option("--missing-signals <signals>","Expected missing signals (comma-separated)").option("--strategy <strategy>","Resolution strategy: retry, fallback, fix-data, fix-code, ignore, escalate","fix-code").option("--priority <priority>","Priority: low, medium, high, critical","medium").option("--code-hint <text>","Code hint for resolution").option("--tags <tags>","Tags (comma-separated)").option("--from-incident <id>","Generate suggestion from incident").action(async t=>{let{triagePatternsAddCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});g.command("delete <id>").alias("rm").description("Delete a pattern").action(async t=>{let{triagePatternsDeleteCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});g.command("test <id>").description("Test pattern against historical incidents").option("-l, --limit <number>","Max incidents to test against","100").option("--json","Output as JSON").action(async(t,o)=>{let{triagePatternsTestCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});g.command("seed").description("Load built-in seed patterns").action(async()=>{let{triagePatternsSeedCommand:t}=await import('./triage-FCWOZASE.js');await t();});g.action(async()=>{let{triagePatternsListCommand:t}=await import('./triage-FCWOZASE.js');await t({});});r.command("export <type>").description("Export patterns or full backup (type: patterns, backup)").option("-o, --output <path>","Output file path").option("--include-private","Include private patterns").action(async(t,o)=>{let{triageExportCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});r.command("import <file>").description("Import patterns from JSON file").option("--overwrite","Overwrite existing patterns").action(async(t,o)=>{let{triageImportCommand:a}=await import('./triage-FCWOZASE.js');await a(t,o);});r.command("restore <file>").description("Restore from full backup").action(async t=>{let{triageRestoreCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});r.command("stats").description("Show statistics dashboard").option("-p, --period <period>","Time period: 1d, 7d, 30d, 90d","7d").option("--symbol <symbol>","Show health for specific symbol").option("--json","Output as JSON").action(async t=>{let{triageStatsCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});r.command("record").description("Manually record an incident").requiredOption("--error <message>","Error message").requiredOption("-e, --env <environment>","Environment").option("--feature <symbol>","Feature symbol (@...)").option("--component <symbol>","Component symbol (#...)").option("--flow <symbol>","Flow symbol ($...)").option("--gate <symbol>","Gate symbol (^...)").option("--signal <symbol>","Signal symbol (!...)").option("--state <symbol>","State symbol (%...)").option("--integration <symbol>","Integration symbol (&...)").option("--service <name>","Service name").option("--version <version>","App version").option("--stack <trace>","Stack trace").option("--json","Output as JSON").action(async t=>{let{triageRecordCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});r.option("-l, --limit <number>","Maximum incidents to show","10").option("-s, --status <status>","Filter by status").option("--json","Output as JSON").action(async t=>{let{triageListCommand:o}=await import('./triage-FCWOZASE.js');await o(t);});var c=i.command("lore").description("Project lore - timeline of everything that happened to this project");c.command("list").alias("ls").description("List recent lore entries").option("--author <author>","Filter by author").option("--type <type>","Filter by type: agent-session, human-note, decision, review, incident, milestone, retro, insight").option("--symbol <symbol>","Filter by symbol").option("--tags <tags>","Filter by tags (comma-separated)").option("--from <date>","Filter from date (ISO format, e.g., 2026-02-20)").option("--to <date>","Filter to date (ISO format)").option("-l, --limit <number>","Number of entries","20").option("--json","Output as JSON").action(async t=>{let{loreListCommand:o}=await import('./list-YKIQNKGB.js');await o(t);});c.command("show <id>").description("Show full detail for a lore entry").option("--json","Output as JSON").action(async(t,o)=>{let{loreShowCommand:a}=await import('./show-PJ5LFLIL.js');await a(t,o);});c.command("record").description("Record a new lore entry (human note, milestone, etc.)").option("--type <type>","Entry type: human-note, decision, milestone, retro, insight","human-note").option("--author <author>","Author name").option("--title <title>","Entry title").option("--summary <summary>","Entry summary").option("--symbols <symbols>","Comma-separated symbols").option("--tags <tags>","Comma-separated tags").option("--files-modified <files>","Comma-separated files modified").option("--files-created <files>","Comma-separated files created").option("--commit <hash>","Git commit hash").option("--learnings <items>","Comma-separated learnings").option("--duration <minutes>","Duration in minutes").option("--meta <json>",`Project-defined metadata as JSON (e.g., '{"sprint": 12}')`).option("--body <text>","Long-form content (detailed notes, rationale, etc.)").option("--link-lore <ids>","Comma-separated lore entry IDs to link").option("--link-commits <shas>","Comma-separated git commit SHAs to link").option("--confidence <number>","Confidence in correctness (0.0 to 1.0)").action(async t=>{let{loreRecordCommand:o}=await import('./record-YXPB34MY.js');await o(t);});c.command("review <id>").description("Add a review to a lore entry").option("--reviewer <name>","Reviewer name").option("--completeness <n>","Completeness score (1-5)","3").option("--quality <n>","Quality score (1-5)","3").option("--notes <text>","Review notes").action(async(t,o)=>{let{loreReviewCommand:a}=await import('./review-77QI6VOC.js');await a(t,o);});c.command("assess <id> <verdict>").description("Record an assessment verdict on a lore entry (correct/partial/incorrect)").option("--assessor <name>","Assessor name").option("--notes <text>","Assessment notes").action(async(t,o,a)=>{let{loreAssessCommand:n}=await import('./assess-UFPYEJKP.js');await n(t,o,a);});c.command("calibration").description("Show calibration statistics across assessed lore entries").option("--symbol <symbol>","Filter by symbol").option("--tag <tag>","Filter by tag").option("--author <author>","Filter by author").option("--group-by <dimension>","Group by: symbol, tag, type").option("--json","Output as JSON").action(async t=>{let{loreCalibrationCommand:o}=await import('./calibration-OLJYB5HN.js');await o(t);});c.command("edit <id>").description("Edit an existing lore entry").option("--title <title>","New title").option("--summary <summary>","New summary").option("--type <type>","New type: agent-session, human-note, decision, review, incident, milestone").option("--symbols <symbols>","Comma-separated symbols").option("--tags <tags>","Comma-separated tags").option("--learnings <items>","Comma-separated learnings").action(async(t,o)=>{let{loreEditCommand:a}=await import('./edit-GUU3HBVW.js');await a(t,o);});c.command("delete <id>").description("Delete a lore entry").option("-y, --yes","Skip confirmation").option("--dry-run","Show what would be deleted without making changes").action(async(t,o)=>{let{loreDeleteCommand:a}=await import('./delete-P5VULXR4.js');await a(t,o);});c.command("migrate-assessments").description("Migrate assessment entries to lore with arc: tags").option("--dry-run","Show what would be migrated without making changes").action(async t=>{let{loreMigrateAssessmentsCommand:o}=await import('./migrate-assessments-GEI5WMI2.js');await o(t);});c.command("retag").description("Add or remove tags from matching lore entries").option("--add <tag>","Tag to add").option("--remove <tag>","Tag to remove").option("--type <type>","Filter by entry type").option("--symbol <symbol>","Filter by symbol").option("--author <author>","Filter by author").option("--from <date>","Filter from date").option("--to <date>","Filter to date").option("--tags <tags>","Filter by existing tags (comma-separated)").option("--dry-run","Show what would change without making changes").action(async t=>{let{loreRetagCommand:o}=await import('./retag-N5XF3KXP.js');await o(t);});c.command("timeline").description("Show lore timeline grouped by date with hot symbols and authors").option("-l, --limit <number>","Number of entries","20").option("--json","Output as JSON").action(async t=>{let{loreTimelineCommand:o}=await import('./timeline-K3ZFKJ3R.js');await o(t);});c.option("-p, --port <port>","Port to run on","3840").option("--no-open","Don't open browser automatically").action(async t=>{let{loreServeCommand:o}=await import('./serve-L52ZUTU6.js');await o(void 0,t);});i.command("serve").description("Launch Paradigm Platform \u2014 unified development management UI").option("-p, --port <port>","Port to run on","3850").option("--no-open","Don't open browser automatically").option("--sections <list>","Comma-separated sections to enable (e.g., lore,graph,git)").action(async t=>{let{serveCommand:o}=await import('./serve-5W6KOA4R.js');await o(t);});var X=i.command("graph").description("Interactive symbol relationship graph").argument("[path]","Project directory",void 0).option("-p, --port <port>","Port to run on","3841").option("--no-open","Don't open browser automatically").action(async(t,o)=>{let{graphCommand:a}=await import('./graph-CNDE5TAT.js');await a(t,o);});X.command("generate").description("Generate a named graph file in .paradigm/graphs/").argument("<name>","Graph name (used as filename: {name}.graph.json)").argument("[path]","Project directory",void 0).option("-s, --symbols <list>","Comma-separated symbol names to include").option("-g, --group <spec...>",'Group spec: "Label:#sym1,#sym2" (repeatable)').option("-l, --link <spec...>",'Link spec: "Source>Target:label" (repeatable)').action(async(t,o,a)=>{let{graphGenerateCommand:n}=await import('./graph-CNDE5TAT.js');await n(t,o,a);});var m=i.command("habits").description("Behavioral habits - practice tracking and compliance");m.command("list").alias("ls").description("List all configured habits").option("--trigger <trigger>","Filter by trigger: preflight, postflight, on-stop, on-commit").option("--category <category>","Filter by category: discovery, verification, testing, documentation, collaboration, security").option("--json","Output as JSON").action(async t=>{let{habitsListCommand:o}=await import('./habits-GICVMTJL.js');await o(t);});m.command("status").description("Show practice profile with compliance rates").option("-p, --period <period>","Time period: 7d, 30d, 90d, all","30d").option("--json","Output as JSON").action(async t=>{let{habitsStatusCommand:o}=await import('./habits-GICVMTJL.js');await o(t);});m.command("init").description("Initialize habits.yaml with seed habits").option("-f, --force","Overwrite existing file").action(async t=>{let{habitsInitCommand:o}=await import('./habits-GICVMTJL.js');await o(t);});m.command("check").description("Evaluate habit compliance for a trigger point").requiredOption("-t, --trigger <trigger>","Trigger: preflight, postflight, on-stop, on-commit").option("--record","Record practice events to Sentinel").option("--json","Output as JSON").option("--files <files>","Comma-separated files modified (default: git diff)").option("--symbols <symbols>","Comma-separated symbols touched").action(async t=>{let{habitsCheckCommand:o}=await import('./habits-GICVMTJL.js');await o(t);});m.command("add").description("Add a custom habit").requiredOption("--id <id>","Habit ID (kebab-case)").requiredOption("--name <name>","Human-readable name").requiredOption("--description <desc>","What this habit enforces").requiredOption("--category <category>","Category: discovery, verification, testing, documentation, collaboration, security").requiredOption("--trigger <trigger>","Trigger: preflight, postflight, on-stop, on-commit").option("--severity <severity>","Severity: advisory, warn, block","advisory").option("--tools <tools>","Comma-separated tools to check (for tool-called check type)").option("--check-type <type>","Check type: tool-called, file-exists, file-modified, lore-recorded, symbols-registered, gates-declared, tests-exist, git-clean","tool-called").option("--patterns <patterns>","Comma-separated patterns (for file-exists, file-modified, tests-exist check types)").action(async t=>{let{habitsAddCommand:o}=await import('./habits-GICVMTJL.js');await o({...t,checkType:t.checkType});});m.command("edit <id>").description("Edit a habit (seed habits: only severity/enabled; custom: all fields)").option("--name <name>","New name").option("--description <desc>","New description").option("--category <category>","New category").option("--trigger <trigger>","New trigger").option("--severity <severity>","New severity: advisory, warn, block").option("--enabled <bool>","Enable or disable: true, false").option("--check-type <type>","New check type").option("--patterns <patterns>","Comma-separated patterns").option("--tools <tools>","Comma-separated tools").action(async(t,o)=>{let{habitsEditCommand:a}=await import('./habits-GICVMTJL.js');await a(t,{...o,checkType:o.checkType});});m.command("remove <id>").description("Remove a custom habit (seed habits cannot be removed, only disabled)").option("-y, --yes","Skip confirmation").action(async(t,o)=>{let{habitsRemoveCommand:a}=await import('./habits-GICVMTJL.js');await a(t,o);});m.command("enable <id>").description("Enable a habit").action(async t=>{let{habitsToggleCommand:o}=await import('./habits-GICVMTJL.js');await o(t,"enable");});m.command("disable <id>").description("Disable a habit").action(async t=>{let{habitsToggleCommand:o}=await import('./habits-GICVMTJL.js');await o(t,"disable");});m.action(async()=>{let{habitsListCommand:t}=await import('./habits-GICVMTJL.js');await t({});});var D=i.command("graduate").description("Automation tier graduation \u2014 migrate habits to hooks");D.command("status",{isDefault:true}).description("Show current automation tier of every habit").option("--json","Output as JSON").action(async t=>{let{graduateStatusCommand:o}=await import('./graduate-3BBSC27A.js');await o(t);});D.command("promote <habitId>").description("Graduate a habit to hook tier (skip MCP evaluation)").action(async t=>{let{graduatePromoteCommand:o}=await import('./graduate-3BBSC27A.js');await o(t);});D.command("demote <habitId>").description("Demote a habit from hook back to habit tier").option("--cooldown <days>","Cooldown period in days before re-graduation","14").action(async(t,o)=>{let{graduateDemoteCommand:a}=await import('./graduate-3BBSC27A.js');await a(t,o);});var h=i.command("persona").description("Personas \u2014 actor-driven journey testing");h.command("list",{isDefault:true}).alias("ls").description("List all personas").option("--tag <tag>","Filter by tag").option("--trigger <type>","Filter by trigger type (root, invitation, signup, api)").option("--gate <gate>","Filter by gate usage").option("--json","Output as JSON").action(async t=>{let{personaListCommand:o}=await import('./persona-STQWZH5P.js');await o(t);});h.command("show <id>").description("Show full persona detail").option("--json","Output as JSON").action(async(t,o)=>{let{personaShowCommand:a}=await import('./persona-STQWZH5P.js');await a(t,o);});h.command("validate [id]").description("Validate persona schema and cross-references").option("--json","Output as JSON").action(async(t,o)=>{let{personaValidateCommand:a}=await import('./persona-STQWZH5P.js');await a(t,o);});h.command("coverage").description("Coverage report \u2014 routes and gates with/without persona coverage").option("--json","Output as JSON").action(async t=>{let{personaCoverageCommand:o}=await import('./persona-STQWZH5P.js');await o(t);});h.command("run <id>").description("Execute persona journey against a running server").requiredOption("--base-url <url>","Base URL (e.g. http://localhost:3000)").option("--dry-run","Show steps without making HTTP requests").option("--json","Output as JSON").action(async(t,o)=>{let{personaRunCommand:a}=await import('./persona-STQWZH5P.js');await a(t,o);});h.command("affected <symbol>").description("Show which personas reference a given symbol (gate, flow, signal)").option("--json","Output as JSON").action(async(t,o)=>{let{personaAffectedCommand:a}=await import('./persona-STQWZH5P.js');await a(t,o);});h.command("delete <id>").description("Delete a persona").action(async t=>{let{personaDeleteCommand:o}=await import('./persona-STQWZH5P.js');await o(t);});var Y=i.command("sentinel").description("Sentinel \u2014 semantic error monitoring");Y.command("defend [path]",{isDefault:true}).description("Launch the Sentinel UI - unified codebase intelligence visualizer").option("-p, --port <port>","Port to run on","3838").option("--no-open","Don't open browser automatically").action(async(t,o)=>{let{sentinelCommand:a}=await import('./sentinel-HYAZ3CO5.js');await a(t,o);});i.command("conductor").description("Launch Paradigm Conductor \u2014 multimodal mission control for Claude Code sessions").option("--build","Force rebuild the native binary").option("--install","Install Conductor binary to ~/.paradigm/conductor/bin/").option("-v, --verbose","Show build output").action(async t=>{let{conductorCommand:o}=await import('./conductor-Y5IXELTL.js');await o(t);});var p=i.command("university").description("Per-project university - knowledge base, quizzes, learning paths & PLSAT certification");p.command("serve").description("Launch Paradigm University learning platform").option("-p, --port <port>","Port to run on","3839").option("--no-open","Don't open browser automatically").action(async t=>{let{universityServeCommand:o}=await import('./serve-OY6XYL7F.js');await o(void 0,t);});p.command("list").alias("ls").description("List university content").option("--type <type>","Filter by type: note, policy, guide, runbook, quiz, path").option("--tag <tag>","Filter by tag").option("--difficulty <level>","Filter by difficulty: beginner, intermediate, advanced").option("--symbol <symbol>","Filter by Paradigm symbol").option("-l, --limit <number>","Number of entries","20").option("--json","Output as JSON").action(async t=>{let{universityListCommand:o}=await import('./list-5IUGP3ZB.js');await o(t);});p.command("add <type>").description("Create university content (note, policy, guide, runbook, quiz)").option("--title <title>","Content title (required)").option("--body <text>","Content body (markdown)").option("--tags <tags>","Comma-separated tags").option("--symbols <symbols>","Comma-separated Paradigm symbols").option("--difficulty <level>","Difficulty: beginner, intermediate, advanced").option("--minutes <n>","Estimated reading time in minutes").action(async(t,o)=>{let{universityAddCommand:a}=await import('./add-P76GEMGF.js');await a(t,o);});p.command("show <id>").description("Show a content item in full").option("--json","Output as JSON").action(async(t,o)=>{let{universityShowCommand:a}=await import('./show-BOAVWZPZ.js');await a(t,o);});p.command("quiz <id>").description("Take an interactive quiz in the terminal").action(async t=>{let{universityQuizCommand:o}=await import('./quiz-FE5UGAY2.js');await o(t);});p.command("status").description("Show university content overview and completion stats").option("--json","Output as JSON").action(async t=>{let{universityStatusCommand:o}=await import('./status-A37ECYNJ.js');await o(t);});p.command("validate").description("Validate university content integrity").option("--deep","Enable deep cross-reference checks against scan-index").option("--id <id>","Validate a specific content item").option("--json","Output as JSON").action(async t=>{let{universityValidateCommand:o}=await import('./validate-C6SMKGYD.js');await o(t);});p.option("-p, --port <port>","Port to run on","3839").option("--no-open","Don't open browser automatically").action(async t=>{let{universityServeCommand:o}=await import('./serve-OY6XYL7F.js');await o(void 0,t);});var L=i.command("docs").description("Auto-generated documentation from the symbol graph");L.command("serve").description("Launch interactive docs viewer in browser").option("-p, --port <port>","Port number (default: 3850)").option("--no-open","Do not open browser automatically").action(async t=>{let{docsServeCommand:o}=await import('./docs-UIYXJ3O3.js');await o(t);});L.command("build").description("Build static documentation site").option("-o, --output <dir>","Output directory (default: from config or .paradigm/docs-site)").action(async t=>{let{docsBuildCommand:o}=await import('./docs-UIYXJ3O3.js');await o(t);});L.action(async()=>{let{docsServeCommand:t}=await import('./docs-UIYXJ3O3.js');await t({});});var f=i.command("pipeline").description("Spec pipeline \u2014 structured feature workflow with configurable gates");f.command("start <description>").description("Create a new pipeline for a feature").option("--template <template>","Pipeline template (add-feature, bug-fix, security-change, refactor)","add-feature").option("--gates <gates>","Custom gate modes: specify,plan,task,implement,validate").action(async(t,o)=>{let{pipelineStartCommand:a}=await import('./pipeline-MZUITRVN.js');await a(t,o);});f.command("status [feature]").description("Show pipeline status").action(async t=>{let{pipelineStatusCommand:o}=await import('./pipeline-MZUITRVN.js');await o(t);});f.command("advance <feature>").description("Advance pipeline past current gate").action(async t=>{let{pipelineAdvanceCommand:o}=await import('./pipeline-MZUITRVN.js');await o(t);});f.command("configure <feature>").description("Change gate mode on active pipeline").requiredOption("--stage <stage>","Stage to configure").requiredOption("--gate <gate>","New gate mode (auto, manual, sentinel)").option("--reason <reason>","Reason for change").action(async(t,o)=>{let{pipelineConfigureCommand:a}=await import('./pipeline-MZUITRVN.js');await a(t,o);});f.command("abort <feature>").description("Cancel a pipeline").action(async t=>{let{pipelineAbortCommand:o}=await import('./pipeline-MZUITRVN.js');await o(t);});f.command("list").description("List all active pipelines").action(async()=>{let{pipelineListCommand:t}=await import('./pipeline-MZUITRVN.js');await t();});f.action(async()=>{let{pipelineListCommand:t}=await import('./pipeline-MZUITRVN.js');await t();});var e=i.command("symphony").description("Symphony \u2014 agent-to-agent messaging for multi-session collaboration");e.command("join").description("Join this session to the Symphony network").option("--remote <ip>","Connect to remote Symphony server").action(async t=>{let{symphonyJoinCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});e.command("leave").description("Remove this session from the Symphony network").action(async()=>{let{symphonyLeaveCommand:t}=await import('./symphony-QI63XL62.js');await t();});e.command("whoami").description("Show this agent's identity and linked peers").action(async()=>{let{symphonyWhoamiCommand:t}=await import('./symphony-QI63XL62.js');await t();});e.command("list").alias("ls").description("List all joined agents").option("--json","Output as JSON").action(async t=>{let{symphonyListCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});e.command("send <message>").description("Send a note to agents").option("--to <agent>","Send to specific agent (omit for broadcast)").option("--thread <id>","Reply to existing thread").action(async(t,o)=>{let{symphonySendCommand:a}=await import('./symphony-QI63XL62.js');await a(t,o);});e.command("read").description("Show unread notes").action(async()=>{let{symphonyReadCommand:t}=await import('./symphony-QI63XL62.js');await t();});e.command("inbox").description("Show unread notes (alias for read)").action(async()=>{let{symphonyReadCommand:t}=await import('./symphony-QI63XL62.js');await t();});e.command("threads").description("List all threads").option("--json","Output as JSON").action(async t=>{let{symphonyThreadsCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});e.command("thread <id>").description("Show full thread conversation").action(async t=>{let{symphonyThreadCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});e.command("resolve <id>").description("Mark a thread as resolved").option("--decision <text>","Decision text to record").action(async(t,o)=>{let{symphonyResolveCommand:a}=await import('./symphony-QI63XL62.js');await a(t,o);});e.command("status").description("Show Symphony network status").option("--json","Output as JSON").action(async t=>{let{symphonyStatusCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});e.command("serve").description("Start Symphony relay server for cross-machine networking").option("--port <port>","Port to listen on","3939").option("--public","Show connection string for internet access").action(async t=>{let{symphonyServeCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});var q=e.command("peers").description("Manage trusted remote peers");q.command("list",{isDefault:true}).description("List trusted peers and their agents").option("--json","Output as JSON").action(async t=>{let{symphonyPeersCommand:o}=await import('./peers-P2KXU7ZK.js');await o(t);});q.command("revoke <id>").description("Revoke trust for a peer (disconnects immediately)").action(async t=>{let{symphonyPeersRevokeCommand:o}=await import('./peers-P2KXU7ZK.js');await o(t);});q.command("forget").description("Clear all peer trust records").option("--force","Skip confirmation").action(async t=>{let{symphonyPeersForgetCommand:o}=await import('./peers-P2KXU7ZK.js');await o(t);});q.action(async()=>{let{symphonyPeersCommand:t}=await import('./peers-P2KXU7ZK.js');await t({});});e.command("request <file>").description("Request a file from another agent").option("--from <agent>","Agent to request from").option("--reason <text>","Why this file is needed").action(async(t,o)=>{let{symphonyRequestCommand:a}=await import('./symphony-QI63XL62.js');await a(t,o);});e.command("requests").description("List pending file requests").action(async()=>{let{symphonyRequestsCommand:t}=await import('./symphony-QI63XL62.js');await t();});e.command("approve <id>").description("Approve a file request").option("--redact","Strip sensitive lines before sending").action(async(t,o)=>{let{symphonyApproveCommand:a}=await import('./symphony-QI63XL62.js');await a(t,o);});e.command("deny <id>").description("Deny a file request").option("--reason <text>","Reason for denial").action(async(t,o)=>{let{symphonyDenyCommand:a}=await import('./symphony-QI63XL62.js');await a(t,o);});e.command("watch").description("Watch inbox in real-time \u2014 zero AI tokens, pure file monitoring").option("--interval <ms>","Poll interval in milliseconds (default: 2000)").option("--thread <id>","Only show messages from this thread").option("--quiet","Minimal output \u2014 messages only, no header").action(async t=>{let{symphonyWatchCommand:o}=await import('./symphony-QI63XL62.js');await o(t);});e.action(async()=>{let{symphonyStatusCommand:t}=await import('./symphony-QI63XL62.js');await t({});});var J=i.command("notebook").description("Agent notebook management \u2014 curated snippet libraries");J.command("list").alias("ls").description("List notebook entries").option("--agent <id>","Filter by agent ID").option("--json","Output as JSON").action(async t=>{let{notebookListCommand:o}=await import('./notebook-PE3JSYZI.js');await o(t);});J.command("show <id>").description("Show a specific notebook entry").option("--agent <id>","Agent ID").option("--json","Output as JSON").action(async(t,o)=>{let{notebookShowCommand:a}=await import('./notebook-PE3JSYZI.js');await a(t,o);});J.command("export").description("Export notebook entries").option("--agent <id>","Filter by agent ID").option("--format <format>","Output format: yaml or json (default: yaml)").action(async t=>{let{notebookExportCommand:o}=await import('./notebook-PE3JSYZI.js');await o(t);});J.action(async()=>{let{notebookListCommand:t}=await import('./notebook-PE3JSYZI.js');await t({});});var d=i.command("agent").description("Agent identity management \u2014 persistent profiles with expertise tracking");d.command("list").alias("ls").description("List all agent identity profiles").option("--json","Output as JSON").option("--global","Show only global profiles").option("--project","Show only project-level profiles").action(async t=>{let{agentListCommand:o}=await import('./agent-UUTYOFTH.js');await o(t);});d.command("show <id>").description("Show full agent profile with expertise table").option("--json","Output as JSON").action(async(t,o)=>{let{agentShowCommand:a}=await import('./agent-UUTYOFTH.js');await a(t,o);});d.command("create <id>").description("Create a new .agent identity file").option("-r, --role <role>","Agent role description").option("-d, --description <desc>","Extended description").option("-g, --global","Create in global ~/.paradigm/agents/ (default)").option("--deny-paths <patterns>",'Comma-separated glob patterns to deny (e.g., ".env*,*.key")').action(async(t,o)=>{let{agentCreateCommand:a}=await import('./agent-UUTYOFTH.js');await a(t,{...o,global:o.global!==false});});d.command("sync <id>").description("Bootstrap expertise from existing project lore").option("-n, --dry-run","Show what would change without writing").option("--json","Output as JSON").action(async(t,o)=>{let{agentSyncCommand:a}=await import('./agent-UUTYOFTH.js');await a(t,o);});var A=d.command("roster").description("Manage per-project agent roster (.paradigm/roster.yaml)");A.command("init").description("Create a roster based on detected project type").option("-f, --force","Overwrite existing roster").option("--json","Output as JSON").action(async t=>{let{rosterInitCommand:o}=await import('./roster-K2QILE7K.js');await o(t);});A.command("add <ids...>").description("Add one or more agents to the active roster").option("--json","Output as JSON").action(async(t,o)=>{let{rosterAddCommand:a}=await import('./roster-K2QILE7K.js');await a(t,o);});A.command("remove <ids...>").description("Remove one or more agents from the active roster").option("--json","Output as JSON").action(async(t,o)=>{let{rosterRemoveCommand:a}=await import('./roster-K2QILE7K.js');await a(t,o);});A.option("--json","Output as JSON").action(async t=>{let{rosterShowCommand:o}=await import('./roster-K2QILE7K.js');await o(t);});d.command("bench <id>").description("Bench an agent \u2014 Maestro will skip it during orchestration").action(async t=>{let{agentBenchCommand:o}=await import('./agent-UUTYOFTH.js');await o(t);});d.command("activate <id>").description("Activate a benched agent \u2014 restore to Maestro orchestration").action(async t=>{let{agentActivateCommand:o}=await import('./agent-UUTYOFTH.js');await o(t);});d.action(async()=>{let{agentListCommand:t}=await import('./agent-UUTYOFTH.js');await t({});});var O=i.command("enforcement").description("Manage enforcement configuration (check severities and levels)");O.command("set <level>").description("Set enforcement level preset (strict, balanced, minimal)").action(async t=>{let{enforcementSetCommand:o}=await import('./enforcement-MKFUH4TE.js');await o(t);});O.command("override <check-id> <severity>").description("Set a per-check severity override (block, warn, off)").action(async(t,o)=>{let{enforcementOverrideCommand:a}=await import('./enforcement-MKFUH4TE.js');await a(t,o);});O.command("reset [check-id]").description("Remove a per-check override, or all overrides if no check-id given").action(async t=>{let{enforcementResetCommand:o}=await import('./enforcement-MKFUH4TE.js');await o(t);});O.command("resolve").description("Output the fully resolved severity map (used by stop hook)").option("--json","Output as JSON").action(async t=>{let{enforcementResolveCommand:o}=await import('./enforcement-MKFUH4TE.js');await o(t);});O.command("status",{isDefault:true}).description("Show enforcement status table (default)").option("--json","Output as JSON").action(async t=>{let{enforcementStatusCommand:o}=await import('./enforcement-MKFUH4TE.js');await o(t);});i.command("compliance-check").description("Run all compliance checks (habits, drift, portal) in a single process").option("--json","Output as JSON").option("--auto-heal","Auto-heal drift violations").option("--trigger <event>","Trigger context (e.g., on-stop)","on-stop").option("--learn","Run postflight learning pass (convert session verdicts to journal entries)").action(async t=>{let{complianceCheckCommand:o}=await import('./compliance-NLG7KB73.js');await o(t);});i.parse();