@a-company/paradigm 6.0.2 → 6.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{accept-orchestration-QQISPINV.js → accept-orchestration-TIXUQQGR.js} +1 -1
- 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-FA3HLEOA.js +2 -0
- package/dist/{chunk-TZDYIPVU.js → chunk-23T6UG73.js} +111 -27
- package/dist/{chunk-FEYOQMZ5.js → chunk-2AU5L333.js} +1 -1
- package/dist/{chunk-M3PPXJU4.js → chunk-4N56FRNE.js} +1 -1
- package/dist/{chunk-TNVWGPCE.js → chunk-6QXBXZF6.js} +1 -1
- package/dist/{chunk-WESTEMIM.js → chunk-AMLD7IYC.js} +1 -1
- package/dist/{chunk-3DZK54RU.js → chunk-DBEWOKD6.js} +32 -7
- 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-M2HKWR25.js → chunk-KAFQA7HV.js} +2 -2
- package/dist/{chunk-GAFKOFAV.js → chunk-LAYBUKMB.js} +1 -1
- package/dist/{chunk-AO7ZSRME.js → chunk-TQOT2LBO.js} +2 -2
- package/dist/{chunk-PHEX6LU4.js → chunk-WXF5VFB4.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-KUEE5KMM.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/mcp.js +1 -1
- package/dist/{migrate-Z5UQN57G.js → migrate-ZPNYDNM4.js} +1 -1
- package/dist/migration-notices-BHLEYC4T.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-IZCD2JGD.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-WGMZGWOC.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-4RRFTU5H.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 +81 -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/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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {a,b}from'./chunk-
|
|
2
|
+
import {a,b}from'./chunk-IOVHF4SR.js';import'./chunk-TYWB5IQJ.js';import'./chunk-AMLD7IYC.js';import'./chunk-FYDRENK7.js';import'./chunk-HXGYVS2N.js';import {e as e$1}from'./chunk-TQOT2LBO.js';import {d,c}from'./chunk-EKZDFEJW.js';import'./chunk-LPBCQM5Y.js';import'./chunk-LWAIVOSF.js';import'./chunk-JIXHEBGK.js';import'./chunk-ZJQY5PPP.js';import'./chunk-5TAVYPOV.js';import*as S from'path';import e from'chalk';import O from'ora';async function I(o,n,t){let i=n?S.resolve(n):process.cwd();if(!o){t.json?console.log(JSON.stringify({error:"Task is required"})):(console.log(e.red(`
|
|
3
3
|
Task is required.`)),console.log(e.gray(`Example: paradigm team orchestrate "Build @payment-system with Stripe"
|
|
4
4
|
`)));return}if(!e$1(i)){t.json?console.log(JSON.stringify({error:"Team not configured"})):console.log(e.yellow("\nTeam not configured. Run `paradigm team init` first.\n"));return}let f="faceted";t.solo&&(f="solo"),t.faceted&&(f="faceted");let g;if(t.budget){let s=t.budget.split(",");g={};for(let l of s){let[a,r]=l.split("=");a==="tokens"&&(g.maxTokens=parseInt(r)),a==="cost"&&(g.maxCostUsd=parseFloat(r)),a==="warn"&&(g.warnAtPercent=parseInt(r));}}let c=O({text:"Initializing orchestrator...",isSilent:t.quiet||t.json}).start(),y=new a(i);try{await y.initialize();}catch(s){c.fail("Failed to initialize orchestrator"),t.json?console.log(JSON.stringify({error:s instanceof Error?s.message:String(s)})):console.log(e.red(`
|
|
5
5
|
Error: ${s instanceof Error?s.message:s}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {c,e as e$1,b as b$1,d}from'./chunk-
|
|
2
|
+
import {c,e as e$1,b as b$1,d}from'./chunk-HXGYVS2N.js';import'./chunk-5TAVYPOV.js';import*as f from'path';import e from'chalk';async function b(t,r){let s=t?f.resolve(t):process.cwd();if(r.set){try{await c(r.set,s),r.json?console.log(JSON.stringify({success:!0,provider:r.set})):(console.log(e.green(`
|
|
3
3
|
\u2713 Provider set to: ${r.set}
|
|
4
4
|
`)),r.set==="auto"?console.log(e.gray(`Will auto-detect best available provider.
|
|
5
5
|
`)):console.log(e.gray(`Will use ${r.set} if available, otherwise fall back.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {c}from'./chunk-Z72SDTBJ.js';import {a}from'./chunk-LKAT7IAK.js';import'./chunk-5TAVYPOV.js';import*as g from'fs';import*as h from'path';import*as v from'os';import e from'chalk';import*as k from'js-yaml';var w=process.env.NEVR_REGISTRY_URL||"https://nevr-api.onrender.com",C=h.join(v.homedir(),".paradigm","agents"),P=".paradigm/agents";async function O(d,f){let r=a.command("agent-search").start("Searching nevr.land registry",{query:d}),s=parseInt(f.limit||"10",10);try{let{RegistryClient:a}=await import('./dist-QBTQW4ZW.js'),m=await new a({baseUrl:w}).search(d,{page:1}),o=m.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 ${m.total})
|
|
6
|
+
`));for(let n of o){let l=n.scope.startsWith("@")?n.scope:`@${n.scope}`,y=e.cyan(`${l}/${n.name}`),t=e.dim("v"+(n.latestVersion||"0.1.0")),p=n.downloads>0?e.dim(` | ${n.downloads} downloads`):"",$=n.calibrationScore!=null?e.dim(` | calibration: ${(n.calibrationScore*100).toFixed(0)}%`):"";console.log(` ${y} ${t}${p}${$}`),n.description&&console.log(` ${n.description}`),n.tags?.length&&console.log(` ${e.dim("tags:")} ${n.tags.join(", ")}`);let i=n.partnerCoverage;if(i?.hasPartners&&i.partnerIds.length>0){let b=i.fullyReciprocal?e.green("\u2194"):e.yellow("\u2194");console.log(` ${e.dim("paired:")} ${b} ${i.partnerIds.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 j(d,f){let r=a.command("agent-install").start("Installing agent from registry",{source:d}),s=d,a$1,u=s.lastIndexOf("@");u>0&&s[u-1]!=="/"&&(a$1=s.substring(u+1),s=s.substring(0,u));let m=s.indexOf("/");if(m===-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,m).replace(/^@/,""),n=s.substring(m+1);console.log(e.dim(`
|
|
11
|
+
Installing ${o}/${n}${a$1?"@"+a$1:""}...`));try{let{RegistryClient:l}=await import('./dist-QBTQW4ZW.js'),y=new l({baseUrl:w}),t=await y.getAgent(o,n);if(!t){console.error(e.red(`
|
|
12
|
+
Agent @${o}/${n} not found.
|
|
13
|
+
`)),r.error("Agent not found");return}let p=f.global?C:h.join(process.cwd(),P);g.existsSync(p)||g.mkdirSync(p,{recursive:!0});let $=!1;try{let S=await y.downloadPackage(o,n,a$1||"latest"),R=h.join(p,`${n}.nevr.tar.gz`);g.writeFileSync(R,S.buffer),$=!0,a.component("#agent-registry").info("Package downloaded",{agent:`${o}/${n}`,hash:S.hash.slice(0,12),size:S.buffer.length});}catch{a.component("#agent-registry").info("Package not available, creating metadata-only profile",{agent:`${o}/${n}`});}let i={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:w,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&&(i.brandColor=t.brandColor),t.tags?.length&&(i.tags=t.tags);let b=h.join(p,`${n}.agent`);g.writeFileSync(b,k.dump(i,{lineWidth:120,noRefs:!0,sortKeys:!1}),"utf-8");try{await c(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});}$?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: ${b}`)),console.log(e.dim(` Run: paradigm agent show ${n}
|
|
16
|
+
`)),r.success(`Installed ${o}/${n}`);}catch(l){console.error(e.red(`
|
|
17
|
+
Install failed:`),l instanceof Error?l.message:l),console.log(""),r.error("Install failed");}}async function D(d){let f=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
|
+
`)),f.success("Showed publish instructions");}export{j as agentInstallCommand,D as agentPublishCommand,O as agentSearchCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export{qa as getReindexToolsList,ra as handleReindexTool,sa as rebuildStaticFiles}from'./chunk-WXF5VFB4.js';import'./chunk-M4UMM6DC.js';import'./chunk-GRZQIKST.js';import'./chunk-6QXBXZF6.js';import'./chunk-EK4ZRIFJ.js';import'./chunk-LAYBUKMB.js';import'./chunk-5TAVYPOV.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import'./chunk-5TAVYPOV.js';import o from'chalk';async function i(e){let n=process.cwd(),t=parseInt(e.port||"3850",10),s=e.open!==false,a=e.sections?e.sections.split(",").map(r=>r.trim()):void 0;console.log(o.cyan(`
|
|
3
3
|
Starting Paradigm Platform...
|
|
4
|
-
`));try{let{startPlatformServer:r}=await import('./platform-server-
|
|
4
|
+
`));try{let{startPlatformServer:r}=await import('./platform-server-ANOALDPL.js');await r({port:t,projectDir:n,open:s,sections:a}),console.log(o.green(` Platform running at ${o.bold(`http://localhost:${t}`)}`)),console.log(o.gray(` Press Ctrl+C to stop
|
|
5
5
|
`)),await new Promise(()=>{});}catch(r){r.code==="EADDRINUSE"?(console.error(o.red(`
|
|
6
6
|
Error: Port ${t} is already in use.`)),console.log(o.gray(` Try: paradigm serve --port ${t+1}
|
|
7
7
|
`))):console.error(o.red(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {q}from'./chunk-
|
|
2
|
+
import {q}from'./chunk-LAYBUKMB.js';export{a as appendSessionWorkEntry,d as appendVerdictEntry,l as clearActivityMetrics,c as clearSessionWorkLog,o as countNotebookReferences,h as getAgentEntries,i as getAgentVerdicts,g as getContributingAgents,n as getNotebookReferences,k as getSessionActivitySummary,f as markVerdictsConsumed,e as readPendingVerdicts,b as readSessionWorkLog,j as recordActivityMetric,m as recordNotebookReference}from'./chunk-LAYBUKMB.js';import'./chunk-5TAVYPOV.js';q();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export{a as appendSessionWorkEntry,d as appendVerdictEntry,l as clearActivityMetrics,c as clearSessionWorkLog,o as countNotebookReferences,h as getAgentEntries,i as getAgentVerdicts,g as getContributingAgents,n as getNotebookReferences,k as getSessionActivitySummary,f as markVerdictsConsumed,e as readPendingVerdicts,b as readSessionWorkLog,j as recordActivityMetric,m as recordNotebookReference}from'./chunk-
|
|
2
|
+
export{a as appendSessionWorkEntry,d as appendVerdictEntry,l as clearActivityMetrics,c as clearSessionWorkLog,o as countNotebookReferences,h as getAgentEntries,i as getAgentVerdicts,g as getContributingAgents,n as getNotebookReferences,k as getSessionActivitySummary,f as markVerdictsConsumed,e as readPendingVerdicts,b as readSessionWorkLog,j as recordActivityMetric,m as recordNotebookReference}from'./chunk-F6E3HW45.js';import'./chunk-5TAVYPOV.js';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {a as a$5,d as d$3,b as b$2,e as e$1,f}from'./chunk-Z72SDTBJ.js';import {b}from'./chunk-2AU5L333.js';import'./chunk-IOVHF4SR.js';import'./chunk-TYWB5IQJ.js';import'./chunk-AMLD7IYC.js';import'./chunk-FYDRENK7.js';import'./chunk-HXGYVS2N.js';import {d as d$2}from'./chunk-TQOT2LBO.js';import'./chunk-Y4XFVDZC.js';import {a as a$7}from'./chunk-DBEWOKD6.js';import {d as d$1}from'./chunk-TOYQ2QCB.js';import {a as a$4,b as b$1}from'./chunk-GE3GQALR.js';import {a as a$8}from'./chunk-XQLO5URP.js';import'./chunk-EKZDFEJW.js';import {a as a$2}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$3}from'./chunk-UIKLE3WD.js';import {a as a$6}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 as a$1}from'./chunk-LKAT7IAK.js';import'./chunk-5TAVYPOV.js';import*as a from'fs';import*as ne from'os';import*as d from'path';import e from'chalk';import Se from'ora';import*as h from'js-yaml';import*as C 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 Q(o){let n=[],l=[];for(let r of ae){let f=d.join(o,r.path);if(r.isDir)await X(f)?l.push(r.path):(await C.mkdir(f,{recursive:true}),n.push(r.path));else if(await X(f))l.push(r.path);else {let i=d.dirname(f);await C.mkdir(i,{recursive:true}),await C.writeFile(f,r.defaultContent,"utf-8"),n.push(r.path);}}return {created:n,existed:l}}async function X(o){try{return await C.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),pe(o),fe(o),me(o),ue(o),ge(o),ye(o),he(o),we()]),l=[];for(let i of n)i.status==="fulfilled"&&i.value&&l.push(i.value);l.sort((i,b)=>i.priority-b.priority);let r=l.filter(i=>i.type==="action"),f=l.filter(i=>i.type==="info");return [...r.slice(0,ie),...f]}function ee(o){if(o.length===0)return "";let n=o.filter(m=>m.type==="action"),l=o.filter(m=>m.type==="info"),r=[];r.push(""),r.push(e.bold(" Recommendations")),r.push(e.gray(" "+"\u2500".repeat(49)));for(let m=0;m<n.length;m++){let i=n[m],b=e.white(` ${m+1}. `),S=e.white(i.message);i.command?(r.push(b+S),r.push(" "+e.cyan(i.command))):r.push(b+S);}if(l.length>0){r.push("");for(let m of l)r.push(e.dim(" "+m.message));}let f=n.length;if(f>0){r.push("");let m=f===1?"item needs":"items need";r.push(e.dim(` ${f} ${m} attention.`));}return r.push(""),r.join(`
|
|
51
|
+
`)}async function de(o){let n=d.join(o,".purpose");try{let l=await C.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(f=>l.includes(f)))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 pe(o){let n=["src","packages","apps"];for(let r of n){let f=d.join(o,r);if(!a.existsSync(f))continue;if(await te(f))return null}return n.some(r=>a.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 fe(o){let n=d.join(o,"portal.yaml");try{let l=await C.readFile(n,"utf-8"),r=l.includes("gates:")&&!l.match(/gates:\s*(\[\]|\{\})\s*$/m)&&!l.match(/gates:\s*(\[\]|\{\})\s*\n/),f=l.includes("routes:")&&!l.match(/routes:\s*(\[\]|\{\})\s*$/m)&&!l.match(/routes:\s*(\[\]|\{\})\s*\n/);if(!r&&!f)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 me(o){let n=d.join(o,".paradigm","agents.yaml");try{let l=await C.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 a.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 C.readFile(n,"utf-8");if(!l.includes("model-resolution"))return null;let r=l.match(/tier-1:\s*(\S+)/),f=l.match(/tier-2:\s*(\S+)/),m=l.match(/tier-3:\s*(\S+)/);if(!r||!f||!m)return null;let i=[r[1].replace(/['"]/g,""),f[1].replace(/['"]/g,""),m[1].replace(/['"]/g,"")];if(Object.values(le).some(S=>S[0]===i[0]&&S[1]===i[1]&&S[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 ye(o){let n=d.join(o,".paradigm","lore","entries");try{if((await C.readdir(n)).filter(f=>!f.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 he(o){let n=d.join(o,".paradigm","notebooks");try{if((await C.readdir(n)).filter(f=>!f.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 C.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$1.operation("shift-recommendations").debug("Could not read directory",{dir:o});}return false}var oe=new Set(["architect","builder","reviewer","security","advocate","tester","compliance","documentor"]),I={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 ke(o){let n=[],l=d.join(ne.homedir(),".paradigm","agents");for(let[r,f]of Object.entries(o.agents)){let m,i=r,b=d.join(l,`${r}.agent`);if(a.existsSync(b))try{let v=a.readFileSync(b,"utf8"),E=h.load(v);E?.nickname&&(m=E.nickname),E?.role&&(i=E.role);}catch{}!m&&I[r]&&(m=I[r].nickname,i=I[r].role);let S=f.source==="core"||f.source==="ecosystem"?f.source:oe.has(r)?"core":"ecosystem";n.push({id:r,nickname:m,role:i,source:S});}return n}async function be(o,n,l){if(!a.existsSync(n))return;let r;try{r=h.load(a.readFileSync(n,"utf8"))??{active:[]};}catch{return}let f=Array.isArray(r.active)?r.active:[];if(f.includes("compliance"))return;let{isCohortC:m}=await import('./migration-notices-BHLEYC4T.js');if(!m(o))return;let i=d.join(o,".paradigm",".compliance-nomination-skipped");if(a.existsSync(i)&&!l.force)return;if(!process.stdin.isTTY||l.prompt===false){try{a.writeFileSync(i,"","utf8");}catch{}return}console.log(""),console.log(e.cyan("Step 2c-nominate/6: Symbol enforcement")),console.log(""),console.log(" This project defines ~aspects but no compliance-archetype agent"),console.log(" (Rune) is on the roster."),console.log(""),console.log(" Without a claimant, paradigm 6.0.4 no longer enforces aspect"),console.log(" coverage. You can:"),console.log(""),console.log(` ${e.green("[Y]")} Add Rune (compliance) to the roster \u2014 recommended`),console.log(" Authority defaults will be written to .paradigm/authority.yaml."),console.log(" Default mode: advise (Rune surfaces findings, never blocks)."),console.log(""),console.log(` ${e.yellow("[N]")} Skip \u2014 opt out of aspect enforcement for this project`),console.log(" This decision is remembered. Re-run with --force to revisit."),console.log("");let S=(await import('readline/promises')).createInterface({input:process.stdin,output:process.stdout}),v="";try{v=(await S.question(" Add Rune to roster? [Y/n]: ")).trim().toLowerCase();}catch{v="";}finally{S.close();}if(v===""||v==="y"||v==="yes"){r.active=[...f,"compliance"].sort();try{a.writeFileSync(n,h.dump(r,{lineWidth:-1,noRefs:!0}),"utf8"),console.log(e.green(" \u2713 Rune (compliance) added to roster"));}catch(x){a$1.operation("shift").debug("Roster update failed",{error:x.message});return}try{let{writeArchetypeDefaults:x}=await import('./authority-FA3HLEOA.js');await x(o,"archetype-default"),console.log(e.gray(" \u2713 Authority defaults written to .paradigm/authority.yaml"));}catch(x){a$1.operation("shift").debug("Authority defaults write failed",{error:x.message});}if(a.existsSync(i))try{a.unlinkSync(i);}catch{}}else {try{a.writeFileSync(i,"","utf8");}catch{}console.log(e.gray(" Skipped \u2014 opt out of aspect enforcement for this project"));}}async function Le(o={}){let n=process.cwd(),l=d.basename(n),r=d.join(n,".paradigm"),f$1=a.existsSync(r)&&a.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: ${f$1?e.green("Paradigm detected"):e.yellow("New project")}`)),console.log("");let m=a$1.command("shift").start("Running paradigm shift",{project:l}),i=Se();if(!f$1||o.force){i.start("Step 1/6: Initializing Paradigm...");try{await a$2({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}`)),m.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(a.existsSync(t))try{let s=a.readFileSync(t,"utf8"),c=h.load(s);if(!c.discipline||c.discipline==="auto"){let p=a$3(n);if(p!=="backend"){let u=s.replace(/^discipline:\s*auto\b.*$/m,`discipline: ${p}`);u!==s&&(a.writeFileSync(t,u,"utf8"),console.log(e.green(` \u2713 Detected discipline: ${e.cyan(p)} (updated config.yaml)`)));}else if(!c.discipline){let u=s.replace(/^(project:\s*.+)$/m,`$1
|
|
54
|
+
discipline: ${p}`);u!==s&&(a.writeFileSync(t,u,"utf8"),console.log(e.green(` \u2713 Added discipline: ${e.cyan(p)} to config.yaml`)));}}}catch(s){a$1.operation("shift").debug("Discipline detection failed",{error:s.message});}}if(f$1){i.start("Step 1b/6: Checking for migrations...");try{let{migrateCommand:t}=await import('./migrate-ZPNYDNM4.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&&a.existsSync(t)){let s=o.workspacePath?d.resolve(n,o.workspacePath):d.join(d.dirname(n),".paradigm-workspace");if(a.existsSync(s))try{let c=h.load(a.readFileSync(s,"utf8")),p=d.basename(n),u=d.dirname(s),g="./"+d.relative(u,n);if(c.members.some(j=>d.resolve(u,j.path)===n))console.log(e.green(` \u2713 Already a member of workspace: ${e.cyan(c.name)}`));else {let j=d$1(p,n);c.members.push({name:p,path:g,...j&&{role:j}}),a.writeFileSync(s,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),p=d.dirname(s),u="./"+d.relative(p,n),g=d$1(c,n),y={version:"1.0",name:o.workspace,members:[{name:c,path:u,...g&&{role:g}}]};a.mkdirSync(d.dirname(s),{recursive:!0}),a.writeFileSync(s,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,s))}`));}catch(c){console.log(e.yellow(` \u26A0 Failed to create workspace: ${c.message}`));}try{let c=a.readFileSync(t,"utf8"),p=h.load(c),u=d.relative(n,s);if(p.workspace!==u){if(p.workspace){let g=c.replace(/^workspace:\s*.*$/m,`workspace: "${u}"`);a.writeFileSync(t,g,"utf8");}else {let g=c.trimEnd()+`
|
|
55
|
+
workspace: "${u}"
|
|
56
|
+
`;a.writeFileSync(t,g,"utf8");}console.log(e.green(" \u2713 Linked workspace in config.yaml"));}}catch(c){a$1.operation("shift").debug("Workspace config link failed",{error:c.message});}}else if(a.existsSync(t))try{let s=a.readFileSync(t,"utf8");if(!h.load(s).workspace){let p=d.dirname(n);for(let u=0;u<3;u++){let g=d.join(p,".paradigm-workspace");if(a.existsSync(g)){let j=d.relative(n,g),re=s.trimEnd()+`
|
|
57
|
+
workspace: "${j}"
|
|
58
|
+
`;a.writeFileSync(t,re,"utf8"),console.log(e.green(` \u2713 Found workspace: ${e.cyan(j)} (added to config.yaml)`));break}let y=d.dirname(p);if(y===p)break;p=y;}}}catch(s){a$1.operation("shift").debug("Workspace auto-detect failed",{error:s.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)"));if(o.force){let t=d.join(n,".paradigm",".compliance-nomination-skipped");if(a.existsSync(t))try{a.unlinkSync(t);}catch{}}let S=d.join(n,".paradigm","roster.yaml");if(!a.existsSync(S)||o.force)try{let t=a$4(n),s=b$1[t]||b$1.generic,c={version:"1.0",project:l,type:t,active:s.sort()};a.writeFileSync(S,h.dump(c,{lineWidth:-1,noRefs:!0}),"utf8"),console.log(e.green(` \u2713 Agent roster set: ${e.cyan(s.length)} agents for ${e.cyan(t)}`));}catch(t){a$1.operation("shift").debug("Roster setup failed",{error:t.message});}else try{let s=h.load(a.readFileSync(S,"utf8"))?.active?.length??0;console.log(e.gray(` \u2713 Agent roster exists (${s} agents active)`));}catch{console.log(e.gray(" \u2713 Agent roster exists"));}await be(n,S,o);{let t=d.join(n,".paradigm","adoptions.yaml"),s=a.existsSync(t);try{let c=a$4(n),p=s?await a$5(n):null,u=p&&Object.keys(p.agents).length>0;if(!u&&a.existsSync(S))p=await d$3(n),await b$2(n,p),a$1.operation("shift").debug("Migrated roster to adoptions",{count:Object.keys(p.agents).length});else if(!u){p=e$1(c);let g=a.existsSync(S)?h.load(a.readFileSync(S,"utf8")):{active:[]},y=new Date().toISOString();for(let j of g.active||[])p.agents[j]={adopted:y,source:oe.has(j)?"core":"ecosystem",defaultsAccepted:!0};Object.keys(p.agents).length>0&&await b$2(n,p);}if(p&&Object.keys(p.agents).length>0){let g=ke(p),y=f(g,c);console.log(y),console.log(e.green(` \u2713 ${Object.keys(p.agents).length} agents adopted`));}if(p&&p.agents.compliance){let g=d.join(n,".paradigm","authority.yaml");if(!a.existsSync(g))try{let{writeArchetypeDefaults:y}=await import('./authority-FA3HLEOA.js');await y(n,"archetype-default"),a$1.operation("shift").debug("Wrote archetype-default authority.yaml",{source:"default-adoption"});}catch(y){a$1.operation("shift").debug("Authority defaults write failed",{error:y.message});}}}catch(c){a$1.operation("shift").debug("Adoption ceremony failed",{error:c.message});}}{let t=d.join(r,"config.yaml");if(a.existsSync(t))try{let s=a.readFileSync(t,"utf8"),c=h.load(s);if(!c["model-resolution"]||o.force){let{ModelDiscovery:p}=await import('./model-discovery-HMB3YI4L.js'),g=new p(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,a.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(s){a$1.operation("shift").debug("Model tier config failed",{error:s.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$1.operation("shift").debug("Enforcement config setup failed",{error:t.message});}{i.start("Ensuring core files...");try{let{created:t,existed:s}=await Q(n);i.succeed(e.green(`Core files ensured: ${e.cyan(String(t.length))} created, ${e.cyan(String(s.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(a.existsSync(t))try{if(h.load(a.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(s){a$1.operation("shift").debug("Workspace config read failed",{error:s.message});}}let v=d.join(n,"portal.yaml");a.existsSync(v)||a.writeFileSync(v,h.dump({version:"1.0.0",gates:{},routes:{}},{lineWidth:-1,noRefs:true}),"utf8");let E=d.join(n,".paradigm","lore");a.existsSync(E)||a.mkdirSync(E,{recursive:true});let x=d.join(n,".paradigm","university");for(let t of ["content/notes","content/policies","content/quizzes","content/paths","diplomas"]){let s=d.join(x,t);a.existsSync(s)||a.mkdirSync(s,{recursive:true});}let N=d.join(x,"config.yaml");if(!a.existsSync(N)){let t="Project";try{let c=d.join(n,".paradigm","config.yaml");if(a.existsSync(c)){let p=h.load(a.readFileSync(c,"utf8"));p.project&&typeof p.project=="string"&&(t=p.project);}}catch{}let s={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}};a.writeFileSync(N,h.dump(s,{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"],s=[];for(let c of t)try{await a$6(c,{quiet:!0,force:!0}),s.push(c);}catch{}s.length>0?i.succeed(e.green(`IDE configs synced: ${s.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$7({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$8({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}],W=d.join(r,"config.yaml");if(a.existsSync(W))try{let t=h.load(a.readFileSync(W,"utf8"));if(typeof t.workspace=="string"){let s=d.resolve(n,t.workspace),c=d.relative(n,s);O.push({path:c,desc:"Multi-project workspace",optional:!0});}}catch(t){a$1.operation("shift").debug("Summary config read failed",{error:t.message});}for(let t of O){let s=d.join(n,t.path);a.existsSync(s)?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),s=ee(t);s&&console.log(s);}catch(t){a$1.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:s}=await import('./metrics-UESGUHTA.js');s(n),t(n);}catch(t){a$1.operation("shift").debug("metrics snapshot failed",{error:t.message});}m.success("Paradigm shift complete",{project:l});}export{be as runComplianceNominationStep,Le as shiftCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {b as b$1}from'./chunk-
|
|
2
|
+
import {b as b$1}from'./chunk-AMLD7IYC.js';import'./chunk-FYDRENK7.js';import {d}from'./chunk-HXGYVS2N.js';import {e}from'./chunk-TQOT2LBO.js';import {d as d$1}from'./chunk-EKZDFEJW.js';import'./chunk-5TAVYPOV.js';import*as b from'path';import r from'chalk';import x from'ora';async function J(t,m,o){let f=m?b.resolve(m):process.cwd();if(!o.task){o.json?console.log(JSON.stringify({error:'Task is required. Use --task "..."'})):(console.log(r.red(`
|
|
3
3
|
Task is required. Use --task "..."`)),console.log(r.gray(`Example: paradigm team spawn architect --task "Design the payment API"
|
|
4
4
|
`)));return}let a=e(f);if(!a){o.json?console.log(JSON.stringify({error:"Team not configured"})):console.log(r.yellow("\nTeam not configured. Run `paradigm team init` first.\n"));return}if(!a.agents[t]){o.json?console.log(JSON.stringify({error:`Unknown agent: ${t}`,available:Object.keys(a.agents)})):(console.log(r.red(`
|
|
5
5
|
Unknown agent: ${t}`)),console.log(r.gray(`Available agents: ${Object.keys(a.agents).join(", ")}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export{e as teamAcceptCommand,f as teamCheckCommand,d as teamHandoffCommand,g as teamHistoryCommand,b as teamInitCommand,a as teamModelsCommand,h as teamResetCommand,c as teamStatusCommand}from'./chunk-
|
|
2
|
+
export{e as teamAcceptCommand,f as teamCheckCommand,d as teamHandoffCommand,g as teamHistoryCommand,b as teamInitCommand,a as teamModelsCommand,h as teamResetCommand,c as teamStatusCommand}from'./chunk-2AU5L333.js';import'./chunk-IOVHF4SR.js';import'./chunk-TYWB5IQJ.js';import'./chunk-AMLD7IYC.js';import'./chunk-FYDRENK7.js';import'./chunk-HXGYVS2N.js';import'./chunk-TQOT2LBO.js';import'./chunk-Y4XFVDZC.js';import'./chunk-EKZDFEJW.js';import'./chunk-LPBCQM5Y.js';import'./chunk-LWAIVOSF.js';import'./chunk-JIXHEBGK.js';import'./chunk-ZJQY5PPP.js';import'./chunk-5TAVYPOV.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export{h as registerTools}from'./chunk-23T6UG73.js';import'./chunk-4UJ4NIEQ.js';import'./chunk-4N56FRNE.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-WXF5VFB4.js';import'./chunk-M4UMM6DC.js';import'./chunk-GRZQIKST.js';import'./chunk-KAFQA7HV.js';import'./chunk-6QXBXZF6.js';import'./chunk-EK4ZRIFJ.js';import'./chunk-LAYBUKMB.js';import'./chunk-DVZWCXB6.js';import'./chunk-QGZRM6ZB.js';import'./chunk-K7X3Z3GL.js';import'./chunk-5TAVYPOV.js';
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: N-para-451-agent-routing
|
|
3
|
+
title: Agent Routing — A Decision Tree for "Which Agent Should I Invoke?"
|
|
4
|
+
type: note
|
|
5
|
+
author: paradigm
|
|
6
|
+
created: '2026-04-26'
|
|
7
|
+
updated: '2026-04-26'
|
|
8
|
+
tags:
|
|
9
|
+
- course
|
|
10
|
+
- para-451
|
|
11
|
+
- routing
|
|
12
|
+
- decision-tree
|
|
13
|
+
- reference
|
|
14
|
+
- when-to-invoke
|
|
15
|
+
symbols: []
|
|
16
|
+
difficulty: beginner
|
|
17
|
+
estimatedMinutes: 6
|
|
18
|
+
prerequisites:
|
|
19
|
+
- N-para-451-roster-reference
|
|
20
|
+
- N-para-451-roster-management
|
|
21
|
+
category: paradigm-core
|
|
22
|
+
origin: authored
|
|
23
|
+
source: agents-course-phase-a-design.md
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## How to use this entry
|
|
27
|
+
|
|
28
|
+
This is a **reference card**, not a narrative. Bookmark it. The earlier entries in PARA 451 taught you the team — what an agent is, the three identity layers, the model tiers, the canonical roster, partners, orchestration modes, and roster management. This entry compresses all of that into a single quick-reference: *given a situation in front of me, which agent should I invoke first?*
|
|
29
|
+
|
|
30
|
+
You will not need this on day one — most invocation is automatic via `paradigm_orchestrate_inline`, agent.yaml keyword routing, and partner declarations. You will reach for it on day thirty, when something does not auto-route the way you expected and you want to know who you should explicitly call.
|
|
31
|
+
|
|
32
|
+
## The decision tree
|
|
33
|
+
|
|
34
|
+
Read top-to-bottom. Stop at the first branch that matches.
|
|
35
|
+
|
|
36
|
+
### Are you starting a new session?
|
|
37
|
+
|
|
38
|
+
- **Yes** → Invoke **Cid** (`cid`) first. Cid runs the pre-task brief, maps blast radius, and surfaces relevant lore. The first turn of every session belongs to Cid.
|
|
39
|
+
|
|
40
|
+
### Are you about to design something that spans 3+ files or introduces a new pattern?
|
|
41
|
+
|
|
42
|
+
- **Yes** → Invoke **Architect** (`architect`). System design, specs, multi-file planning. No code. Architect produces the spec; Builder follows it.
|
|
43
|
+
- **Adding a protected route, auth surface, or anything OWASP-touching at the same time?** → Invoke **Aegis** (`security`) in parallel. Aegis flags; it does not fix. Both can run before Builder.
|
|
44
|
+
|
|
45
|
+
### Do you have a spec and need code written?
|
|
46
|
+
|
|
47
|
+
- **Yes** → Invoke **Builder** (`builder`). Builder follows the spec exactly and pushes back if it is unclear. If no spec exists, route through Architect first.
|
|
48
|
+
- **Is the work also explicit visual / UI / design-system work?** → Invoke **Mika** (`designer`) instead of (or in parallel with) Builder for the visual surface. Builder still owns wiring; Mika owns the surface.
|
|
49
|
+
- **Is the work an API surface, SDK, or integration guide?** → Pair **Builder** with **Helix** (`dx`). Helix shapes the developer-facing surface; Builder ships the implementation.
|
|
50
|
+
|
|
51
|
+
### Has Builder just finished and you need to verify?
|
|
52
|
+
|
|
53
|
+
- **Code review pass first** → Invoke **Reviewer** (`reviewer`). Two stages: spec compliance, then code quality. Reviewer hands back; never fixes.
|
|
54
|
+
- **Then, did the change touch a user-visible surface (README, --help, error messages, docs, install flow)?** → Invoke **Nora** (`ftux`). Nora simulates a first-time user and reads ONLY user-facing surfaces. Confusion **is** data. Skip Nora when the change is purely internal.
|
|
55
|
+
- **Then, always, as the final orchestration stage** → Invoke **Scribe** (`documentor`). Scribe updates `.purpose` files, `portal.yaml`, and lore. Never source. Documentor is **always last**.
|
|
56
|
+
|
|
57
|
+
### Is something broken or behaving strangely?
|
|
58
|
+
|
|
59
|
+
- **You need to understand why** → Invoke **Trace** (`debugger`). Hypothesis-driven, binary-search root-cause hunter.
|
|
60
|
+
- **You need to design tests that would have caught this** → Invoke **Shield** (`qa`) for test *strategy*, then **Probe** (`tester`) to write the tests. Shield designs the pyramid; Probe ships individual tests.
|
|
61
|
+
|
|
62
|
+
### Is the question "what could break?" or "is this risky?"
|
|
63
|
+
|
|
64
|
+
- **Yes** → Invoke **Jinx** (`advocate`). Devil's advocate. Stress-tests assumptions; finds edge cases you have not considered. Best invoked *before* irreversible decisions, not after.
|
|
65
|
+
|
|
66
|
+
### Is the work pedagogical or research-shaped?
|
|
67
|
+
|
|
68
|
+
- **Authoring or revising University content (notes, paths, quizzes, PLSAT modules)?** → Invoke **Sheila** (`educator`) and **Scholar** (`scholar`) as a pair. Reciprocal partnership: Scholar produces source material; Sheila shapes it into learning experiences. This is the canonical use of the partners primitive — and the pattern that authored this very course.
|
|
69
|
+
- **Pure research / curation / citation discipline (no pedagogical shaping yet)?** → Invoke **Scholar** alone.
|
|
70
|
+
- **Pure pedagogical sequencing (you already have the source material)?** → Invoke **Sheila** alone.
|
|
71
|
+
- **Business research, competitive analysis, market sizing?** → Invoke **Scout** (`researcher`) instead. Different archetype: Scout does *market* research, Scholar does *technical* research.
|
|
72
|
+
|
|
73
|
+
### Are you adding, redesigning, or training an agent?
|
|
74
|
+
|
|
75
|
+
- **Yes** → Invoke **Loid** (`forge`). Intelligence officer. Designs agents, processes session debriefs, runs the journal → notebook → wisdom learning loop. Always include Loid when designing agents, team changes, or training systems — she owns the learning loop.
|
|
76
|
+
|
|
77
|
+
### Is the work performance-shaped?
|
|
78
|
+
|
|
79
|
+
- **Yes** → Invoke **Bolt** (`performance`). Core Web Vitals, bundles, query optimisation. "Why is this slow?" is Bolt's question.
|
|
80
|
+
|
|
81
|
+
### Cutting a release?
|
|
82
|
+
|
|
83
|
+
- **Yes** → Invoke **Ship** (`release`). Versioning, changelog, deployment coordination.
|
|
84
|
+
|
|
85
|
+
### Working in a Swift / Apple-platform codebase?
|
|
86
|
+
|
|
87
|
+
- **Yes** → **Swift** (`swift`) is auto-rostered by `paradigm shift` on Swift detection. For any Swift code, Conductor work, or SwiftUI patterns, route through Swift. Notebooks compound globally — every Swift project on your machine sharpens the same agent.
|
|
88
|
+
|
|
89
|
+
### Does symbol coverage matter on this change?
|
|
90
|
+
|
|
91
|
+
- **Yes** → Invoke **Rune** (`compliance`). Pre-implementation plan; post-implementation report. Never source. Rune's role sharpens at v6.1 (authority modes, soft-blocks); for now, treat it as a planner / reporter.
|
|
92
|
+
|
|
93
|
+
### Closing the session?
|
|
94
|
+
|
|
95
|
+
- **Yes** → Invoke **Cid** (`cid`) again for the post-task debrief, then **Loid** (`forge`) to process the debrief and promote learnings. Cid frames the session; Loid stores what should compound.
|
|
96
|
+
|
|
97
|
+
## The compressed mental model
|
|
98
|
+
|
|
99
|
+
If the decision tree is too much, hold three rules in your head:
|
|
100
|
+
|
|
101
|
+
1. **Cid bookends every session.** Pre-task brief at the start, post-task debrief at the end.
|
|
102
|
+
2. **Architect → Builder → Reviewer → (Nora if user-facing) → Scribe** is the canonical implementation pipeline. Every other agent slots in *around* this spine.
|
|
103
|
+
3. **Specialists slot in by signal, not by schedule.** Aegis on auth; Mika on UI; Trace on bugs; Jinx on risk; Scholar+Sheila on learning content; Loid on agent work; Swift on Swift; Bolt on perf; Ship on releases. Match the signal to the agent and most routing decisions answer themselves.
|
|
104
|
+
|
|
105
|
+
## When the framework routes for you
|
|
106
|
+
|
|
107
|
+
Most of the time you will not be reading this entry — you will be writing prompts, and `paradigm_orchestrate_inline` will pick the right agent automatically. Three layers of routing run before you have to think about it:
|
|
108
|
+
|
|
109
|
+
- **`paradigm_orchestrate_inline`** picks agents based on task keywords, file paths, and orchestration mode.
|
|
110
|
+
- **Keyword triggers in `agents.yaml`** route common phrases ("review", "audit", "implement", "design") to the right agent.
|
|
111
|
+
- **Partner declarations** mean invoking one half of a pair (Scholar) often triggers the other (Sheila) for joint work.
|
|
112
|
+
|
|
113
|
+
You read this entry when automatic routing missed, or when you want to bypass it for a deliberate reason — a second opinion, a forced specialty pass, a debugging dive that needs a specific archetype.
|
|
114
|
+
|
|
115
|
+
## Up next
|
|
116
|
+
|
|
117
|
+
The next entry — **N-para-451-the-team-pattern** — closes the conceptual arc of PARA 451 by zooming all the way back out: *why* does Paradigm have many agents instead of one mega-agent? What does the team pattern actually buy you? After that, the **Q-para-451-when-to-invoke** quiz tests the routing decisions you just learned.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: N-para-451-archetypes-vs-instances
|
|
3
|
+
title: Archetypes vs Instances — Role Patterns and the Agents That Fill Them
|
|
4
|
+
type: note
|
|
5
|
+
author: paradigm
|
|
6
|
+
created: '2026-04-26'
|
|
7
|
+
updated: '2026-04-26'
|
|
8
|
+
tags:
|
|
9
|
+
- course
|
|
10
|
+
- para-451
|
|
11
|
+
- archetype
|
|
12
|
+
- instance
|
|
13
|
+
- taxonomy
|
|
14
|
+
symbols: []
|
|
15
|
+
difficulty: beginner
|
|
16
|
+
estimatedMinutes: 5
|
|
17
|
+
prerequisites:
|
|
18
|
+
- N-para-451-identity-layers
|
|
19
|
+
category: paradigm-core
|
|
20
|
+
origin: authored
|
|
21
|
+
source: agents-course-phase-a-design.md
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## One archetype, many instances
|
|
25
|
+
|
|
26
|
+
The previous entry established that **archetype** is one of the three identity layers — the role pattern an agent fills. This entry zooms into the distinction the framework leans on most heavily once you have more than one project: the difference between an **archetype** (a role-type, the shape of a job) and an **instance** (a specific agent on a specific roster, a particular hire who fills that shape).
|
|
27
|
+
|
|
28
|
+
If you have written code, the analogy is almost on-the-nose: an archetype is a class; an instance is a value of that class. One class can have many values. One archetype can have many agents.
|
|
29
|
+
|
|
30
|
+
## The two columns side by side
|
|
31
|
+
|
|
32
|
+
| | Archetype | Instance |
|
|
33
|
+
|---|-----------|----------|
|
|
34
|
+
| **What it is** | A role-type. The *shape* of an agent's job. | A specific rostered agent. A *particular* agent fulfilling that shape. |
|
|
35
|
+
| **Examples** | `compliance`, `architect`, `intelligence-officer`, `educator`, `captain` | Rune (id `compliance`), Architect (id `architect`), Loid (id `forge`), Sheila (id `educator`), Cid (id `cid`) |
|
|
36
|
+
| **Granularity** | A class — same archetype across every Paradigm install. | A value — one specific agent per id, per installed profile. |
|
|
37
|
+
| **Travels how** | Conceptually shared across the ecosystem. Two projects' "compliance archetype" agents are filling the same role even if their names differ. | Pointed at by id. Two projects can both roster `compliance` and they are **the same instance** at the profile level — same `~/.paradigm/agents/compliance.agent` file. |
|
|
38
|
+
| **Mutable?** | Conceptually fixed. An archetype is *what an agent is*; you cannot rename a role-type and have the rest of the framework still reason about it. | The instance's id is fixed; its nickname is mutable per project; its roster status (active / benched) is mutable per project. |
|
|
39
|
+
| **CLI surface today** | None first-class — declared informally in the agent's profile narrative. | Every CLI command that takes an `<id>` is operating on an instance. |
|
|
40
|
+
|
|
41
|
+
## Worked example: the compliance archetype
|
|
42
|
+
|
|
43
|
+
Take the **compliance archetype** — the role-type that handles symbol coverage and planning. On the canonical roster, the instance filling that role is **Rune** (id `compliance`).
|
|
44
|
+
|
|
45
|
+
- The **archetype** says: "this role looks at symbol planning, runs pre-implementation plans, files post-implementation reports, and never writes source." That definition is stable across every Paradigm install — the role exists.
|
|
46
|
+
- The **instance** is Rune. Rune is the agent currently filling that role on the canonical first-party roster. Rune's profile sits at `~/.paradigm/agents/compliance.agent`. Rune has a notebook. Rune is benched or active per project.
|
|
47
|
+
|
|
48
|
+
Now imagine — purely hypothetically — that someone publishes a *second* compliance-archetype agent to nevr.land: same role-type (symbol planning, coverage), but with a different cognitive bias (perhaps stricter on tag coverage, perhaps looser on aspect drift). That second agent would have:
|
|
49
|
+
|
|
50
|
+
- a **different id** (say, `compliance-strict`),
|
|
51
|
+
- a **different nickname** (say, "Aegis-2" or whatever the publisher chose),
|
|
52
|
+
- and the **same archetype** (`compliance`).
|
|
53
|
+
|
|
54
|
+
The two agents would be **two instances of one archetype**. A project could roster either one (or, in principle, both, with the framework treating them as a pair filling the same role from different angles). The archetype tells you "this is a compliance-shaped agent" without committing to *which* compliance-shaped agent.
|
|
55
|
+
|
|
56
|
+
## Why this matters for your day-to-day
|
|
57
|
+
|
|
58
|
+
In practice, on a single project, you mostly think about instances — Rune, Loid, Cid, Sheila. You roster them, bench them, invoke them by id. The archetype distinction matters most in three situations:
|
|
59
|
+
|
|
60
|
+
1. **Cross-project reasoning.** "Does my project have an intelligence officer?" is a question about archetype, not instance. The answer is yes whether your intelligence officer instance is Loid (id `forge`) on this project or, hypothetically, a different forge-archetype agent on a different project.
|
|
61
|
+
|
|
62
|
+
2. **Talking about role-fit before commit.** When designing a new agent, you usually start by naming the *archetype* it should fill (`security-engineer`? `mobile-platform-specialist`?), then choose a specific instance to ship with that role-type. The archetype is the design abstraction; the instance is the deliverable.
|
|
63
|
+
|
|
64
|
+
3. **The future registry (nevr.land).** Once agents travel through a public registry, learners will browse archetypes ("I need a debugger archetype agent") and pick from competing instances ("I'll install Trace-classic" or "I'll install Trace-strict"). The two-layer split is what makes that browsing coherent.
|
|
65
|
+
|
|
66
|
+
## What this looks like at v6.0.3 vs later
|
|
67
|
+
|
|
68
|
+
Today, the framework leans on archetype as a **concept** — the docs use it, agent profiles narrate it, the canonical roster groups by it. But there is no first-class `archetype` field on `AgentProfile` you can query from the CLI or filter on programmatically. You cannot run `paradigm agent list --archetype intelligence-officer` and get a clean answer; you have to read the profile narratives and infer.
|
|
69
|
+
|
|
70
|
+
> **Coming in v6.1:** `archetype` becomes a first-class field on `AgentProfile`, queryable from the CLI and surfaced in registry listings. Existing agent profiles will gain an explicit `archetype:` declaration. Until then, archetype is a stable concept the framework reasons in but does not enforce in the schema. See `agent-owned-enforcement-plan.md`.
|
|
71
|
+
|
|
72
|
+
## A common confusion to avoid
|
|
73
|
+
|
|
74
|
+
It is tempting to read the canonical roster and conclude that every archetype has exactly one instance, because that is what the first-party roster ships today: one Architect, one Builder, one Loid, one Sheila. **That is a property of the current roster, not a property of the model.** The framework already supports multiple instances per archetype at the conceptual level, and the v6.1 first-class archetype field is what surfaces it. Treating the roster as a fixed one-to-one mapping will make the registry confusing later; treating it as "twenty-one instances filling sixteen-or-so distinct archetypes today" matches the design.
|
|
75
|
+
|
|
76
|
+
## Try this
|
|
77
|
+
|
|
78
|
+
Pick three agents from `paradigm agent list` and try to articulate each one's **archetype** (its role-type) versus its **instance identity** (its id and nickname). For Rune, the archetype is `compliance` and the instance id is `compliance`; the two happen to share the spelling. For Loid, the archetype is `intelligence-officer` and the instance id is `forge`; they diverge cleanly. For Mika, the archetype is `designer` and the instance id is `designer`. The point of the exercise is not to memorise which is which — it is to feel the layer separation in your hands before the v6.1 surface makes it explicit.
|
|
79
|
+
|
|
80
|
+
## Up next
|
|
81
|
+
|
|
82
|
+
The next entry — **N-para-451-tiers** — switches axes entirely. Identity layers (and the archetype / instance split) tell you *who* an agent is. Tiers tell you *which Claude model* the agent runs on. Two orthogonal taxonomies; both worth holding in your head.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: N-para-451-identity-layers
|
|
3
|
+
title: The Three-Layer Identity Model
|
|
4
|
+
type: note
|
|
5
|
+
author: paradigm
|
|
6
|
+
created: '2026-04-26'
|
|
7
|
+
updated: '2026-04-26'
|
|
8
|
+
tags:
|
|
9
|
+
- course
|
|
10
|
+
- para-451
|
|
11
|
+
- identity
|
|
12
|
+
- three-layer
|
|
13
|
+
- archetype
|
|
14
|
+
symbols: []
|
|
15
|
+
difficulty: beginner
|
|
16
|
+
estimatedMinutes: 5
|
|
17
|
+
prerequisites:
|
|
18
|
+
- N-para-451-welcome
|
|
19
|
+
category: paradigm-core
|
|
20
|
+
origin: authored
|
|
21
|
+
source: agents-course-phase-a-design.md
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Three layers, one agent
|
|
25
|
+
|
|
26
|
+
Every Paradigm agent has three layers of identity. They are easy to confuse on first contact, but keeping them straight is the single most important thing you will learn in this course — every later concept (partners, rostering, the registry, cross-project notebooks) leans on this distinction.
|
|
27
|
+
|
|
28
|
+
| Layer | What it is | Example | Mutable? |
|
|
29
|
+
|-------|------------|---------|----------|
|
|
30
|
+
| **id** | Machine-stable handle. Used in CLI, MCP, and registry calls. | `architect`, `forge`, `cid` | No — set when the agent is published; changing it breaks every reference. |
|
|
31
|
+
| **nickname** | User-customisable display name. What you see in logs and orchestration output. | "Architect", "Loid", "Cid" | Yes — rename per project, per user, per taste. |
|
|
32
|
+
| **archetype** | Role pattern. Describes what *kind* of agent this is. | `architect`, `intelligence-officer`, `captain` | Conceptually fixed — it is what the agent *is*, not what it is *called*. |
|
|
33
|
+
|
|
34
|
+
## Walking through it
|
|
35
|
+
|
|
36
|
+
### Example 1: the architect agent
|
|
37
|
+
|
|
38
|
+
- **id:** `architect`
|
|
39
|
+
- **nickname:** "Architect" (default; some users rename it to "Apex" or similar)
|
|
40
|
+
- **archetype:** `architect`
|
|
41
|
+
|
|
42
|
+
This is the canonical case where all three layers happen to share the same name. It is also the source of most confusion — learners assume the layers are the same thing because they look identical. They are not. The id is what `paradigm agent get architect` resolves against. The nickname is what shows up in your terminal. The archetype is what tells the framework "this agent fills the architect-shaped hole on every team."
|
|
43
|
+
|
|
44
|
+
### Example 2: the intelligence officer
|
|
45
|
+
|
|
46
|
+
- **id:** `forge`
|
|
47
|
+
- **nickname:** "Loid"
|
|
48
|
+
- **archetype:** `intelligence-officer`
|
|
49
|
+
|
|
50
|
+
Here all three layers diverge. The CLI calls it `forge`. The team calls it Loid. The role pattern is "intelligence officer" — the agent that designs other agents, processes session debriefs, and runs the learning loop that promotes journal entries to notebook entries to wisdom. If a second agent ever shipped that filled the same role pattern (a different intelligence officer, perhaps with a different specialty bias), it would have a different `id` and a different `nickname` but the same `archetype: intelligence-officer`.
|
|
51
|
+
|
|
52
|
+
## Why three layers, not one or two?
|
|
53
|
+
|
|
54
|
+
Each layer earns its keep:
|
|
55
|
+
|
|
56
|
+
- **id** has to be stable so that scripts, configs, MCP calls, and the cross-project notebook system never lose track of which agent is which. If `forge` could rename itself to `loid` tomorrow, every project's roster would silently break.
|
|
57
|
+
- **nickname** has to be mutable so that you, the user, can call your team whatever you want. The framework is yours; if "Loid" feels wrong and you want "Sage" instead, that should be a one-line change with no breakage.
|
|
58
|
+
- **archetype** has to be a separate layer because some questions are about *what role an agent fills*, not *which specific agent fills it*. "Does my project have an intelligence officer?" should be answerable without knowing whether yours is named Loid, Sage, or Forge.
|
|
59
|
+
|
|
60
|
+
This is also what makes the planned **nevr.land** registry coherent. When agents travel — installed across the ecosystem, recommended to other projects, paired with each other — the unit of identity has to be richer than just a name.
|
|
61
|
+
|
|
62
|
+
## Where each layer lives in the file system
|
|
63
|
+
|
|
64
|
+
- **Profile (id-keyed):** `~/.paradigm/agents/<id>.agent` — for example, `~/.paradigm/agents/forge.agent`. The filename is the id.
|
|
65
|
+
- **Nickname (project- or user-keyed):** `.paradigm/agents.yaml` under the agent's id, e.g. `forge: { nickname: "Loid" }`. Override per project.
|
|
66
|
+
- **Archetype (conceptual today):** declared informally in the agent's profile and in framework documentation. There is no first-class `archetype` field in `AgentProfile` yet — that lands in v6.1.
|
|
67
|
+
|
|
68
|
+
> **Coming in v6.1:** `archetype` becomes a first-class field in `AgentProfile`, queryable from the registry and the CLI. For now, archetype is a concept the framework leans on but does not yet enforce in the schema. Declarations made today will not need rewriting once the field ships. See `agent-owned-enforcement-plan.md`.
|
|
69
|
+
|
|
70
|
+
## Try this
|
|
71
|
+
|
|
72
|
+
Run `paradigm agent get forge`. The `id` field is `forge`. Look for the nickname (it will be "Loid" on most rosters). Now run `paradigm agent list` — the displayed name in the roster is the nickname, but the underlying record is keyed on the id. The archetype layer is the one you cannot see in the CLI yet; you have to read about it (here, in the agent's profile narrative, and in framework documentation) until v6.1 makes it queryable.
|
|
73
|
+
|
|
74
|
+
## Up next
|
|
75
|
+
|
|
76
|
+
Now that you can tell the three layers apart, the next entry — **N-para-451-archetypes-vs-instances** — zooms into the distinction between an *archetype* (the role pattern) and an *instance* (a specific agent on your roster), and shows what it means for two agents to share an archetype. After that, **N-para-451-tiers** covers the orthogonal question of which model an agent runs on.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: N-para-451-orchestration-modes
|
|
3
|
+
title: Orchestration Modes — Faceted vs Sequential
|
|
4
|
+
type: note
|
|
5
|
+
author: paradigm
|
|
6
|
+
created: '2026-04-26'
|
|
7
|
+
updated: '2026-04-26'
|
|
8
|
+
tags:
|
|
9
|
+
- course
|
|
10
|
+
- para-451
|
|
11
|
+
- orchestration
|
|
12
|
+
- faceted
|
|
13
|
+
- sequential
|
|
14
|
+
symbols: []
|
|
15
|
+
difficulty: beginner
|
|
16
|
+
estimatedMinutes: 5
|
|
17
|
+
prerequisites:
|
|
18
|
+
- N-para-451-what-is-an-agent
|
|
19
|
+
category: paradigm-core
|
|
20
|
+
origin: authored
|
|
21
|
+
source: agents-course-phase-a-design.md
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Two ways the team actually runs
|
|
25
|
+
|
|
26
|
+
When `paradigm_orchestrate_inline` decides "Architect plans, Builder implements, Reviewer reviews", **how** those three agents actually run depends on the host IDE. Paradigm supports two execution models, called **orchestration modes**, and the choice between them is set by `orchestration.default_mode` in `agents.yaml`.
|
|
27
|
+
|
|
28
|
+
| Mode | Where it runs | What it looks like |
|
|
29
|
+
|------|---------------|-------------------|
|
|
30
|
+
| **Faceted** | Claude Code (Task tool available) | Each agent launches as an isolated Task subagent. Separate context. Separate memory. Separate tool access. True multi-agent. |
|
|
31
|
+
| **Sequential** | Cursor and other IDEs without Task tool support | Each agent runs as an inline persona switch in the **same** context. You see voice and reasoning per agent, but they share memory. Sequential roleplay. |
|
|
32
|
+
|
|
33
|
+
Both modes orchestrate the *same agents*. The profiles, notebooks, identity layers, and partner declarations are identical. What changes is whether each agent gets its own room or whether they all sit in one room and take turns speaking.
|
|
34
|
+
|
|
35
|
+
## Faceted mode (Claude Code, the default)
|
|
36
|
+
|
|
37
|
+
In Claude Code, every agent invocation is a **Task tool launch**. Architect runs in its own Task with its own conversation history, sees only what it was handed in the prompt, and returns a structured result. Builder is then launched as a *separate* Task — it does not see Architect's conversation, only the spec Architect produced. Reviewer is launched after Builder, again separately.
|
|
38
|
+
|
|
39
|
+
Why this matters in practice:
|
|
40
|
+
|
|
41
|
+
- **Context isolation prevents cross-contamination.** Architect's planning chatter does not pollute Builder's implementation context. Reviewer reads the code with fresh eyes — literally, because its Task starts fresh.
|
|
42
|
+
- **Memory per agent is real.** Each agent's notebook is consulted at the start of *its* Task, not shared with the others. Builder does not accidentally inherit Architect's design notebook entries.
|
|
43
|
+
- **Parallelism is possible.** Two unrelated Task launches can run concurrently when the orchestrator decides they should — you cannot do that in a single conversation.
|
|
44
|
+
|
|
45
|
+
The trade-off: you lose the running thread. Each agent gets only what was passed in. The orchestrator has to do the handoff work explicitly (and the framework handles this for you — see `paradigm_handoff_prepare`).
|
|
46
|
+
|
|
47
|
+
## Sequential mode (Cursor and friends, the fallback)
|
|
48
|
+
|
|
49
|
+
Cursor and many other IDEs do not expose a Task-tool-equivalent surface. In those environments, faceted mode is not possible — there is no way to launch an isolated subagent. Sequential mode is the answer: the **same conversation** acts as Architect for one turn, switches to Builder for the next, switches to Reviewer for the next, and so on.
|
|
50
|
+
|
|
51
|
+
Why this still works:
|
|
52
|
+
|
|
53
|
+
- **Identity is preserved in voice and attribution.** Each turn is clearly marked as which agent is speaking. The orchestration log still shows "Architect: ..." then "Builder: ..." then "Reviewer: ...".
|
|
54
|
+
- **Profiles still load.** When the conversation switches into Builder, Builder's profile and notebook are injected into the prompt for that turn. The agent's framing is the same as in faceted mode.
|
|
55
|
+
- **Partners and routing still apply.** The partners primitive, tier mappings, and `agents.yaml` keyword routing all behave identically.
|
|
56
|
+
|
|
57
|
+
The trade-off: shared memory. Builder *can* see what Architect just said in the same conversation — which is sometimes a feature (faster handoff, less re-explanation) and sometimes a bug (Architect's design exploration leaks into Builder's implementation focus). For most workflows this is acceptable; for high-stakes or bug-investigation work where context isolation matters, faceted mode is meaningfully better.
|
|
58
|
+
|
|
59
|
+
## Which mode you are in
|
|
60
|
+
|
|
61
|
+
Check `agents.yaml`:
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
orchestration:
|
|
65
|
+
default_mode: faceted # or: sequential
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
If unset, the framework defaults to **faceted**. If you are running in an IDE that does not support the Task tool, the orchestrator will fall back to sequential automatically — no explicit switch is required, but you can pin the mode if you want determinism.
|
|
69
|
+
|
|
70
|
+
## A quick decision rule
|
|
71
|
+
|
|
72
|
+
You almost never need to pick the mode by hand. But when you do:
|
|
73
|
+
|
|
74
|
+
- **Working in Claude Code? Leave it on faceted.** The isolation and per-agent memory pay off in nearly every workflow.
|
|
75
|
+
- **Working in Cursor (or any IDE without Task tool support)? You are on sequential — that is the only option, and it is fine.**
|
|
76
|
+
- **Want to force a single shared conversation in Claude Code, e.g. for a roundtable discussion across agents?** Override `default_mode: sequential` in `agents.yaml` for that project.
|
|
77
|
+
- **Want to force isolation outside Claude Code?** You cannot — the host IDE has to support the primitive. Sequential is the floor.
|
|
78
|
+
|
|
79
|
+
## What this changes for a learner
|
|
80
|
+
|
|
81
|
+
Almost nothing in your day-to-day. You write prompts, the orchestrator picks agents, agents do work, and the result comes back attributed. The mode determines the *plumbing*, not the team's behaviour. Knowing the difference matters in two situations: (1) when you are debugging a strange handoff and want to know whether memory leaked across agents, and (2) when you are choosing between IDEs and want to understand what you give up.
|
|
82
|
+
|
|
83
|
+
## Up next
|
|
84
|
+
|
|
85
|
+
The next entry — **N-para-451-roster-management** — covers the CLI commands and the `/paradigm:agents` skill for shaping which agents are active on your project: rostering, benching, activating, and the `paradigm shift` auto-rosterer.
|