@a-company/paradigm 6.0.2 → 6.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{accept-orchestration-QQISPINV.js → accept-orchestration-TIXUQQGR.js} +1 -1
- package/dist/active-remediations-EBLHRMNN.js +5 -0
- package/dist/agent-MB3H5EZA.js +33 -0
- package/dist/{agent-loader-2WJHD46U.js → agent-loader-VGBPL3TH.js} +1 -1
- package/dist/{agent-loader-YKS2PQWO.js → agent-loader-W3RQJVW7.js} +1 -1
- package/dist/{agents-suggest-HYTFMQD3.js → agents-suggest-IKY6VD2R.js} +1 -1
- package/dist/{ambient-NVKQCW2A.js → ambient-AI42BOM5.js} +2 -2
- package/dist/{ambient-BE3SQXNN.js → ambient-FNNFB4AP.js} +1 -1
- package/dist/authority-GCMPX7RW.js +2 -0
- package/dist/{chunk-FEYOQMZ5.js → chunk-2AU5L333.js} +1 -1
- package/dist/{chunk-M3PPXJU4.js → chunk-4N56FRNE.js} +1 -1
- package/dist/{chunk-3DZK54RU.js → chunk-5RFISGUW.js} +110 -22
- package/dist/{chunk-TNVWGPCE.js → chunk-6QXBXZF6.js} +1 -1
- package/dist/{chunk-WESTEMIM.js → chunk-AMLD7IYC.js} +1 -1
- package/dist/{chunk-VXIIVMTM.js → chunk-F6E3HW45.js} +1 -1
- package/dist/{chunk-TBWWFRL5.js → chunk-GD4F2HC6.js} +1 -1
- package/dist/{chunk-6SKSV5B2.js → chunk-IOVHF4SR.js} +1 -1
- package/dist/{chunk-PHEX6LU4.js → chunk-K7EQHFZP.js} +26 -26
- package/dist/{chunk-M2HKWR25.js → chunk-KAFQA7HV.js} +2 -2
- package/dist/{chunk-GAFKOFAV.js → chunk-LAYBUKMB.js} +1 -1
- package/dist/{chunk-TZDYIPVU.js → chunk-MOVDVBU7.js} +133 -49
- package/dist/{chunk-AO7ZSRME.js → chunk-TQOT2LBO.js} +2 -2
- package/dist/chunk-XQLO5URP.js +11 -0
- package/dist/{compliance-BNFWQPKM.js → compliance-J3VOV445.js} +1 -1
- package/dist/{diff-MF55KQZH.js → diff-75MABOSL.js} +1 -1
- package/dist/{docs-O37YLLRN.js → docs-TSAAS4W3.js} +1 -1
- package/dist/doctor-L5XZENCF.js +2 -0
- package/dist/{hooks-TFMMMB2H.js → hooks-45WDP6QS.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/mcp.js +2 -2
- package/dist/{migrate-Z5UQN57G.js → migrate-R64OQGSM.js} +1 -1
- package/dist/migration-notices-MRZ6PVDS.js +4 -0
- package/dist/{nomination-engine-QPZJH6XO.js → nomination-engine-NCLTGMAK.js} +1 -1
- package/dist/{orchestrate-RID7HHHH.js → orchestrate-K4KBTBYK.js} +1 -1
- package/dist/{providers-4PXMWA7V.js → providers-TBPOE4DI.js} +1 -1
- package/dist/registry-OUTA3DXW.js +20 -0
- package/dist/reindex-GSRV4MQO.js +2 -0
- package/dist/{serve-MO35XIZE.js → serve-3FMUWW5K.js} +1 -1
- package/dist/session-tracker-HHNY6J4I.js +2 -0
- package/dist/{session-work-log-EE4UIZ33.js → session-work-log-MEJ33TYD.js} +1 -1
- package/dist/{session-work-log-4IEVE4KK.js → session-work-log-ZVVJGO7X.js} +1 -1
- package/dist/shift-3ATE2ONQ.js +60 -0
- package/dist/{spawn-UH5RENSE.js → spawn-KKDDR6UR.js} +1 -1
- package/dist/{team-MGT66HZQ.js → team-2LGZQRP4.js} +1 -1
- package/dist/tools-VNDXOFXR.js +2 -0
- package/dist/university-content/notes/N-para-451-agent-routing.md +117 -0
- package/dist/university-content/notes/N-para-451-archetypes-vs-instances.md +82 -0
- package/dist/university-content/notes/N-para-451-identity-layers.md +76 -0
- package/dist/university-content/notes/N-para-451-orchestration-modes.md +85 -0
- package/dist/university-content/notes/N-para-451-paradigm-shift.md +95 -0
- package/dist/university-content/notes/N-para-451-partners-primitive.md +107 -0
- package/dist/university-content/notes/N-para-451-roster-management.md +132 -0
- package/dist/university-content/notes/N-para-451-roster-reference.md +106 -0
- package/dist/university-content/notes/N-para-451-the-team-pattern.md +87 -0
- package/dist/university-content/notes/N-para-451-tiers.md +83 -0
- package/dist/university-content/notes/N-para-451-welcome.md +55 -0
- package/dist/university-content/notes/N-para-451-what-is-an-agent.md +73 -0
- package/dist/university-content/paths/LP-para-451.yaml +69 -0
- package/dist/university-content/quizzes/Q-para-451-foundations.yaml +154 -0
- package/dist/university-content/quizzes/Q-para-451-when-to-invoke.yaml +182 -0
- package/dist/university-ui/assets/{index-nNgzO1il.js → index-CkgaxOXi.js} +2 -2
- package/dist/university-ui/assets/{index-nNgzO1il.js.map → index-CkgaxOXi.js.map} +1 -1
- package/dist/university-ui/index.html +1 -1
- package/package.json +1 -1
- package/dist/agent-X6I2YWOB.js +0 -33
- package/dist/chunk-R5ECMBIV.js +0 -11
- package/dist/doctor-IG5XM4C4.js +0 -2
- package/dist/registry-KOOKFUWD.js +0 -20
- package/dist/reindex-FWPD2VGM.js +0 -2
- package/dist/session-tracker-KGORN6B5.js +0 -2
- package/dist/shift-TVNY2CQF.js +0 -60
- package/dist/tools-QJHAVYI6.js +0 -2
- /package/dist/{chunk-IZSBGW6E.js → chunk-HXGYVS2N.js} +0 -0
- /package/dist/{platform-server-UD45NTGV.js → platform-server-ANOALDPL.js} +0 -0
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
10
|
<link href="https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-CkgaxOXi.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-CMrxD7y5.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
package/package.json
CHANGED
package/dist/agent-X6I2YWOB.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {a as a$1}from'./chunk-LKAT7IAK.js';import'./chunk-5TAVYPOV.js';import*as a from'fs';import*as y from'path';import*as R from'os';import o from'chalk';import*as m from'js-yaml';var h=y.join(R.homedir(),".paradigm","agents"),S=".paradigm/agents",$=".agent",k=".paradigm/roster.yaml";function j(e){let s=y.join(e,k);if(!a.existsSync(s))return null;try{return m.load(a.readFileSync(s,"utf8"))?.active??null}catch{return null}}function F(e,s){let c=y.join(e,k),n=y.dirname(c);a.existsSync(n)||a.mkdirSync(n,{recursive:true});let r={version:"1.0",active:s.sort()};a.writeFileSync(c,m.dump(r,{lineWidth:-1,noRefs:true}),"utf8");}function C(){if(!a.existsSync(h))return [];try{return a.readdirSync(h).filter(e=>e.endsWith($)).map(e=>e.replace($,""))}catch{return []}}var E={architect:{style:"deliberate",risk:"conservative",verbosity:"detailed"},builder:{style:"rapid",risk:"balanced",verbosity:"concise"},tester:{style:"methodical",risk:"conservative",verbosity:"concise"},reviewer:{style:"deliberate",risk:"conservative",verbosity:"detailed"},security:{style:"methodical",risk:"conservative",verbosity:"detailed"}};async function _(e={}){let s=process.cwd(),c=a$1.command("agent-list").start("Listing agent profiles",{cwd:s}),n=[];if(!e.project&&a.existsSync(h))try{let i=a.readdirSync(h).filter(d=>d.endsWith($));for(let d of i)try{let f=a.readFileSync(y.join(h,d),"utf-8"),t=m.load(f);t?.id&&n.push(t);}catch{}}catch{}let r=y.join(s,S);if(!e.global&&a.existsSync(r))try{let i=a.readdirSync(r).filter(d=>d.endsWith($));for(let d of i)try{let f=a.readFileSync(y.join(r,d),"utf-8"),t=m.load(f);if(t?.id){let l=n.findIndex(g=>g.id===t.id);l>=0?n[l]=t:n.push(t);}}catch{}}catch{}if(e.json){console.log(JSON.stringify({count:n.length,agents:n.map(O)},null,2)),c.success(`Found ${n.length} agents`);return}if(console.log(o.blue(`
|
|
3
|
-
\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510`)),console.log(o.blue("\u2502")+o.white.bold(" paradigm agent list ")+o.blue("\u2502")),console.log(o.blue("\u2502")+o.gray(" Persistent agent identity profiles ")+o.blue("\u2502")),console.log(o.blue(`\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
|
|
4
|
-
`)),n.length===0){console.log(o.yellow(" No .agent profiles found.")),console.log(o.gray(` Create one: paradigm agent create <id> --global
|
|
5
|
-
`)),c.success("No agents found");return}for(let i of n){let f=(i.expertise||[]).sort((t,l)=>l.confidence-t.confidence).slice(0,3).map(t=>`${t.symbol} (${(t.confidence*100).toFixed(0)}%)`).join(", ")||o.gray("none yet");console.log(` ${o.white.bold(i.id)} \u2014 ${o.gray(i.role)}`),console.log(` Style: ${i.personality?.style||"?"} | Risk: ${i.personality?.risk||"?"} | Verbosity: ${i.personality?.verbosity||"?"}`),console.log(` Top expertise: ${f}`),console.log(` Projects: ${Object.keys(i.contexts||{}).join(", ")||o.gray("none")}`),console.log("");}c.success(`Listed ${n.length} agents`);}async function D(e,s={}){let c=process.cwd(),n=a$1.command("agent-show").start(`Showing agent ${e}`,{cwd:c}),r=w(c,e);if(!r){s.json?console.log(JSON.stringify({error:`Agent "${e}" not found`})):(console.log(o.red(`
|
|
6
|
-
Agent "${e}" not found.`)),console.log(o.gray(` Create: paradigm agent create ${e} --global
|
|
7
|
-
`))),n.error(`Agent ${e} not found`);return}if(s.json){console.log(JSON.stringify(r,null,2)),n.success(`Showed agent ${e}`);return}if(console.log(o.blue(`
|
|
8
|
-
\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510`)),console.log(o.blue("\u2502")+o.white.bold(` Agent: ${e}`.padEnd(50))+o.blue("\u2502")),console.log(o.blue(`\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
|
|
9
|
-
`)),console.log(` ${o.white.bold("Role:")} ${r.role}`),console.log(` ${o.white.bold("Description:")} ${r.description}`),console.log(` ${o.white.bold("Version:")} ${r.version}`),console.log(` ${o.white.bold("Created:")} ${r.created}`),console.log(` ${o.white.bold("Updated:")} ${r.updated}`),console.log(""),r.personality){let l=r.personality;console.log(` ${o.white.bold("Personality")}`),console.log(` Style: ${l.style} | Risk: ${l.risk} | Verbosity: ${l.verbosity}`),console.log("");}let i=(r.expertise||[]).sort((l,g)=>g.confidence-l.confidence);if(i.length>0){console.log(` ${o.white.bold("Expertise")} (${i.length} symbols)`),console.log(` ${"Symbol".padEnd(30)} ${"Confidence".padEnd(12)} ${"Sessions".padEnd(10)} Last Touch`),console.log(` ${"-".repeat(70)}`);for(let l of i.slice(0,20)){let g=`${(l.confidence*100).toFixed(0)}%`.padEnd(12),p=String(l.sessions).padEnd(10),u=l.lastTouch?l.lastTouch.split("T")[0]:"\u2014";console.log(` ${l.symbol.padEnd(30)} ${g} ${p} ${u}`);}i.length>20&&console.log(o.gray(` ... and ${i.length-20} more`)),console.log("");}else console.log(o.gray(" No expertise recorded. Run `paradigm agent sync` to bootstrap from lore.\n"));let d=r.transferable||[];if(d.length>0){console.log(` ${o.white.bold("Transferable Patterns")} (${d.length})`);for(let l of d)console.log(` ${l.id}: ${(l.successRate*100).toFixed(0)}% success \u2014 ${l.description}`),console.log(o.gray(` Learned in: ${l.learnedIn} | Applied in: ${l.appliedIn.join(", ")||"none"}`));console.log("");}let f=Object.entries(r.contexts||{});if(f.length>0){console.log(` ${o.white.bold("Project Contexts")} (${f.length})`);for(let[l,g]of f)console.log(` ${o.white(l)}: ${g.sessionsInProject||0} sessions, last active ${g.lastActive?.split("T")[0]||"\u2014"}`),g.defaultModel&&console.log(` Model: ${g.defaultModel}`),g.focus?.length&&console.log(` Focus: ${g.focus.join(", ")}`);console.log("");}let t=r.permissions;t&&(console.log(` ${o.white.bold("Permissions")}`),t.paths?.read?.length&&console.log(` Read: ${t.paths.read.join(", ")}`),t.paths?.write?.length&&console.log(` Write: ${t.paths.write.join(", ")}`),t.paths?.deny?.length&&console.log(` Deny: ${o.red(t.paths.deny.join(", "))}`),t.tools?.allow?.length&&console.log(` Tools allow: ${t.tools.allow.join(", ")}`),t.tools?.deny?.length&&console.log(` Tools deny: ${o.red(t.tools.deny.join(", "))}`),t.dangerous_actions?.length&&console.log(` Requires approval: ${t.dangerous_actions.join(", ")}`),console.log("")),n.success(`Showed agent ${e}`);}async function L(e,s={}){let c=process.cwd(),n=s.global?"global":"project",r=a$1.command("agent-create").start(`Creating agent ${e} (${n})`,{cwd:c}),i=n==="global"?h:y.join(c,S);a.existsSync(i)||a.mkdirSync(i,{recursive:true});let d=y.join(i,`${e}${$}`);if(a.existsSync(d)){console.log(o.yellow(`
|
|
10
|
-
Agent "${e}" already exists at ${d}`)),console.log(o.gray(" Use `paradigm agent show` to view.\n")),r.error("Agent already exists");return}let f=new Date().toISOString(),t=E[e]||{style:"deliberate",risk:"balanced",verbosity:"concise"},l={id:e,role:s.role||`${e.charAt(0).toUpperCase()+e.slice(1)} agent`,description:s.description||`Persistent identity for the ${e} agent role`,version:"1.0.0",personality:t,expertise:[],transferable:[],contexts:{},created:f,updated:f};if(s.denyPaths){let p=s.denyPaths.split(",").map(u=>u.trim());l.permissions={paths:{deny:p}};}let g=m.dump(l,{lineWidth:120,noRefs:true,sortKeys:false});a.writeFileSync(d,g,"utf-8"),console.log(o.green(`
|
|
11
|
-
\u2713 Created agent "${e}" at ${d}`)),console.log(o.gray(" Run `paradigm agent sync` to bootstrap expertise from lore.\n")),r.success(`Created agent ${e}`);}async function W(e,s={}){let c=process.cwd(),n=a$1.command("agent-sync").start(`Syncing expertise for ${e}`,{cwd:c}),r=y.join(c,".paradigm","lore","entries");if(!a.existsSync(r)){console.log(o.yellow(`
|
|
12
|
-
No lore directory found. Nothing to sync from.
|
|
13
|
-
`)),n.error("No lore found");return}let i=w(c,e);if(!i){if(s.dryRun){console.log(o.yellow(`
|
|
14
|
-
Agent "${e}" not found. Would create with --no-dry-run.
|
|
15
|
-
`)),n.success("Dry run \u2014 would create");return}let p=(a.existsSync(y.join(h,`${e}${$}`))?"global":"project")==="global"?h:y.join(c,S);a.existsSync(p)||a.mkdirSync(p,{recursive:true});let u=new Date().toISOString(),x=E[e]||{style:"deliberate",risk:"balanced",verbosity:"concise"};i={id:e,role:`${e.charAt(0).toUpperCase()+e.slice(1)} agent`,description:`Persistent identity for the ${e} agent role`,version:"1.0.0",personality:x,expertise:[],transferable:[],contexts:{},created:u,updated:u};}let d=i.expertise||[],f=0,t=new Set,l=T(r);for(let g of l)if(!(!g.symbols_touched||g.symbols_touched.length===0)){f++;for(let p of g.symbols_touched){t.add(p);let u=d.find(x=>x.symbol===p);u?(u.sessions++,u.lastTouch=g.timestamp||u.lastTouch,g.confidence!=null&&(u.confidence=.7*u.confidence+.3*g.confidence)):d.push({symbol:p,confidence:g.confidence??.5,sessions:1,lastTouch:g.timestamp||new Date().toISOString()});}}if(i.expertise=d,s.json)console.log(JSON.stringify({agentId:e,entriesProcessed:f,symbolsUpdated:t.size,dryRun:!!s.dryRun,topExpertise:d.sort((g,p)=>p.confidence-g.confidence).slice(0,10)},null,2));else if(console.log(o.blue(`
|
|
16
|
-
Syncing expertise for "${e}" from ${f} lore entries...`)),console.log(` ${o.green("\u2713")} ${t.size} symbols updated`),console.log(` ${o.green("\u2713")} ${f} entries processed`),d.length>0){console.log(`
|
|
17
|
-
Top expertise:`);for(let g of d.sort((p,u)=>u.confidence-p.confidence).slice(0,5))console.log(` ${g.symbol}: ${(g.confidence*100).toFixed(0)}% (${g.sessions} sessions)`);}if(s.dryRun)s.json||console.log(o.yellow(`
|
|
18
|
-
Dry run \u2014 no changes written.
|
|
19
|
-
`));else {i.updated=new Date().toISOString();let g=y.join(c,S,`${e}${$}`),p=y.join(h,`${e}${$}`),u=a.existsSync(g)?"project":"global",x=u==="global"?h:y.join(c,S);a.existsSync(x)||a.mkdirSync(x,{recursive:true});let A=u==="global"?p:g;a.writeFileSync(A,m.dump(i,{lineWidth:120,noRefs:true,sortKeys:false}),"utf-8"),s.json||console.log(o.green(`
|
|
20
|
-
\u2713 Saved to ${A}
|
|
21
|
-
`));}n.success(`Synced ${t.size} symbols from ${f} entries`);}async function M(e={}){let s=process.cwd(),c=a$1.command("agent-roster").start("Agent roster",{cwd:s}),n=[];if(a.existsSync(h))for(let t of a.readdirSync(h).filter(l=>l.endsWith($)))try{let l=m.load(a.readFileSync(y.join(h,t),"utf-8"));l?.id&&n.push(l);}catch{}let r=y.join(s,S);if(a.existsSync(r))for(let t of a.readdirSync(r).filter(l=>l.endsWith($)))try{let l=m.load(a.readFileSync(y.join(r,t),"utf-8"));if(l?.id){let g=n.findIndex(p=>p.id===l.id);g>=0?n[g]=l:n.push(l);}}catch{}let i=j(s),d=i?n.filter(t=>i.includes(t.id)):n,f=i?n.filter(t=>!i.includes(t.id)):[];if(e.json){console.log(JSON.stringify({active:d.map(t=>P(t,false)),benched:f.map(t=>P(t,true))},null,2)),c.success(`${d.length} active, ${f.length} benched`);return}if(console.log(o.blue(`
|
|
22
|
-
\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510`)),console.log(o.blue("\u2502")+o.white.bold(" Agent Roster ")+o.blue("\u2502")),console.log(o.blue(`\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
|
|
23
|
-
`)),d.length>0){console.log(o.green.bold(" Active"));for(let t of d)v(t);}if(f.length>0){console.log(o.gray.bold(`
|
|
24
|
-
Benched`));for(let t of f)v(t,true);}n.length===0?console.log(o.yellow(` No agents found.
|
|
25
|
-
`)):console.log(""),c.success(`${d.length} active, ${f.length} benched`);}function v(e,s=false){let c=(e.expertise||[]).sort((t,l)=>l.confidence-t.confidence),n=c[0]?`${c[0].symbol} (${(c[0].confidence*100).toFixed(0)}%)`:o.gray("\u2014"),r=s?o.gray:o.white,i=e.nickname?` (${e.nickname})`:"",d=e.attention?.threshold,f=d!=null?` | thr: ${d.toFixed(2)}`:"";console.log(` ${r.bold(e.id)}${o.gray(i)} \u2014 ${o.gray(e.role)}`),console.log(` Top: ${n} | ${c.length} symbols${f}`);}function P(e,s=false){let c=(e.expertise||[]).sort((n,r)=>r.confidence-n.confidence);return {id:e.id,role:e.role,nickname:e.nickname,benched:s,expertiseCount:c.length,topExpertise:c.slice(0,3).map(n=>({symbol:n.symbol,confidence:parseFloat(n.confidence.toFixed(2))})),threshold:e.attention?.threshold}}async function U(e){let s=process.cwd(),c=a$1.command("agent-bench").start(`Benching agent ${e}`,{cwd:s}),n=w(s,e);if(!n){console.log(o.red(`
|
|
26
|
-
Agent "${e}" not found.
|
|
27
|
-
`)),c.error("Not found");return}let r=j(s);r?r=r.filter(i=>i!==n.id):r=C().filter(i=>i!==n.id),F(s,r),console.log(o.yellow(`
|
|
28
|
-
Agent "${n.id}" removed from this project's roster.`)),console.log(o.gray(` Maestro will skip this agent during orchestration. Still available globally.
|
|
29
|
-
`)),c.success(`Benched ${n.id} (roster: ${r.length} active)`);}async function J(e){let s=process.cwd(),c=a$1.command("agent-activate").start(`Activating agent ${e}`,{cwd:s}),n=w(s,e);if(!n){console.log(o.red(`
|
|
30
|
-
Agent "${e}" not found.
|
|
31
|
-
`)),c.error("Not found");return}let r=j(s);if(r)r.includes(n.id)||r.push(n.id);else {let i=C();r=i.includes(n.id)?i:[...i,n.id];}F(s,r),console.log(o.green(`
|
|
32
|
-
\u25B6 Agent "${n.id}" added to this project's roster.`)),console.log(o.gray(` Maestro will include this agent in orchestration. Roster is per-project.
|
|
33
|
-
`)),c.success(`Activated ${n.id} (roster: ${r.length} active)`);}function w(e,s){let c=y.join(e,S,`${s}${$}`);if(a.existsSync(c))try{return m.load(a.readFileSync(c,"utf-8"))}catch{}let n=y.join(h,`${s}${$}`);if(a.existsSync(n))try{return m.load(a.readFileSync(n,"utf-8"))}catch{}return null}function O(e){return {id:e.id,role:e.role,personality:e.personality,expertiseCount:(e.expertise||[]).length,topExpertise:(e.expertise||[]).sort((s,c)=>c.confidence-s.confidence).slice(0,3).map(s=>({symbol:s.symbol,confidence:parseFloat(s.confidence.toFixed(2))})),projectContexts:Object.keys(e.contexts||{}),transferableCount:(e.transferable||[]).length}}function T(e){let s=[];try{let c=a.readdirSync(e,{withFileTypes:!0});for(let n of c){if(!n.isDirectory())continue;let r=y.join(e,n.name);try{let i=a.readdirSync(r).filter(d=>d.endsWith(".yaml")||d.endsWith(".yml"));for(let d of i)try{let f=a.readFileSync(y.join(r,d),"utf-8"),t=m.load(f);t?.symbols_touched&&Array.isArray(t.symbols_touched)&&s.push({symbols_touched:t.symbols_touched,confidence:typeof t.confidence=="number"?t.confidence:void 0,timestamp:t.timestamp||n.name});}catch{}}catch{}}}catch{}return s}export{J as agentActivateCommand,U as agentBenchCommand,L as agentCreateCommand,_ as agentListCommand,M as agentRosterCommand,D as agentShowCommand,W as agentSyncCommand};
|
package/dist/chunk-R5ECMBIV.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {c,a as a$1}from'./chunk-YNDPSWOE.js';import {e as e$1}from'./chunk-VIG5LSGZ.js';import {a}from'./chunk-LKAT7IAK.js';import*as e from'fs';import*as i from'path';import*as S from'js-yaml';import l from'chalk';async function rs(P={}){let p=P.rootDir||process.cwd(),s=[],w=P.quiet,N=P.context;w||(console.log(l.blue(`
|
|
3
|
-
\u{1FA7A} Paradigm Doctor
|
|
4
|
-
`)),console.log(N?l.gray(`Running context audit checks...
|
|
5
|
-
`):l.gray(`Checking Paradigm setup...
|
|
6
|
-
`)));let I=a.command("doctor").start("Running health checks");if(!N){let E=function(t){let a=[];try{let o=e.readdirSync(t,{withFileTypes:!0});for(let r of o){if(r.name==="node_modules"||r.name==="dist"||r.name===".git")continue;let f=i.join(t,r.name);r.isDirectory()?a.push(...E(f)):r.name===".purpose"&&a.push(f);}}catch{}return a};let n=i.join(p,".paradigm");if(e.existsSync(n))if(e.statSync(n).isFile())s.push({name:".paradigm",status:"warn",message:"Legacy file format (should be directory)",fix:"paradigm upgrade --all"});else {s.push({name:".paradigm/",status:"ok",message:"Directory exists"});let a=i.join(n,"config.yaml");if(e.existsSync(a))try{let g=e.readFileSync(a,"utf8");e$1(g),s.push({name:".paradigm/config.yaml",status:"ok",message:"Valid YAML"});}catch(g){s.push({name:".paradigm/config.yaml",status:"error",message:`Invalid YAML: ${g.message}`,fix:"Check YAML syntax"});}else s.push({name:".paradigm/config.yaml",status:"missing",message:"Config file not found",fix:"paradigm init --force"});let o=["logger.md","probe.md","symbols.md"],r=i.join(n,"specs");if(e.existsSync(r))for(let g of o){let x=i.join(r,g);e.existsSync(x)?s.push({name:`.paradigm/specs/${g}`,status:"ok",message:"Present"}):s.push({name:`.paradigm/specs/${g}`,status:"missing",message:"Spec file not found",fix:"paradigm upgrade --all"});}else s.push({name:".paradigm/specs/",status:"missing",message:"Specs directory not found",fix:"paradigm upgrade --all"});let f=i.join(n,"docs");e.existsSync(f)?s.push({name:".paradigm/docs/",status:"ok",message:"Directory exists"}):s.push({name:".paradigm/docs/",status:"missing",message:"Docs directory not found",fix:"paradigm upgrade --all"});let h=i.join(n,"prompts");e.existsSync(h)?s.push({name:".paradigm/prompts/",status:"ok",message:"Directory exists"}):s.push({name:".paradigm/prompts/",status:"missing",message:"Prompts directory not found",fix:"paradigm upgrade --all"});let u=["specs","implementation-guides","prompts","decisions"],d=[];for(let g of u){let x=i.join(n,g);if(e.existsSync(x)&&e.statSync(x).isDirectory()){let k=i.join(x,".index.yaml");e.existsSync(k)||d.push(`.paradigm/${g}/`);}}d.length>0?s.push({name:"Docs-class indexes",status:"warn",message:`${d.length} director${d.length===1?"y":"ies"} missing .index.yaml: ${d.join(", ")}`,fix:"paradigm docs scaffold"}):s.push({name:"Docs-class indexes",status:"ok",message:"All docs-class directories have .index.yaml"});let y=i.join(n,"scan-index.json"),F=i.join(p,".paradigm-scan-index.json");if(e.existsSync(y)){let g=e.statSync(y),x=Date.now()-g.mtime.getTime(),k=Math.floor(x/(1e3*60*60));k>24?s.push({name:".paradigm/scan-index.json",status:"warn",message:`Stale (${k} hours old)`,fix:"paradigm index"}):s.push({name:".paradigm/scan-index.json",status:"ok",message:k>0?`${k} hours old`:"Fresh"});}else e.existsSync(F)?s.push({name:"scan-index",status:"warn",message:"Using legacy location",fix:"paradigm index"}):s.push({name:".paradigm/scan-index.json",status:"missing",message:"Not generated",fix:"paradigm index"});}else s.push({name:".paradigm/",status:"missing",message:"Not initialized",fix:"paradigm init"});let m=c(p);if(m.detected){let t=a$1(m.detected);if(t){let a=i.join(p,t.outputPath);e.existsSync(a)?s.push({name:t.outputPath,status:"ok",message:`Present (${m.detected})`}):s.push({name:t.outputPath,status:"missing",message:`Not generated for ${m.detected}`,fix:"paradigm sync"});}}let c$1=i.join(p,".premise");e.existsSync(c$1)?s.push({name:".premise",status:"ok",message:"Present"}):s.push({name:".premise",status:"missing",message:"Not found (optional)"});let v=i.join(p,".purpose");e.existsSync(v)?s.push({name:".purpose",status:"ok",message:"Present"}):s.push({name:".purpose",status:"warn",message:"Root .purpose not found",fix:"paradigm init"});let A=i.join(p,".paradigm","config.yaml");if(e.existsSync(A))try{let t=e.readFileSync(A,"utf8"),o=S.load(t)?.["purpose-required"];if(o&&Array.isArray(o)){let r=[];for(let f of o){if(!f.pattern)continue;let{glob:h}=await import('glob'),u=await h(f.pattern,{cwd:p,nodir:!1});for(let d of u){let y=i.join(p,d);try{e.statSync(y).isDirectory()&&!e.existsSync(i.join(y,".purpose"))&&r.push(d);}catch{}}}r.length>0?s.push({name:"Purpose-required",status:"warn",message:`${r.length} director${r.length===1?"y":"ies"} missing .purpose: ${r.join(", ")}`,fix:"Create .purpose files with paradigm_purpose_init + paradigm_purpose_add_component"}):s.push({name:"Purpose-required",status:"ok",message:"All required directories have .purpose files"});}}catch{}let q=/\[NEEDS CLARIFICATION:\s*[^\]]+\]/gi,R=0,Y=E(p);for(let t of Y)try{let o=e.readFileSync(t,"utf8").match(q);o&&(R+=o.length);}catch{}R>0?s.push({name:"Clarification markers",status:"warn",message:`${R} [NEEDS CLARIFICATION] marker${R>1?"s":""} found in .purpose files`,fix:"Resolve open clarification markers before shipping"}):Y.length>0&&s.push({name:"Clarification markers",status:"ok",message:"No unresolved markers"});let L=i.join(p,"portal.yaml");if(e.existsSync(L))try{let t=e.readFileSync(L,"utf8"),a=S.load(t);if(a?.version&&a?.gates){let o=Object.keys(a.gates||{}).length,r=Object.keys(a.routes||{}).length;s.push({name:"portal.yaml",status:"ok",message:`Valid (${o} gates, ${r} routes)`});}else s.push({name:"portal.yaml",status:"warn",message:"Missing version or gates section",fix:'Add version: "1.0" and gates: {} to portal.yaml'});}catch(t){s.push({name:"portal.yaml",status:"error",message:`Invalid YAML: ${t.message}`,fix:"Check YAML syntax in portal.yaml"});}if(e.existsSync(L))try{let{checkPortalCompliance:t,getComplianceSummary:a}=await import('./portal-compliance-JONQ4SOP.js'),o=await t(p),r=a(o);s.push({name:"Portal compliance",status:r.status,message:r.message,fix:r.status!=="ok"?"paradigm portal check":void 0});}catch{}let U=i.join(p,".paradigm","flows.yaml");if(e.existsSync(U))try{let t=e.readFileSync(U,"utf8"),a=S.load(t);if(a?.version&&a?.flows){let o=Object.keys(a.flows||{}).length,r=Object.entries(a.flows||{}).filter(([,f])=>!f?.steps||(f.steps?.length??0)===0);r.length>0?s.push({name:".paradigm/flows.yaml",status:"warn",message:`${o} flows defined, ${r.length} have no steps`,fix:"Add steps to empty flow definitions"}):s.push({name:".paradigm/flows.yaml",status:"ok",message:`Valid (${o} flows)`});}else s.push({name:".paradigm/flows.yaml",status:"warn",message:"Missing version or flows section",fix:'Ensure flows.yaml has version: "1.0" and flows: {}'});}catch(t){s.push({name:".paradigm/flows.yaml",status:"error",message:`Invalid YAML: ${t.message}`,fix:"Check YAML syntax in flows.yaml"});}let H=i.join(p,".paradigm","lore");if(e.existsSync(H))try{let t=e.readdirSync(H).filter(a=>a.endsWith(".yaml"));t.length===0?s.push({name:"Lore entries",status:"warn",message:"Lore directory exists but no entries found",fix:"Record a lore entry: paradigm lore record"}):s.push({name:"Lore entries",status:"ok",message:`${t.length} lore file${t.length>1?"s":""}`});}catch{s.push({name:"Lore entries",status:"warn",message:"Could not read lore directory"});}let G=i.join(p,".paradigm","university");if(e.existsSync(G))try{let t=i.join(G,"content"),a=0,o=0;if(e.existsSync(t))for(let r of ["notes","policies","quizzes","paths"]){let f=i.join(t,r);e.existsSync(f)&&(a+=e.readdirSync(f).filter(h=>h.endsWith(".md")||h.endsWith(".yaml")).length);}if(a===0)s.push({name:"University content",status:"warn",message:"University directory exists but no content found",fix:'Add content: paradigm university add note --title "Getting Started"'});else {let r=i.join(t,"quizzes");if(e.existsSync(r))for(let h of e.readdirSync(r).filter(u=>u.endsWith(".yaml")))try{let u=S.load(e.readFileSync(i.join(r,h),"utf8"));if(u?.questions)for(let d of u.questions)d.choices&&d.correct&&!(d.correct in d.choices)&&o++;}catch{}let f=i.join(t,"paths");if(e.existsSync(f))for(let h of e.readdirSync(f).filter(u=>u.endsWith(".yaml")))try{let u=S.load(e.readFileSync(i.join(f,h),"utf8"));if(u?.steps){for(let d of u.steps)if(d.content&&!d.content.startsWith("plsat:")){let y=!1;for(let F of ["notes","policies","quizzes","paths"]){let g=i.join(t,F);if(e.existsSync(g)&&e.readdirSync(g).some(k=>k.startsWith(d.content))){y=!0;break}}y||o++;}}}catch{}o>0?s.push({name:"University content",status:"warn",message:`${a} items, ${o} issue${o>1?"s":""}`,fix:"Run: paradigm university validate --deep"}):s.push({name:"University content",status:"ok",message:`${a} content item${a>1?"s":""}`});}}catch{s.push({name:"University content",status:"warn",message:"Could not read university directory"});}let _=i.join(p,".claude","hooks.json"),ss=i.join(p,"plugins","paradigm","hooks.json");if(e.existsSync(_)){let t=e.statSync(_),a=Date.now()-t.mtime.getTime(),o=Math.floor(a/(1e3*60*60*24));o>30?s.push({name:"Claude Code hooks",status:"warn",message:`Hooks are ${o} days old \u2014 may be outdated`,fix:"paradigm hooks install"}):s.push({name:"Claude Code hooks",status:"ok",message:o>0?`${o} days old`:"Fresh"});}else e.existsSync(ss)?s.push({name:"Claude Code hooks",status:"ok",message:"Using plugin hooks"}):s.push({name:"Claude Code hooks",status:"missing",message:"No hooks installed",fix:"paradigm hooks install"});let V=i.join(p,".paradigm","habits.yaml");if(e.existsSync(V))try{let t=e.readFileSync(V,"utf8"),a=S.load(t);if(a?.version&&Array.isArray(a?.habits)){let o=a.habits.filter(r=>r.enabled!==!1).length;s.push({name:"Habits config",status:"ok",message:`Valid (${o}/${a.habits.length} enabled)`});}else s.push({name:"Habits config",status:"warn",message:"Missing version or habits array",fix:"Regenerate habits.yaml with paradigm habits init"});}catch(t){s.push({name:"Habits config",status:"error",message:`Invalid YAML: ${t.message}`,fix:"Check YAML syntax in habits.yaml"});}let J=i.join(p,"AGENTS.md");if(e.existsSync(J)){let t=e.statSync(J),a=Date.now()-t.mtime.getTime(),o=Math.floor(a/(1e3*60*60*24));o>60?s.push({name:"AGENTS.md",status:"warn",message:`${o} days since last update \u2014 may be stale`,fix:"paradigm sync"}):s.push({name:"AGENTS.md",status:"ok",message:o>0?`Updated ${o} days ago`:"Fresh"});}}let T=0,W=0,$=0;for(let n of s){let m,c;switch(n.status){case "ok":m="\u2713",c=l.green;break;case "warn":m="\u26A0",c=l.yellow,W++;break;case "error":m="\u2717",c=l.red,T++;break;case "missing":m="\u25CB",c=l.gray,$++;break}if(!w){let v=n.name.padEnd(30);console.log(` ${c(m)} ${v} ${c(n.message)}`),n.fix&&console.log(l.gray(` \u2514\u2500 Fix: ${n.fix}`));}}let{runContextAudit:Z}=await import('./context-audit-JVCA6GSV.js'),M=await Z(p,{quiet:w}),z=0,O=0,b=0;!w&&M.length>0&&(console.log(""),console.log(l.blue(" Context Audit")),console.log(l.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")));for(let n of M){let m,c;switch(n.status){case "ok":m="\u2713",c=l.green;break;case "warn":m="\u26A0",c=l.yellow,O++;break;case "error":m="\u2717",c=l.red,z++;break;case "advisory":m="\u2139",c=l.cyan,b++;break}if(!w){let v=n.check.padEnd(30);if(console.log(` ${c(m)} ${v} ${c(n.message)}`),n.details&&n.details.length>0){let A=n.details.slice(0,5);for(let q of A)console.log(l.gray(` \u2502 ${q}`));n.details.length>5&&console.log(l.gray(` \u2502 ... and ${n.details.length-5} more`));}n.fix&&console.log(l.gray(` \u2514\u2500 Fix: ${n.fix}`));}}let C=T+z,j=W+O,D=C+j+$===0;if(!w)if(console.log(""),D)console.log(l.green(`\u2728 All checks passed!
|
|
7
|
-
`));else {let n=[];C>0&&n.push(l.red(`${C} error${C>1?"s":""}`)),j>0&&n.push(l.yellow(`${j} warning${j>1?"s":""}`)),$>0&&n.push(l.gray(`${$} missing`)),b>0&&n.push(l.cyan(`${b} advisor${b>1?"ies":"y"}`)),console.log(`${n.join(", ")} found.
|
|
8
|
-
`),console.log(l.gray("Run the suggested commands to fix issues.")),console.log(l.gray(`Troubleshooting guide: .paradigm/docs/troubleshooting.md
|
|
9
|
-
`));}if(!w&&P.explain&&!D)try{let{narrateAllGaps:n}=await import('./gap-narrator-NTXLUI7I.js'),m=[];for(let c of s)c.status!=="ok"&&(c.name===".purpose"||c.name.startsWith("Purpose-required")?m.push({type:"missing-purpose",target:c.name,severity:"improvement"}):c.name===".paradigm/scan-index.json"&&c.status==="warn"?m.push({type:"index-stale",target:c.name,severity:"improvement"}):c.name==="Portal compliance"?m.push({type:"portal-mismatch",target:c.name,severity:c.status==="error"?"blocking":"improvement"}):c.name==="Clarification markers"&&m.push({type:"missing-description",target:c.name,severity:"improvement"}));if(m.length>0){let c=n(m);console.log(l.blue(`
|
|
10
|
-
Gap Narrations (--explain)
|
|
11
|
-
`)),console.log(l.gray(c.narrative)),console.log("");}}catch{}D?I.success("All health checks passed",{total:s.length+M.length}):I.error("Health checks found issues",{errors:C,warnings:j,missing:$,advisories:b});try{let{captureSnapshot:n}=await import('./metrics-UESGUHTA.js');n(p);}catch{}return D}export{rs as a};
|
package/dist/doctor-IG5XM4C4.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {c as c$1}from'./chunk-Z72SDTBJ.js';import {a}from'./chunk-LKAT7IAK.js';import'./chunk-5TAVYPOV.js';import*as c from'fs';import*as u from'path';import*as v from'os';import e from'chalk';import*as k from'js-yaml';var S=process.env.NEVR_REGISTRY_URL||"https://nevr-api.onrender.com",x=u.join(v.homedir(),".paradigm","agents"),A=".paradigm/agents";async function O(g,p){let r=a.command("agent-search").start("Searching nevr.land registry",{query:g}),s=parseInt(p.limit||"10",10);try{let{RegistryClient:a}=await import('./dist-QBTQW4ZW.js'),d=await new a({baseUrl:S}).search(g,{page:1}),o=d.agents.slice(0,s);if(!o||o.length===0){console.log(e.dim(`
|
|
3
|
-
No agents found.
|
|
4
|
-
`)),r.success("No results");return}console.log(e.bold(`
|
|
5
|
-
${o.length} agent(s) found`)+e.dim(` (of ${d.total})
|
|
6
|
-
`));for(let n of o){let i=n.scope.startsWith("@")?n.scope:`@${n.scope}`,h=e.cyan(`${i}/${n.name}`),t=e.dim("v"+(n.latestVersion||"0.1.0")),m=n.downloads>0?e.dim(` | ${n.downloads} downloads`):"",b=n.calibrationScore!=null?e.dim(` | calibration: ${(n.calibrationScore*100).toFixed(0)}%`):"";console.log(` ${h} ${t}${m}${b}`),n.description&&console.log(` ${n.description}`),n.tags?.length&&console.log(` ${e.dim("tags:")} ${n.tags.join(", ")}`),console.log();}console.log(e.dim(` Install: paradigm agent install @scope/name
|
|
7
|
-
`)),r.success(`Found ${o.length} agents`);}catch(a){console.error(e.red(`
|
|
8
|
-
Search failed:`),a instanceof Error?a.message:a),console.log(""),r.error("Search failed");}}async function D(g,p){let r=a.command("agent-install").start("Installing agent from registry",{source:g}),s=g,a$1,f=s.lastIndexOf("@");f>0&&s[f-1]!=="/"&&(a$1=s.substring(f+1),s=s.substring(0,f));let d=s.indexOf("/");if(d===-1){console.error(e.red(`
|
|
9
|
-
Invalid agent name. Use @scope/name format.
|
|
10
|
-
`)),r.error("Invalid agent name format");return}let o=s.substring(0,d).replace(/^@/,""),n=s.substring(d+1);console.log(e.dim(`
|
|
11
|
-
Installing ${o}/${n}${a$1?"@"+a$1:""}...`));try{let{RegistryClient:i}=await import('./dist-QBTQW4ZW.js'),h=new i({baseUrl:S}),t=await h.getAgent(o,n);if(!t){console.error(e.red(`
|
|
12
|
-
Agent @${o}/${n} not found.
|
|
13
|
-
`)),r.error("Agent not found");return}let m=p.global?x:u.join(process.cwd(),A);c.existsSync(m)||c.mkdirSync(m,{recursive:!0});let b=!1;try{let y=await h.downloadPackage(o,n,a$1||"latest"),R=u.join(m,`${n}.nevr.tar.gz`);c.writeFileSync(R,y.buffer),b=!0,a.component("#agent-registry").info("Package downloaded",{agent:`${o}/${n}`,hash:y.hash.slice(0,12),size:y.buffer.length});}catch{a.component("#agent-registry").info("Package not available, creating metadata-only profile",{agent:`${o}/${n}`});}let $={id:n,nickname:t.nickname||t.displayName||n,role:t.description||"",description:t.description||"",version:a$1||t.latestVersion||"0.1.0",scope:`@${o}`,registry:S,distribution:t.distribution,installedAt:new Date().toISOString(),personality:{style:"deliberate",risk:"balanced",verbosity:"concise"},expertise:[],transferable:[],contexts:{},created:new Date().toISOString(),updated:new Date().toISOString()};t.brandColor&&($.brandColor=t.brandColor),t.tags?.length&&($.tags=t.tags);let w=u.join(m,`${n}.agent`);c.writeFileSync(w,k.dump($,{lineWidth:120,noRefs:!0,sortKeys:!1}),"utf-8");try{await c$1(process.cwd(),n,{adopted:new Date().toISOString(),source:"marketplace",defaultsAccepted:!0,version:a$1||t.latestVersion||"0.1.0"});}catch{a.component("#agent-registry").info("Adoption record skipped (no .paradigm dir)",{agent:n});}b?console.log(e.green(`
|
|
14
|
-
\u2713 Installed @${o}/${n}`)):(console.log(e.green(`
|
|
15
|
-
\u2713 Installed @${o}/${n} (metadata only)`)),console.log(e.dim(" Package not yet available for download."))),console.log(e.dim(` Location: ${w}`)),console.log(e.dim(` Run: paradigm agent show ${n}
|
|
16
|
-
`)),r.success(`Installed ${o}/${n}`);}catch(i){console.error(e.red(`
|
|
17
|
-
Install failed:`),i instanceof Error?i.message:i),console.log(""),r.error("Install failed");}}async function F(g){let p=a.command("agent-publish").start("Agent publish info",{});console.log(e.bold(`
|
|
18
|
-
Publishing agents to nevr.land
|
|
19
|
-
`)),console.log(" Use the nevr CLI to publish:"),console.log(e.cyan(" npm install -g @a-company/nevr")),console.log(e.cyan(" nevr auth login")),console.log(e.cyan(" nevr publish")),console.log(""),console.log(e.dim(` Full paradigm publish integration coming soon.
|
|
20
|
-
`)),p.success("Showed publish instructions");}export{D as agentInstallCommand,F as agentPublishCommand,O as agentSearchCommand};
|
package/dist/reindex-FWPD2VGM.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
export{qa as getReindexToolsList,ra as handleReindexTool,sa as rebuildStaticFiles}from'./chunk-PHEX6LU4.js';import'./chunk-M4UMM6DC.js';import'./chunk-GRZQIKST.js';import'./chunk-TNVWGPCE.js';import'./chunk-EK4ZRIFJ.js';import'./chunk-GAFKOFAV.js';import'./chunk-5TAVYPOV.js';
|
package/dist/shift-TVNY2CQF.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {a as a$4,d as d$3,b as b$2,e as e$1,f}from'./chunk-Z72SDTBJ.js';import {b}from'./chunk-FEYOQMZ5.js';import'./chunk-6SKSV5B2.js';import'./chunk-TYWB5IQJ.js';import'./chunk-WESTEMIM.js';import'./chunk-FYDRENK7.js';import'./chunk-IZSBGW6E.js';import {d as d$2}from'./chunk-AO7ZSRME.js';import'./chunk-Y4XFVDZC.js';import {a as a$6}from'./chunk-3DZK54RU.js';import {d as d$1}from'./chunk-TOYQ2QCB.js';import {a as a$3,b as b$1}from'./chunk-GE3GQALR.js';import {a as a$7}from'./chunk-R5ECMBIV.js';import'./chunk-EKZDFEJW.js';import {a as a$1}from'./chunk-4PSD5R7N.js';import {b as b$3}from'./chunk-Y4P4SGZV.js';import'./chunk-4TXOVRWD.js';import'./chunk-VCKKJDLP.js';import'./chunk-WR6D3SC6.js';import {a as a$2}from'./chunk-UIKLE3WD.js';import {a as a$5}from'./chunk-UZ5H7K6Q.js';import'./chunk-LPBCQM5Y.js';import'./chunk-LWAIVOSF.js';import'./chunk-JIXHEBGK.js';import'./chunk-ZJQY5PPP.js';import'./chunk-YNDPSWOE.js';import'./chunk-VIG5LSGZ.js';import {a}from'./chunk-LKAT7IAK.js';import'./chunk-5TAVYPOV.js';import*as s from'fs';import*as ne from'os';import*as d from'path';import e from'chalk';import ke from'ora';import*as h from'js-yaml';import*as v from'fs/promises';var ae=[{path:".paradigm/config.yaml",defaultContent:['version: "2.0"','project: ""','description: ""','initialized: ""'].join(`
|
|
3
|
-
`)+`
|
|
4
|
-
`},{path:".paradigm/agents.yaml",defaultContent:['version: "1.0"',"agents: []"].join(`
|
|
5
|
-
`)+`
|
|
6
|
-
`},{path:".paradigm/roster.yaml",defaultContent:['version: "1.0"',"active: []"].join(`
|
|
7
|
-
`)+`
|
|
8
|
-
`},{path:".paradigm/adoptions.yaml",defaultContent:['version: "1.0"','adopted-at: ""','project-type: ""',"agents: {}"].join(`
|
|
9
|
-
`)+`
|
|
10
|
-
`},{path:".paradigm/team-state.yaml",defaultContent:['version: "1.0"',"models: {}","state: {}"].join(`
|
|
11
|
-
`)+`
|
|
12
|
-
`},{path:".paradigm/fixtures.yaml",defaultContent:['version: "1.0"',"fixtures: []"].join(`
|
|
13
|
-
`)+`
|
|
14
|
-
`},{path:".paradigm/navigator.yaml",defaultContent:['version: "1.0"',"entries: []"].join(`
|
|
15
|
-
`)+`
|
|
16
|
-
`},{path:".paradigm/flows.yaml",defaultContent:['version: "1.0"',"flows: []"].join(`
|
|
17
|
-
`)+`
|
|
18
|
-
`},{path:".paradigm/tags.yaml",defaultContent:['version: "1.0"',"tags: []"].join(`
|
|
19
|
-
`)+`
|
|
20
|
-
`},{path:".paradigm/habits.yaml",defaultContent:['version: "1.0"',"habits: []"].join(`
|
|
21
|
-
`)+`
|
|
22
|
-
`},{path:".paradigm/graduation.yaml",defaultContent:['version: "1.0"',"graduations: []"].join(`
|
|
23
|
-
`)+`
|
|
24
|
-
`},{path:"portal.yaml",defaultContent:['version: "2.0"',"gates: {}","routes: {}"].join(`
|
|
25
|
-
`)+`
|
|
26
|
-
`},{path:".purpose",defaultContent:['version: "2.0"',"id: root",'description: ""',"components: []"].join(`
|
|
27
|
-
`)+`
|
|
28
|
-
`},{path:".premise",defaultContent:['version: "1.0"','premise: ""'].join(`
|
|
29
|
-
`)+`
|
|
30
|
-
`},{path:".paradigm/events/stream.jsonl",defaultContent:""},{path:".paradigm/events/nominations.jsonl",defaultContent:""},{path:".paradigm/events/debates.jsonl",defaultContent:""},{path:".paradigm/events/notebook-refs.jsonl",defaultContent:""},{path:".paradigm/events/session-log.jsonl",defaultContent:""},{path:".paradigm/history/index.yaml",defaultContent:['version: "1.0"',"entries: []"].join(`
|
|
31
|
-
`)+`
|
|
32
|
-
`},{path:".paradigm/history/log.jsonl",defaultContent:""},{path:".paradigm/lore/timeline.yaml",defaultContent:['version: "1.0"',"entries: []"].join(`
|
|
33
|
-
`)+`
|
|
34
|
-
`},{path:".paradigm/wisdom/antipatterns.yaml",defaultContent:['version: "1.0"',"antipatterns: []"].join(`
|
|
35
|
-
`)+`
|
|
36
|
-
`},{path:".paradigm/personas/index.yaml",defaultContent:['version: "1.0"',"personas: {}"].join(`
|
|
37
|
-
`)+`
|
|
38
|
-
`},{path:".paradigm/protocols/index.yaml",defaultContent:['version: "1.0"',"protocols: []"].join(`
|
|
39
|
-
`)+`
|
|
40
|
-
`},{path:".paradigm/notebooks/",defaultContent:"",isDir:true},{path:".paradigm/university/config.yaml",defaultContent:['version: "1.0"',"enabled: true","auto-enroll: true"].join(`
|
|
41
|
-
`)+`
|
|
42
|
-
`},{path:".paradigm/university/index.yaml",defaultContent:['version: "1.0"',"entries: []"].join(`
|
|
43
|
-
`)+`
|
|
44
|
-
`},{path:".paradigm/university/content/notes/",defaultContent:"",isDir:true},{path:".paradigm/university/content/policies/",defaultContent:"",isDir:true},{path:".paradigm/university/content/quizzes/",defaultContent:"",isDir:true},{path:".paradigm/university/content/paths/",defaultContent:"",isDir:true},{path:"CLAUDE.md",defaultContent:`# Project Context
|
|
45
|
-
|
|
46
|
-
Generated by paradigm shift.
|
|
47
|
-
`},{path:"AGENTS.md",defaultContent:`# Agents
|
|
48
|
-
|
|
49
|
-
Generated by paradigm shift.
|
|
50
|
-
`},{path:".cursor/rules/",defaultContent:"",isDir:true},{path:".claude/hooks/",defaultContent:"",isDir:true}];async function Y(o){let n=[],l=[];for(let r of ae){let p=d.join(o,r.path);if(r.isDir)await Q(p)?l.push(r.path):(await v.mkdir(p,{recursive:true}),n.push(r.path));else if(await Q(p))l.push(r.path);else {let i=d.dirname(p);await v.mkdir(i,{recursive:true}),await v.writeFile(p,r.defaultContent,"utf-8"),n.push(r.path);}}return {created:n,existed:l}}async function Q(o){try{return await v.access(o),!0}catch{return false}}var ie=4,se=50,ce=['description: ""',"components: []","description: ''"],le={"claude-code":["opus","sonnet","haiku"],cursor:["sonnet","sonnet","haiku"],fallback:["sonnet","sonnet","sonnet"]};async function Z(o){let n=await Promise.allSettled([de(o),me(o),pe(o),fe(o),ue(o),ge(o),he(o),ye(o),we()]),l=[];for(let i of n)i.status==="fulfilled"&&i.value&&l.push(i.value);l.sort((i,j)=>i.priority-j.priority);let r=l.filter(i=>i.type==="action"),p=l.filter(i=>i.type==="info");return [...r.slice(0,ie),...p]}function ee(o){if(o.length===0)return "";let n=o.filter(f=>f.type==="action"),l=o.filter(f=>f.type==="info"),r=[];r.push(""),r.push(e.bold(" Recommendations")),r.push(e.gray(" "+"\u2500".repeat(49)));for(let f=0;f<n.length;f++){let i=n[f],j=e.white(` ${f+1}. `),k=e.white(i.message);i.command?(r.push(j+k),r.push(" "+e.cyan(i.command))):r.push(j+k);}if(l.length>0){r.push("");for(let f of l)r.push(e.dim(" "+f.message));}let p=n.length;if(p>0){r.push("");let f=p===1?"item needs":"items need";r.push(e.dim(` ${p} ${f} attention.`));}return r.push(""),r.join(`
|
|
51
|
-
`)}async function de(o){let n=d.join(o,".purpose");try{let l=await v.readFile(n,"utf-8");if(l.trim().length<se)return {id:"empty-purpose",priority:1,message:"Edit `.purpose` to define your project's features",command:void 0,type:"action"};if(ce.some(p=>l.includes(p)))return {id:"empty-purpose",priority:1,message:"Edit `.purpose` to define your project's features",command:void 0,type:"action"}}catch{return {id:"empty-purpose",priority:1,message:"Edit `.purpose` to define your project's features",command:void 0,type:"action"}}return null}async function me(o){let n=["src","packages","apps"];for(let r of n){let p=d.join(o,r);if(!s.existsSync(p))continue;if(await te(p))return null}return n.some(r=>s.existsSync(d.join(o,r)))?{id:"no-sub-purpose",priority:2,message:"Add `.purpose` files to feature directories",command:void 0,type:"action"}:null}async function pe(o){let n=d.join(o,"portal.yaml");try{let l=await v.readFile(n,"utf-8"),r=l.includes("gates:")&&!l.match(/gates:\s*(\[\]|\{\})\s*$/m)&&!l.match(/gates:\s*(\[\]|\{\})\s*\n/),p=l.includes("routes:")&&!l.match(/routes:\s*(\[\]|\{\})\s*$/m)&&!l.match(/routes:\s*(\[\]|\{\})\s*\n/);if(!r&&!p)return {id:"empty-portal",priority:3,message:"Define auth gates in `portal.yaml` if your project has auth",command:void 0,type:"action"}}catch{return {id:"empty-portal",priority:3,message:"Define auth gates in `portal.yaml` if your project has auth",command:void 0,type:"action"}}return null}async function fe(o){let n=d.join(o,".paradigm","agents.yaml");try{let l=await v.readFile(n,"utf-8");if(l.includes("agents: []")||l.trim().length<40)return {id:"agents-unconfigured",priority:4,message:"Review agent roles",command:"paradigm agent list",type:"action"}}catch{return null}return null}async function ue(o){let n=d.join(o,".paradigm",".pending-scope-reviews");return s.existsSync(n)?{id:"pending-scope-reviews",priority:2,message:"Review agent scopes",command:"paradigm agent review",type:"action"}:null}async function ge(o){let n=d.join(o,".paradigm","config.yaml");try{let l=await v.readFile(n,"utf-8");if(!l.includes("model-resolution"))return null;let r=l.match(/tier-1:\s*(\S+)/),p=l.match(/tier-2:\s*(\S+)/),f=l.match(/tier-3:\s*(\S+)/);if(!r||!p||!f)return null;let i=[r[1].replace(/['"]/g,""),p[1].replace(/['"]/g,""),f[1].replace(/['"]/g,"")];if(Object.values(le).some(k=>k[0]===i[0]&&k[1]===i[1]&&k[2]===i[2]))return {id:"model-tiers-default",priority:5,message:"Fine-tune model tiers",command:"paradigm team models",type:"action"}}catch{return null}return null}async function he(o){let n=d.join(o,".paradigm","lore","entries");try{if((await v.readdir(n)).filter(p=>!p.startsWith(".")).length===0)return {id:"no-lore",priority:8,message:"Lore records automatically as you work",command:void 0,type:"info"}}catch{return {id:"no-lore",priority:8,message:"Lore records automatically as you work",command:void 0,type:"info"}}return null}async function ye(o){let n=d.join(o,".paradigm","notebooks");try{if((await v.readdir(n)).filter(p=>!p.startsWith(".")).length===0)return {id:"no-notebooks",priority:8,message:"Agent notebooks build over time",command:void 0,type:"info"}}catch{return {id:"no-notebooks",priority:8,message:"Agent notebooks build over time",command:void 0,type:"info"}}return null}async function we(){return {id:"verify-not-run",priority:6,message:"Verify setup health",command:"paradigm doctor --verify",type:"action"}}async function te(o,n=0){if(n>4)return false;try{let l=await v.readdir(o,{withFileTypes:!0});for(let r of l)if(!(r.isDirectory()&&["node_modules","dist",".git",".next",".paradigm","build","out","target",".turbo"].includes(r.name))&&(r.name===".purpose"&&!r.isDirectory()||r.isDirectory()&&await te(d.join(o,r.name),n+1)))return !0}catch{a.operation("shift-recommendations").debug("Could not read directory",{dir:o});}return false}var oe=new Set(["architect","builder","reviewer","security","advocate","tester","compliance","documentor"]),M={architect:{nickname:"Apex",role:"System design, specifications"},builder:{nickname:"Kit",role:"Implementation, tests"},reviewer:{nickname:"Judge",role:"Code quality, compliance"},security:{nickname:"Aegis",role:"Auth flows, vulnerability scanning"},advocate:{nickname:"Jinx",role:"Stress testing, edge cases"},tester:{nickname:"Probe",role:"Unit and integration tests"},compliance:{nickname:"Rune",role:"Symbol compliance enforcement"},documentor:{nickname:"Scribe",role:".purpose, portal.yaml maintenance"}};function Se(o){let n=[],l=d.join(ne.homedir(),".paradigm","agents");for(let[r,p]of Object.entries(o.agents)){let f,i=r,j=d.join(l,`${r}.agent`);if(s.existsSync(j))try{let x=s.readFileSync(j,"utf8"),C=h.load(x);C?.nickname&&(f=C.nickname),C?.role&&(i=C.role);}catch{}!f&&M[r]&&(f=M[r].nickname,i=M[r].role);let k=p.source==="core"||p.source==="ecosystem"?p.source:oe.has(r)?"core":"ecosystem";n.push({id:r,nickname:f,role:i,source:k});}return n}async function _e(o={}){let n=process.cwd(),l=d.basename(n),r=d.join(n,".paradigm"),p=s.existsSync(r)&&s.statSync(r).isDirectory();console.log(e.blue(`
|
|
52
|
-
\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510`)),console.log(e.blue("\u2502")+e.white.bold(" paradigm shift ")+e.blue("\u2502")),console.log(e.blue("\u2502")+e.gray(" Full project setup in one command ")+e.blue("\u2502")),console.log(e.blue(`\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
|
|
53
|
-
`)),console.log(e.white(` \u{1F4C1} Project: ${e.cyan(l)}`)),console.log(e.white(` \u{1F4CD} Status: ${p?e.green("Paradigm detected"):e.yellow("New project")}`)),console.log("");let f$1=a.command("shift").start("Running paradigm shift",{project:l}),i=ke();if(!p||o.force){i.start("Step 1/6: Initializing Paradigm...");try{await a$1({force:o.force,quick:!0,name:l,stack:o.stack}),i.succeed(e.green("Paradigm initialized"));}catch(t){i.fail(e.red(`Init failed: ${t.message}`)),f$1.error("Shift failed at init",{error:t.message});return}}else {i.succeed(e.gray("Step 1/6: Already initialized (use --force to reinit)"));let t=d.join(r,"config.yaml");if(s.existsSync(t))try{let a=s.readFileSync(t,"utf8"),c=h.load(a);if(!c.discipline||c.discipline==="auto"){let m=a$2(n);if(m!=="backend"){let u=a.replace(/^discipline:\s*auto\b.*$/m,`discipline: ${m}`);u!==a&&(s.writeFileSync(t,u,"utf8"),console.log(e.green(` \u2713 Detected discipline: ${e.cyan(m)} (updated config.yaml)`)));}else if(!c.discipline){let u=a.replace(/^(project:\s*.+)$/m,`$1
|
|
54
|
-
discipline: ${m}`);u!==a&&(s.writeFileSync(t,u,"utf8"),console.log(e.green(` \u2713 Added discipline: ${e.cyan(m)} to config.yaml`)));}}}catch(a$1){a.operation("shift").debug("Discipline detection failed",{error:a$1.message});}}if(p){i.start("Step 1b/6: Checking for migrations...");try{let{migrateCommand:t}=await import('./migrate-Z5UQN57G.js');await t({apply:!0,quiet:!0,noSync:!0}),i.succeed(e.green("Migrations applied"));}catch(t){i.warn(e.yellow(`Migration warning: ${t.message}`));}}{let t=d.join(r,"config.yaml");if(o.workspace&&s.existsSync(t)){let a$1=o.workspacePath?d.resolve(n,o.workspacePath):d.join(d.dirname(n),".paradigm-workspace");if(s.existsSync(a$1))try{let c=h.load(s.readFileSync(a$1,"utf8")),m=d.basename(n),u=d.dirname(a$1),g="./"+d.relative(u,n);if(c.members.some(b=>d.resolve(u,b.path)===n))console.log(e.green(` \u2713 Already a member of workspace: ${e.cyan(c.name)}`));else {let b=d$1(m,n);c.members.push({name:m,path:g,...b&&{role:b}}),s.writeFileSync(a$1,h.dump(c,{indent:2,lineWidth:120,noRefs:!0,sortKeys:!1,quotingType:'"'}),"utf8"),console.log(e.green(` \u2713 Joined workspace: ${e.cyan(c.name)} (added as member)`));}}catch(c){console.log(e.yellow(` \u26A0 Failed to join workspace: ${c.message}`));}else try{let c=d.basename(n),m=d.dirname(a$1),u="./"+d.relative(m,n),g=d$1(c,n),y={version:"1.0",name:o.workspace,members:[{name:c,path:u,...g&&{role:g}}]};s.mkdirSync(d.dirname(a$1),{recursive:!0}),s.writeFileSync(a$1,h.dump(y,{indent:2,lineWidth:120,noRefs:!0,sortKeys:!1,quotingType:'"'}),"utf8"),console.log(e.green(` \u2713 Created workspace: ${e.cyan(o.workspace)} at ${e.gray(d.relative(n,a$1))}`));}catch(c){console.log(e.yellow(` \u26A0 Failed to create workspace: ${c.message}`));}try{let c=s.readFileSync(t,"utf8"),m=h.load(c),u=d.relative(n,a$1);if(m.workspace!==u){if(m.workspace){let g=c.replace(/^workspace:\s*.*$/m,`workspace: "${u}"`);s.writeFileSync(t,g,"utf8");}else {let g=c.trimEnd()+`
|
|
55
|
-
workspace: "${u}"
|
|
56
|
-
`;s.writeFileSync(t,g,"utf8");}console.log(e.green(" \u2713 Linked workspace in config.yaml"));}}catch(c){a.operation("shift").debug("Workspace config link failed",{error:c.message});}}else if(s.existsSync(t))try{let a=s.readFileSync(t,"utf8");if(!h.load(a).workspace){let m=d.dirname(n);for(let u=0;u<3;u++){let g=d.join(m,".paradigm-workspace");if(s.existsSync(g)){let b=d.relative(n,g),re=a.trimEnd()+`
|
|
57
|
-
workspace: "${b}"
|
|
58
|
-
`;s.writeFileSync(t,re,"utf8"),console.log(e.green(` \u2713 Found workspace: ${e.cyan(b)} (added to config.yaml)`));break}let y=d.dirname(m);if(y===m)break;m=y;}}}catch(a$1){a.operation("shift").debug("Workspace auto-detect failed",{error:a$1.message});}}if(!d$2(n)||o.force){console.log(e.cyan(" Step 2/6: Initializing team configuration..."));try{await b(n,{force:o.force,json:!1,configureModels:o.configureModels||!1,noConfigureModels:!o.configureModels}),console.log(e.green(` \u2713 Team configuration initialized
|
|
59
|
-
`));}catch(t){console.log(e.yellow(` \u26A0 Team init warning: ${t.message}
|
|
60
|
-
`));}}else i.succeed(e.gray("Step 2/6: Team already configured (use --force to reinit)"));let k=d.join(n,".paradigm","roster.yaml");if(!s.existsSync(k)||o.force)try{let t=a$3(n),a=b$1[t]||b$1.generic,c={version:"1.0",project:l,type:t,active:a.sort()};s.writeFileSync(k,h.dump(c,{lineWidth:-1,noRefs:!0}),"utf8"),console.log(e.green(` \u2713 Agent roster set: ${e.cyan(a.length)} agents for ${e.cyan(t)}`));}catch(t){a.operation("shift").debug("Roster setup failed",{error:t.message});}else try{let a=h.load(s.readFileSync(k,"utf8"))?.active?.length??0;console.log(e.gray(` \u2713 Agent roster exists (${a} agents active)`));}catch{console.log(e.gray(" \u2713 Agent roster exists"));}{let t=d.join(n,".paradigm","adoptions.yaml"),a$1=s.existsSync(t);try{let c=a$3(n),m=a$1?await a$4(n):null,u=m&&Object.keys(m.agents).length>0;if(!u&&s.existsSync(k))m=await d$3(n),await b$2(n,m),a.operation("shift").debug("Migrated roster to adoptions",{count:Object.keys(m.agents).length});else if(!u){m=e$1(c);let g=s.existsSync(k)?h.load(s.readFileSync(k,"utf8")):{active:[]},y=new Date().toISOString();for(let b of g.active||[])m.agents[b]={adopted:y,source:oe.has(b)?"core":"ecosystem",defaultsAccepted:!0};Object.keys(m.agents).length>0&&await b$2(n,m);}if(m&&Object.keys(m.agents).length>0){let g=Se(m),y=f(g,c);console.log(y),console.log(e.green(` \u2713 ${Object.keys(m.agents).length} agents adopted`));}}catch(c){a.operation("shift").debug("Adoption ceremony failed",{error:c.message});}}{let t=d.join(r,"config.yaml");if(s.existsSync(t))try{let a=s.readFileSync(t,"utf8"),c=h.load(a);if(!c["model-resolution"]||o.force){let{ModelDiscovery:m}=await import('./model-discovery-HMB3YI4L.js'),g=new m(n).detectEnvironment(),y;g==="claude-code"?y={"tier-1":"opus","tier-2":"sonnet","tier-3":"haiku"}:g==="cursor"?y={"tier-1":"sonnet","tier-2":"sonnet","tier-3":"haiku"}:y={"tier-1":"sonnet","tier-2":"sonnet","tier-3":"sonnet"},c["model-resolution"]=y,s.writeFileSync(t,h.dump(c,{lineWidth:-1,noRefs:!0}),"utf8"),console.log(e.green(` \u2713 Model tiers configured for ${e.cyan(g)}: tier-1=${y["tier-1"]}, tier-2=${y["tier-2"]}, tier-3=${y["tier-3"]}`));}}catch(a$1){a.operation("shift").debug("Model tier config failed",{error:a$1.message});}}try{let{ensureEnforcementDefaults:t}=await import('./enforcement-BEGPQIUN.js');t(n)&&console.log(e.green(` \u2713 Enforcement config initialized (${e.cyan("balanced")} preset)`));}catch(t){a.operation("shift").debug("Enforcement config setup failed",{error:t.message});}{i.start("Ensuring core files...");try{let{created:t,existed:a}=await Y(n);i.succeed(e.green(`Core files ensured: ${e.cyan(String(t.length))} created, ${e.cyan(String(a.length))} already existed`));}catch(t){i.warn(e.yellow(`Guaranteed files warning: ${t.message}`));}}if(o.quick)i.succeed(e.gray("Step 3/6: Skipped scan (--quick mode)"));else {i.start("Step 3/6: Scanning and indexing symbols...");try{await b$3(n,{quiet:!0}),i.succeed(e.green("Symbols indexed"));}catch(t){i.warn(e.yellow(`Scan warning: ${t.message}`));}}{let t=d.join(r,"config.yaml");if(s.existsSync(t))try{if(h.load(s.readFileSync(t,"utf8")).workspace){i.start("Step 3b/6: Reindexing workspace members...");try{let{workspaceReindexCommand:c}=await import('./workspace-VMSPYIBV.js');await c({quiet:!0}),i.succeed(e.green("Workspace members reindexed"));}catch(c){i.warn(e.yellow(`Workspace reindex: ${c.message}`));}}}catch(a$1){a.operation("shift").debug("Workspace config read failed",{error:a$1.message});}}let x=d.join(n,"portal.yaml");s.existsSync(x)||s.writeFileSync(x,h.dump({version:"1.0.0",gates:{},routes:{}},{lineWidth:-1,noRefs:true}),"utf8");let C=d.join(n,".paradigm","lore");s.existsSync(C)||s.mkdirSync(C,{recursive:true});let I=d.join(n,".paradigm","university");for(let t of ["content/notes","content/policies","content/quizzes","content/paths","diplomas"]){let a=d.join(I,t);s.existsSync(a)||s.mkdirSync(a,{recursive:true});}let N=d.join(I,"config.yaml");if(!s.existsSync(N)){let t="Project";try{let c=d.join(n,".paradigm","config.yaml");if(s.existsSync(c)){let m=h.load(s.readFileSync(c,"utf8"));m.project&&typeof m.project=="string"&&(t=m.project);}}catch{}let a={branding:{name:`${t} University`,tagline:`Learn the ${t} codebase`,institution:t},theme:{primary:"#6366f1",secondary:"#8b5cf6",accent:"#f59e0b",background:"#0f172a",surface:"#1e293b",text:"#f8fafc",textMuted:"#94a3b8",success:"#22c55e",error:"#ef4444",font:"Inter, system-ui, sans-serif"},content:{categories:[],defaultDifficulty:"beginner",requireApproval:false},diplomas:{includeGlobalPLSAT:true}};s.writeFileSync(N,h.dump(a,{lineWidth:-1,noRefs:true}),"utf8");}i.start("Step 4/6: Syncing IDE configurations...");try{let t=o.ide?[o.ide]:["claude","cursor","copilot","windsurf","agents"],a=[];for(let c of t)try{await a$5(c,{quiet:!0,force:!0}),a.push(c);}catch{}a.length>0?i.succeed(e.green(`IDE configs synced: ${a.join(", ")}`)):i.warn(e.yellow("No IDE configs to sync"));}catch(t){i.warn(e.yellow(`Sync warning: ${t.message}`));}i.start("Step 5/6: Installing hooks...");try{await a$6({force:o.force}),i.succeed(e.green("Hooks installed (git + Claude Code + Cursor)"));}catch(t){i.warn(e.yellow(`Hooks warning: ${t.message}`));}if(o.verify){i.start("Step 6/6: Running health checks...");try{await a$7({quiet:!0})?i.succeed(e.green("All health checks passed")):i.warn(e.yellow("Some health checks need attention"));}catch(t){i.warn(e.yellow(`Doctor warning: ${t.message}`));}}else i.succeed(e.gray("Step 6/6: Skipped verify (use --verify to check health)"));console.log(""),console.log(e.blue("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510")),console.log(e.blue("\u2502")+e.white.bold(" \u2728 Paradigm shift complete! ")+e.blue("\u2502")),console.log(e.blue("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518")),console.log(""),console.log(e.white(" Created/Updated:")),console.log(e.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));let O=[{path:".paradigm/config.yaml",desc:"Project configuration"},{path:".paradigm/navigator.yaml",desc:"Symbol navigation map"},{path:".paradigm/agents.yaml",desc:"Team agent configuration"},{path:".paradigm/adoptions.yaml",desc:"Agent adoption records"},{path:".purpose",desc:"Root feature definitions"},{path:".paradigm/lore/",desc:"Project lore timeline",isDir:true},{path:"portal.yaml",desc:"Authorization gates"},{path:".paradigm/roster.yaml",desc:"Agent roster for this project"},{path:"CLAUDE.md",desc:"Claude Code AI instructions"},{path:"AGENTS.md",desc:"Universal AI agent instructions"},{path:".cursor/rules/",desc:"Cursor AI instructions",isDir:true},{path:".claude/hooks/",desc:"Claude Code enforcement hooks",isDir:true,optional:true},{path:".cursor/hooks/",desc:"Cursor enforcement hooks",isDir:true,optional:true}],G=d.join(r,"config.yaml");if(s.existsSync(G))try{let t=h.load(s.readFileSync(G,"utf8"));if(typeof t.workspace=="string"){let a=d.resolve(n,t.workspace),c=d.relative(n,a);O.push({path:c,desc:"Multi-project workspace",optional:!0});}}catch(t){a.operation("shift").debug("Summary config read failed",{error:t.message});}for(let t of O){let a=d.join(n,t.path);s.existsSync(a)?console.log(e.green(" \u2713 ")+e.white(t.path.padEnd(28))+e.gray(t.desc)):t.optional||console.log(e.yellow(" \u25CB ")+e.gray(t.path.padEnd(28))+e.gray(`(${t.desc})`));}try{let t=await Z(n),a=ee(t);a&&console.log(a);}catch(t){a.operation("shift").debug("Recommendations engine failed",{error:t.message}),console.log(""),console.log(e.white(" Next steps:")),console.log(e.gray(" "+"\u2500".repeat(49))),console.log(e.white(" 1. ")+e.gray("Edit ")+e.cyan(".purpose")+e.gray(" to define your features")),console.log(e.white(" 2. ")+e.gray("Run ")+e.cyan("paradigm shift --verify")+e.gray(" to check health")),console.log("");}try{let{captureSnapshot:t,seedMetricsConsent:a}=await import('./metrics-UESGUHTA.js');a(n),t(n);}catch(t){a.operation("shift").debug("metrics snapshot failed",{error:t.message});}f$1.success("Paradigm shift complete",{project:l});}export{_e as shiftCommand};
|
package/dist/tools-QJHAVYI6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
export{h as registerTools}from'./chunk-TZDYIPVU.js';import'./chunk-4UJ4NIEQ.js';import'./chunk-M3PPXJU4.js';import'./chunk-Q527BPUF.js';import'./chunk-KLBH26PA.js';import'./chunk-JNSJVCTU.js';import'./chunk-XROULIQN.js';import'./chunk-ZUAUFZRJ.js';import'./chunk-3KVVC4WV.js';import'./chunk-PHEX6LU4.js';import'./chunk-M4UMM6DC.js';import'./chunk-GRZQIKST.js';import'./chunk-M2HKWR25.js';import'./chunk-TNVWGPCE.js';import'./chunk-EK4ZRIFJ.js';import'./chunk-GAFKOFAV.js';import'./chunk-DVZWCXB6.js';import'./chunk-QGZRM6ZB.js';import'./chunk-K7X3Z3GL.js';import'./chunk-5TAVYPOV.js';
|
|
File without changes
|
|
File without changes
|