@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.
Files changed (70) hide show
  1. package/dist/{accept-orchestration-QQISPINV.js → accept-orchestration-TIXUQQGR.js} +1 -1
  2. package/dist/agent-MB3H5EZA.js +33 -0
  3. package/dist/{agent-loader-2WJHD46U.js → agent-loader-VGBPL3TH.js} +1 -1
  4. package/dist/{agent-loader-YKS2PQWO.js → agent-loader-W3RQJVW7.js} +1 -1
  5. package/dist/{agents-suggest-HYTFMQD3.js → agents-suggest-IKY6VD2R.js} +1 -1
  6. package/dist/{ambient-NVKQCW2A.js → ambient-AI42BOM5.js} +2 -2
  7. package/dist/{ambient-BE3SQXNN.js → ambient-FNNFB4AP.js} +1 -1
  8. package/dist/authority-FA3HLEOA.js +2 -0
  9. package/dist/{chunk-TZDYIPVU.js → chunk-23T6UG73.js} +111 -27
  10. package/dist/{chunk-FEYOQMZ5.js → chunk-2AU5L333.js} +1 -1
  11. package/dist/{chunk-M3PPXJU4.js → chunk-4N56FRNE.js} +1 -1
  12. package/dist/{chunk-TNVWGPCE.js → chunk-6QXBXZF6.js} +1 -1
  13. package/dist/{chunk-WESTEMIM.js → chunk-AMLD7IYC.js} +1 -1
  14. package/dist/{chunk-3DZK54RU.js → chunk-DBEWOKD6.js} +32 -7
  15. package/dist/{chunk-VXIIVMTM.js → chunk-F6E3HW45.js} +1 -1
  16. package/dist/{chunk-TBWWFRL5.js → chunk-GD4F2HC6.js} +1 -1
  17. package/dist/{chunk-6SKSV5B2.js → chunk-IOVHF4SR.js} +1 -1
  18. package/dist/{chunk-M2HKWR25.js → chunk-KAFQA7HV.js} +2 -2
  19. package/dist/{chunk-GAFKOFAV.js → chunk-LAYBUKMB.js} +1 -1
  20. package/dist/{chunk-AO7ZSRME.js → chunk-TQOT2LBO.js} +2 -2
  21. package/dist/{chunk-PHEX6LU4.js → chunk-WXF5VFB4.js} +2 -2
  22. package/dist/chunk-XQLO5URP.js +11 -0
  23. package/dist/{compliance-BNFWQPKM.js → compliance-J3VOV445.js} +1 -1
  24. package/dist/{diff-MF55KQZH.js → diff-75MABOSL.js} +1 -1
  25. package/dist/{docs-O37YLLRN.js → docs-TSAAS4W3.js} +1 -1
  26. package/dist/doctor-L5XZENCF.js +2 -0
  27. package/dist/{hooks-TFMMMB2H.js → hooks-KUEE5KMM.js} +1 -1
  28. package/dist/index.js +4 -4
  29. package/dist/mcp.js +1 -1
  30. package/dist/{migrate-Z5UQN57G.js → migrate-ZPNYDNM4.js} +1 -1
  31. package/dist/migration-notices-BHLEYC4T.js +4 -0
  32. package/dist/{nomination-engine-QPZJH6XO.js → nomination-engine-NCLTGMAK.js} +1 -1
  33. package/dist/{orchestrate-RID7HHHH.js → orchestrate-K4KBTBYK.js} +1 -1
  34. package/dist/{providers-4PXMWA7V.js → providers-TBPOE4DI.js} +1 -1
  35. package/dist/registry-OUTA3DXW.js +20 -0
  36. package/dist/reindex-IZCD2JGD.js +2 -0
  37. package/dist/{serve-MO35XIZE.js → serve-3FMUWW5K.js} +1 -1
  38. package/dist/session-tracker-HHNY6J4I.js +2 -0
  39. package/dist/{session-work-log-EE4UIZ33.js → session-work-log-MEJ33TYD.js} +1 -1
  40. package/dist/{session-work-log-4IEVE4KK.js → session-work-log-ZVVJGO7X.js} +1 -1
  41. package/dist/shift-WGMZGWOC.js +60 -0
  42. package/dist/{spawn-UH5RENSE.js → spawn-KKDDR6UR.js} +1 -1
  43. package/dist/{team-MGT66HZQ.js → team-2LGZQRP4.js} +1 -1
  44. package/dist/tools-4RRFTU5H.js +2 -0
  45. package/dist/university-content/notes/N-para-451-agent-routing.md +117 -0
  46. package/dist/university-content/notes/N-para-451-archetypes-vs-instances.md +82 -0
  47. package/dist/university-content/notes/N-para-451-identity-layers.md +76 -0
  48. package/dist/university-content/notes/N-para-451-orchestration-modes.md +85 -0
  49. package/dist/university-content/notes/N-para-451-paradigm-shift.md +95 -0
  50. package/dist/university-content/notes/N-para-451-partners-primitive.md +107 -0
  51. package/dist/university-content/notes/N-para-451-roster-management.md +132 -0
  52. package/dist/university-content/notes/N-para-451-roster-reference.md +106 -0
  53. package/dist/university-content/notes/N-para-451-the-team-pattern.md +87 -0
  54. package/dist/university-content/notes/N-para-451-tiers.md +81 -0
  55. package/dist/university-content/notes/N-para-451-welcome.md +55 -0
  56. package/dist/university-content/notes/N-para-451-what-is-an-agent.md +73 -0
  57. package/dist/university-content/paths/LP-para-451.yaml +69 -0
  58. package/dist/university-content/quizzes/Q-para-451-foundations.yaml +154 -0
  59. package/dist/university-content/quizzes/Q-para-451-when-to-invoke.yaml +182 -0
  60. package/package.json +1 -1
  61. package/dist/agent-X6I2YWOB.js +0 -33
  62. package/dist/chunk-R5ECMBIV.js +0 -11
  63. package/dist/doctor-IG5XM4C4.js +0 -2
  64. package/dist/registry-KOOKFUWD.js +0 -20
  65. package/dist/reindex-FWPD2VGM.js +0 -2
  66. package/dist/session-tracker-KGORN6B5.js +0 -2
  67. package/dist/shift-TVNY2CQF.js +0 -60
  68. package/dist/tools-QJHAVYI6.js +0 -2
  69. /package/dist/{chunk-IZSBGW6E.js → chunk-HXGYVS2N.js} +0 -0
  70. /package/dist/{platform-server-UD45NTGV.js → platform-server-ANOALDPL.js} +0 -0
@@ -0,0 +1,55 @@
1
+ ---
2
+ id: N-para-451-welcome
3
+ title: Welcome to PARA 451 — Agents Foundations
4
+ type: note
5
+ author: paradigm
6
+ created: '2026-04-26'
7
+ updated: '2026-04-26'
8
+ tags:
9
+ - course
10
+ - para-451
11
+ - agents
12
+ - welcome
13
+ symbols: []
14
+ difficulty: beginner
15
+ estimatedMinutes: 4
16
+ prerequisites:
17
+ - LP-para-101
18
+ category: paradigm-core
19
+ origin: authored
20
+ source: agents-course-phase-a-design.md
21
+ ---
22
+
23
+ ## Why this course exists
24
+
25
+ Paradigm's most differentiated feature is its **agent team**. Other AI tooling gives you one model and a chat box. Paradigm gives you a roster of named, persistent identities — each with its own role, its own notebook of learned patterns, and its own moment to step in. Architect designs. Builder implements. Reviewer reviews. Cid runs the briefing. Loid runs the learning loop. Scholar and Sheila pair on research. The team is the product.
26
+
27
+ Until now, the only place to learn about agents in University was a handful of entries inside PARA 401: Orchestration — an advanced course beginners rarely reach. Worse, those entries pre-date the v6.0.3 partners primitive and the three-layer identity model, so they describe an older version of the team. PARA 451 is the canonical, beginner-accessible introduction; the older PARA 401 agent entries are flagged as v6.1 retirement candidates and will be retired once 451 is broadly adopted.
28
+
29
+ ## What you will learn
30
+
31
+ By the end of this course you will be able to answer:
32
+
33
+ - **What is an agent in Paradigm, and how is it different from "the model"?** An agent is a persistent identity with a profile, a notebook, and a role — not a single prompt or a single Claude call.
34
+ - **What is an archetype, and how is it different from a nickname or an id?** The three-layer identity model (id / nickname / archetype) is what makes the same agent recognisable across every project, while still letting you call it whatever you want on yours.
35
+ - **Who is on the team, and when do you call each one?** A single roster reference page covers all twenty-one currently-active agents — what each one is for, when it gets invoked, and which agents it pairs with.
36
+ - **What does it mean for two agents to be "partners"?** The partners primitive (shipped at v6.0.3) is how the framework expresses that some agents work meaningfully better as a unit. Scholar + Sheila is the canonical example.
37
+ - **How does orchestration actually run?** Faceted orchestration in Claude Code (true multi-agent, isolated Task contexts) versus sequential roleplay in Cursor and IDEs without Task tool support.
38
+
39
+ ## Prerequisite
40
+
41
+ You should have completed **PARA 101: Foundations** — the five symbols, `.purpose` files, the basic shape of the `.paradigm/` directory. You do **not** need PARA 201, 301, or 401. The agent system is conceptually approachable, and learning the team early pays off in every project from then on.
42
+
43
+ ## Course shape
44
+
45
+ PARA 451 is a single ordered learning path: notes interleaved with quizzes, ending in a mastery review. The full course is ~18 entries (about 35 minutes if you skim, 75-90 minutes if you take the quizzes seriously). This first batch of entries covers the foundation: identity, model tiers, and the roster. Subsequent batches add roster management, orchestration modes, the partners primitive deep-dive, and auto-rostering.
46
+
47
+ ## What this course does **not** cover
48
+
49
+ Phase A — the entries in this course — is intentionally stable. We do not teach Rune's authority modes, the soft-block primitive, the notebook tier-1/tier-2 split, or the cross-project compounding runtime. Those topics are evolving as the v6.1 enforcement model lands, and they live in **PARA 551: Agents in Practice** (the follow-up course). The mastery review at the end of 451 will point you there when you are ready.
50
+
51
+ > **Coming in v6.1:** PARA 551 launches alongside the v6.1 enforcement-model release. It treats PARA 451 as a hard prerequisite. See `agent-owned-enforcement-plan.md`.
52
+
53
+ ## Where to go from here
54
+
55
+ Continue to **N-para-451-what-is-an-agent** to start with the conceptual foundation, then move on to **N-para-451-identity-layers**. If you only have ten minutes and you want the team-at-a-glance, jump to **N-para-451-roster-reference** — it is the most-referenced page in the course, and you will come back to it often.
@@ -0,0 +1,73 @@
1
+ ---
2
+ id: N-para-451-what-is-an-agent
3
+ title: What Is an Agent in Paradigm?
4
+ type: note
5
+ author: paradigm
6
+ created: '2026-04-26'
7
+ updated: '2026-04-26'
8
+ tags:
9
+ - course
10
+ - para-451
11
+ - agents
12
+ - identity
13
+ - profile
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
+ ## An agent is not a model invocation
25
+
26
+ The single most common confusion newcomers bring to Paradigm is the assumption that "an agent" is just "a Claude API call with a system prompt". It is not. A model invocation is **transient** — it begins, returns a response, and forgets everything. An **agent** is **persistent**: it has a name, a profile on disk, a notebook of patterns it has learned, and a role it fills across every session and (often) across every project on your machine.
27
+
28
+ Concretely, an agent in Paradigm is the union of four things:
29
+
30
+ | Part | What it is | Where it lives |
31
+ |------|------------|----------------|
32
+ | **Profile** | The agent's identity, role, voice, expertise, and partner declarations. | `~/.paradigm/agents/<id>.agent` |
33
+ | **Notebook** | What the agent has learned — patterns, gotchas, expertise entries promoted from journal observations. | `.paradigm/notebooks/<id>/` (project) or global notebook stores |
34
+ | **Roster entry** | Whether this agent is active on a given project, and at what tier. | `.paradigm/roster.yaml` |
35
+ | **Runtime invocation** | The Claude model call that happens when the agent is asked to do something — driven by the profile, fed the notebook, scoped by the roster. | At runtime, via `paradigm_orchestrate_inline` or the Claude Code Task tool |
36
+
37
+ Strip any one of these away and you do not have an agent any more — you have something less. A profile with no notebook is a fresh hire. A notebook with no profile is orphaned data. A roster entry pointing at a missing profile is a dangling reference. The agent is the *whole* construct.
38
+
39
+ ## Why the framework has many of them
40
+
41
+ Paradigm could have given you one big general-purpose Claude with a long system prompt and called it a day. It deliberately does not. Two reasons:
42
+
43
+ 1. **Specialised attention beats generalist attention.** When Architect is invoked, its profile narrows the model's attention to system design — multi-file planning, spec coherence, blast-radius reasoning. When Builder is invoked, its profile narrows attention to "follow the spec exactly, push back if unclear, ship the code". The same Claude model in both invocations produces measurably different output because the framing is different. A multi-agent team is a way of giving the model **multiple framings** in the same project, each at the right time.
44
+
45
+ 2. **Persistent expertise compounds per role.** Architect's notebook accrues *design* patterns. Reviewer's notebook accrues *review* heuristics. Loid's notebook accrues *learning-loop* observations. If everything were one agent, the patterns would muddle. Splitting roles means each agent's notebook stays sharp in its lane, and the cross-project learning that Paradigm bets on (Swift patterns compounding everywhere Swift is detected, for example) actually makes sense.
46
+
47
+ The team metaphor is not decoration. It is the simplest accurate description of what is happening: a small group of specialised, persistent identities, each running on Claude, coordinating through the framework.
48
+
49
+ ## Two scopes: globally installed, project-rostered
50
+
51
+ Every agent has two scopes you should keep straight from day one:
52
+
53
+ - **Globally installed** — the profile sits at `~/.paradigm/agents/<id>.agent` and exists once on your machine. You can install agents from GitHub or (in future) the nevr.land registry; the profile travels with you.
54
+ - **Project-rostered** — each project decides which agents from your global pool are active, via `.paradigm/roster.yaml`. Benching an agent on Project A leaves it untouched on Project B. The same global Architect can be active on six projects simultaneously and benched on a seventh.
55
+
56
+ This split is intentional. You curate your team once, globally. You shape your team per project, locally. The roster-management entry later in the course (**N-para-451-roster-management**) walks through the CLI and the `/paradigm:agents` skill that drive both halves.
57
+
58
+ ## How agents are invoked at runtime
59
+
60
+ When the framework needs an agent to do something, two paths are common:
61
+
62
+ 1. **Via the Task tool (Claude Code).** Each agent runs in an isolated Task subagent context, with the `paradigm:` prefix on its name (e.g. `paradigm:architect`, `paradigm:builder`). Each agent has its own conversation, its own memory, its own tool access — true multi-agent execution. This is **faceted orchestration**, the default in Claude Code.
63
+ 2. **Via sequential roleplay.** In Cursor and other IDEs without Task tool support, the framework runs each agent as an inline persona switch in the same context — you see the agent's voice and reasoning, but they share memory rather than each holding their own. This is **sequential mode**, covered in **N-para-451-orchestration-modes**.
64
+
65
+ Either way, the agent's profile is loaded, its notebook is consulted, and its output is attributed back to its identity (so you can see in the orchestration log "Architect designed", "Builder implemented", "Reviewer flagged"). The mode shapes *how* the work runs; the identity is the same either way.
66
+
67
+ ## Try this
68
+
69
+ Run `paradigm agent list`. The output is your project's roster — every agent currently active, with its id and nickname. Pick one (Architect is a good first target) and run `paradigm agent get architect`. You will see the profile fields: id, nickname, role, tier, partners, and a description of what the agent does. That on-disk record — not a conversation, not a single prompt — is the agent.
70
+
71
+ ## Up next
72
+
73
+ Now that the agent concept is clear, **N-para-451-identity-layers** zooms into the three layers every agent has (id, nickname, archetype) and why each layer earns its keep. After that, **N-para-451-tiers** covers the orthogonal question of which Claude model an agent runs on by default.
@@ -0,0 +1,69 @@
1
+ id: LP-para-451
2
+ title: 'PARA 451: Agents Foundations'
3
+ description: >-
4
+ Meet the team. Learn what each agent does and when to call them. PARA 451 is the
5
+ beginner-accessible introduction to Paradigm's most differentiated feature — its
6
+ agent system. The course covers the three-layer identity model (id / nickname /
7
+ archetype), the archetype-vs-instance distinction, the model-tier taxonomy, the
8
+ canonical 21-agent roster, roster management, the `paradigm shift` auto-rosterer,
9
+ the orchestration modes (faceted vs sequential roleplay), the partners
10
+ primitive, an agent-routing decision tree, and a capstone on why the team
11
+ pattern wins. Approximately 18 entries when complete (~35 minutes skim,
12
+ 75-90 minutes full mastery). This course is the canonical introduction to
13
+ agents; the older agent entries inside PARA 401 are flagged as v6.1 retirement
14
+ candidates. Subsequent course PARA 551 (Agents in Practice) covers the v6.1
15
+ enforcement model, authority modes, soft-blocks, and notebook tier-1/tier-2
16
+ split.
17
+ author: paradigm
18
+ created: '2026-04-26'
19
+ updated: '2026-04-26'
20
+ tags:
21
+ - course
22
+ - para-451
23
+ - agents
24
+ - path
25
+ ordered: true
26
+ category: paradigm-core
27
+ origin: authored
28
+ source: agents-course-phase-a-design.md
29
+ prerequisites:
30
+ - LP-para-101
31
+ # Batches 1-3 (14 of ~18 planned entries) are implemented below. The remaining
32
+ # planned entries (per .paradigm/research/agents-course-phase-a-design.md §2)
33
+ # are the per-topic mini-quizzes (Q-para-451-identity-layers,
34
+ # Q-para-451-archetypes-vs-instances, Q-para-451-tiers,
35
+ # Q-para-451-roster-management, Q-para-451-orchestration-modes,
36
+ # Q-para-451-partners) and the N-para-451-mastery-review note. Per the
37
+ # batch-2/3 user locks, mini-quizzes are deferred to a polish pass after
38
+ # launch — bigger when-to-invoke is the highest-leverage routing test, and the
39
+ # capstone N-para-451-the-team-pattern serves as the conceptual close until
40
+ # mastery-review lands.
41
+ steps:
42
+ - content: N-para-451-welcome
43
+ required: true
44
+ - content: N-para-451-what-is-an-agent
45
+ required: true
46
+ - content: N-para-451-identity-layers
47
+ required: true
48
+ - content: N-para-451-archetypes-vs-instances
49
+ required: true
50
+ - content: N-para-451-tiers
51
+ required: true
52
+ - content: N-para-451-roster-reference
53
+ required: true
54
+ - content: N-para-451-roster-management
55
+ required: true
56
+ - content: N-para-451-paradigm-shift
57
+ required: true
58
+ - content: N-para-451-orchestration-modes
59
+ required: true
60
+ - content: N-para-451-partners-primitive
61
+ required: true
62
+ - content: N-para-451-agent-routing
63
+ required: true
64
+ - content: N-para-451-the-team-pattern
65
+ required: true
66
+ - content: Q-para-451-when-to-invoke
67
+ required: true
68
+ - content: Q-para-451-foundations
69
+ required: true
@@ -0,0 +1,154 @@
1
+ id: Q-para-451-foundations
2
+ title: 'PARA 451: Agents Foundations — Foundations Quiz'
3
+ description: >-
4
+ First quiz of PARA 451. Covers what an agent is, the three identity layers
5
+ (id / nickname / archetype), model tiers, the faceted vs sequential
6
+ orchestration modes, when to invoke the always-on backbone agents, and the
7
+ `paradigm shift` auto-rosterer. Six questions.
8
+ author: paradigm
9
+ created: '2026-04-26'
10
+ updated: '2026-04-26'
11
+ tags:
12
+ - course
13
+ - para-451
14
+ - agents
15
+ - foundations
16
+ - quiz
17
+ symbols: []
18
+ difficulty: beginner
19
+ passThreshold: 0.7
20
+ prerequisites:
21
+ - N-para-451-roster-management
22
+ category: paradigm-core
23
+ origin: authored
24
+ source: agents-course-phase-a-design.md
25
+ questions:
26
+ - id: q1
27
+ question: >-
28
+ You rename `forge` to "Lola" on your project, while leaving the agent's
29
+ machine-stable handle and role pattern untouched. Which of the three
30
+ identity layers did you change?
31
+ choices:
32
+ A: id
33
+ B: nickname
34
+ C: archetype
35
+ D: tier
36
+ E: All three — they always change together
37
+ correct: B
38
+ explanation: >-
39
+ The nickname is the user-customisable display layer. Renaming `forge` to
40
+ "Lola" changes only the nickname; the id (`forge`) stays stable so CLI,
41
+ MCP, and registry references keep resolving, and the archetype
42
+ (`intelligence-officer`) stays fixed because that is what the agent *is*,
43
+ not what it is *called*. Tier is an orthogonal axis (which model the
44
+ agent runs on) and is not part of the identity model.
45
+ - id: q2
46
+ question: >-
47
+ A teammate says "let's bump documentor up to opus on this project for
48
+ the next week." Which Paradigm concept are they actually changing?
49
+ choices:
50
+ A: The documentor's archetype
51
+ B: The documentor's notebook tier
52
+ C: The documentor's model tier (its default Claude model)
53
+ D: The documentor's roster status
54
+ E: The documentor's partners declaration
55
+ correct: C
56
+ explanation: >-
57
+ Model tier maps an agent to a default Claude model — tier-1 (opus),
58
+ tier-2 (sonnet), tier-3 (haiku). Bumping `documentor` from its tier-2
59
+ default up to opus is a model-tier override, configured per-project in
60
+ `.paradigm/config.yaml` under `model-resolution`. This is **not** the
61
+ v6.1 notebook-tier concept (scope/ownership of learned patterns), which
62
+ is a separate axis with the same unfortunate name — PARA 451 keeps the
63
+ two strictly separate.
64
+ - id: q3
65
+ question: >-
66
+ You are working in Cursor on a small task. You notice that when the
67
+ orchestrator switches from `architect` to `builder`, builder seems to
68
+ "remember" things architect just discussed. In Claude Code with the
69
+ default settings, this would not happen. What is the difference?
70
+ choices:
71
+ A: Cursor uses faceted mode and Claude Code uses sequential mode
72
+ B: >-
73
+ Cursor uses sequential mode (single shared context, agents take turns
74
+ in the same conversation), while Claude Code defaults to faceted mode
75
+ (each agent runs in an isolated Task subagent with its own memory)
76
+ C: Cursor disables agent profiles entirely
77
+ D: Claude Code shares notebooks across agents while Cursor does not
78
+ E: The two IDEs use entirely different agent rosters
79
+ correct: B
80
+ explanation: >-
81
+ Faceted mode (the Claude Code default) launches each agent as an
82
+ isolated Task subagent — separate context, separate memory, separate
83
+ tool access. Sequential mode (Cursor and other IDEs without Task tool
84
+ support) runs each agent as a persona switch in the same conversation,
85
+ so they share memory. Both modes use the same agent profiles and the
86
+ same identity layers; the difference is the runtime plumbing. The mode
87
+ is configured by `orchestration.default_mode` in `agents.yaml`.
88
+ - id: q4
89
+ question: >-
90
+ You are about to start a feature that will touch eight files across
91
+ three packages and you do not yet have a written plan. Which agent
92
+ should pick this up first?
93
+ choices:
94
+ A: builder — start implementing and figure it out as you go
95
+ B: reviewer — review what you already have before planning
96
+ C: architect — design the multi-file change and produce a spec
97
+ D: tester — write tests first and let the design fall out
98
+ E: documentor — update `.purpose` files first
99
+ correct: C
100
+ explanation: >-
101
+ `architect` is the design agent — system design, specs, multi-file
102
+ planning. Anything that spans three or more files in a non-trivial way
103
+ is architect's territory. `builder` follows the spec architect produces;
104
+ invoking builder first on an unscoped change is exactly the trap
105
+ architect exists to prevent. `reviewer` runs after implementation, not
106
+ before. `documentor` runs as the final orchestration stage on
107
+ `.purpose` files and `portal.yaml`, not as the entry point for
108
+ multi-file design work.
109
+ - id: q5
110
+ question: >-
111
+ `builder` has just finished implementing a feature and the diff is in
112
+ front of you. The change touches the README. Which agents should run
113
+ next, and in what order?
114
+ choices:
115
+ A: documentor first, then reviewer
116
+ B: reviewer first, then documentor (the final orchestration stage)
117
+ C: ftux first, then reviewer, then documentor
118
+ D: reviewer first, then ftux (because the README is a user-visible
119
+ surface), then documentor as the final stage
120
+ E: Only documentor — reviewer is unnecessary on small features
121
+ correct: D
122
+ explanation: >-
123
+ The canonical post-implementation sequence: `reviewer` does the
124
+ two-stage review (spec compliance, then code quality) and hands back
125
+ without fixing. `ftux` (Nora) runs after Builder when the task touches
126
+ a user-visible surface — README qualifies, and ftux reads ONLY
127
+ user-facing surfaces to simulate first-time-user friction. `documentor`
128
+ is **always the final orchestration stage** — it updates `.purpose`
129
+ files, `portal.yaml`, and lore, never source. Reviewer-only or
130
+ documentor-only sequences skip the friction signal that Nora exists to
131
+ capture.
132
+ - id: q6
133
+ question: >-
134
+ You have just cloned a fresh Swift project and the repo has no
135
+ `.paradigm/roster.yaml` yet. Which command bootstraps an initial roster
136
+ that includes both the always-on backbone *and* the matching ecosystem
137
+ agent?
138
+ choices:
139
+ A: paradigm agent list
140
+ B: paradigm agent activate swift
141
+ C: paradigm shift
142
+ D: paradigm agent get architect
143
+ E: paradigm agent bench --all
144
+ correct: C
145
+ explanation: >-
146
+ `paradigm shift` is the auto-rosterer. It detects the project's
147
+ language and platform (Swift in this case), selects the always-on
148
+ backbone (architect, builder, reviewer, security, tester, documentor,
149
+ cid), and adds matching ecosystem agents (`swift` for a Swift project).
150
+ `paradigm agent list` only displays the current roster; `paradigm agent
151
+ activate swift` would only add the ecosystem agent and would not seed
152
+ the backbone; the other options do unrelated things. `paradigm shift`
153
+ is the single command that gets a fresh project from "no roster" to "a
154
+ sensible default roster".
@@ -0,0 +1,182 @@
1
+ id: Q-para-451-when-to-invoke
2
+ title: 'PARA 451: Agents Foundations — When to Invoke Quiz'
3
+ description: >-
4
+ Highest-leverage routing quiz of PARA 451. Five scenario questions covering
5
+ builder-vs-documentor differentiation, reviewer activation timing, scholar
6
+ deep-dive triggering, ftux first-time UX simulation, and designer for visual
7
+ work. Tests the decision-tree material from N-para-451-agent-routing.
8
+ Architect-routing scenario is intentionally omitted (already covered in
9
+ Q-para-451-foundations q4).
10
+ type: quiz
11
+ author: paradigm
12
+ created: '2026-04-26'
13
+ updated: '2026-04-26'
14
+ tags:
15
+ - course
16
+ - para-451
17
+ - agents
18
+ - routing
19
+ - when-to-invoke
20
+ - quiz
21
+ symbols: []
22
+ difficulty: beginner
23
+ passThreshold: 0.7
24
+ prerequisites:
25
+ - N-para-451-agent-routing
26
+ category: paradigm-core
27
+ origin: authored
28
+ source: agents-course-phase-a-design.md
29
+ questions:
30
+ - id: q1
31
+ question: >-
32
+ Builder has just shipped a feature. The diff modifies source files and
33
+ adds three new exported functions, but does not touch any `.purpose`
34
+ files, `portal.yaml`, or lore. Two agents are clearly relevant: one to
35
+ verify the implementation, and one to keep framework metadata in sync.
36
+ Which agent owns which job, and in what order do they run?
37
+ choices:
38
+ A: documentor reviews the code, then builder updates .purpose files
39
+ B: >-
40
+ reviewer reviews the code (spec compliance, then code quality), then
41
+ documentor updates `.purpose` files, `portal.yaml`, and lore as the
42
+ final orchestration stage. documentor never touches source.
43
+ C: >-
44
+ documentor reviews the code AND updates .purpose files in one pass —
45
+ reviewer is unnecessary for small changes
46
+ D: >-
47
+ reviewer reviews the code AND updates .purpose files in one pass —
48
+ documentor is for user-facing docs only
49
+ E: >-
50
+ builder updates `.purpose` files itself; neither reviewer nor
51
+ documentor needs to run
52
+ correct: B
53
+ explanation: >-
54
+ reviewer and documentor own non-overlapping jobs. reviewer runs the
55
+ two-stage review (spec compliance, then code quality) and hands back
56
+ without fixing — its job is verifying the code. documentor is **always
57
+ the final orchestration stage** and updates `.purpose` files,
58
+ `portal.yaml`, and lore — never source. The two agents differentiate
59
+ cleanly: reviewer touches code (read-only), documentor touches
60
+ framework metadata (write). Conflating them is the most common routing
61
+ mistake; that is why this quiz tests the difference explicitly.
62
+ - id: q2
63
+ question: >-
64
+ You are halfway through implementing a feature in builder when you
65
+ realise the spec is ambiguous about an edge case. What is the right
66
+ escalation move?
67
+ choices:
68
+ A: >-
69
+ Push through with a best-guess interpretation; reviewer will catch it
70
+ later
71
+ B: Bench builder and switch to architect to redesign the whole feature
72
+ C: >-
73
+ Have builder push back on the ambiguity (this is one of builder's
74
+ documented behaviours) and route the clarifying question to architect
75
+ — the agent that produced the spec — before continuing
76
+ D: >-
77
+ Ask documentor to clarify the spec, since documentor owns
78
+ framework-text consistency
79
+ E: Invoke jinx (advocate) to pick the safer interpretation
80
+ correct: C
81
+ explanation: >-
82
+ builder's profile explicitly says "follows specs exactly. Pushes back
83
+ when unclear." Pushing back on ambiguity is the documented behaviour,
84
+ not a failure mode. The clarifying question routes to architect because
85
+ architect owns the spec — that is exactly what architect was invoked
86
+ for. reviewer runs after implementation, not as a clarification surface
87
+ mid-implementation. documentor never touches spec content. jinx is for
88
+ stress-testing assumptions before high-risk decisions, not for
89
+ arbitrating ambiguous spec text.
90
+ - id: q3
91
+ question: >-
92
+ You are about to add a new technical research entry to the project's
93
+ learning materials — citations, file references, careful sourcing — and
94
+ then shape it into a sequenced quiz. Which agent (or pair) picks this
95
+ up?
96
+ choices:
97
+ A: educator alone — pedagogical sequencing covers all of it
98
+ B: scholar alone — research includes the shaping step
99
+ C: researcher alone — all research is researcher's job
100
+ D: >-
101
+ scholar and educator as a reciprocal pair — scholar produces the
102
+ source material with citation discipline; educator shapes it
103
+ pedagogically into the quiz. This is the canonical use of the
104
+ partners primitive.
105
+ E: documentor — University content is framework-text, so documentor owns it
106
+ correct: D
107
+ explanation: >-
108
+ scholar and educator (Sheila) are the canonical partners pair in
109
+ Paradigm. scholar produces source material with citation discipline;
110
+ educator shapes it into pedagogical form (sequenced quizzes, paths,
111
+ PLSAT modules). Routing to one alone leaves half the work undone.
112
+ researcher is the **business / market** research agent, not technical
113
+ research — different archetype entirely. documentor handles framework
114
+ metadata (`.purpose`, `portal.yaml`, lore), not University content.
115
+ This routing is the same partnership that authored PARA 451 itself.
116
+ - id: q4
117
+ question: >-
118
+ Builder has just shipped a CLI command improvement. The change updates
119
+ the `--help` output, the printed error messages, and the README's
120
+ install section. After reviewer signs off but before documentor runs,
121
+ which additional agent should be in the pipeline, and what is the rule
122
+ for when to include it?
123
+ choices:
124
+ A: >-
125
+ scholar — to research how other CLIs handle the same command shape
126
+ B: >-
127
+ ftux — Nora simulates a first-time user and reads ONLY user-facing
128
+ surfaces (README, --help, docs, error messages). Include ftux after
129
+ builder when the task touches a user-visible surface; skip when the
130
+ change is purely internal.
131
+ C: >-
132
+ designer — Mika reviews any text change for visual hierarchy
133
+ D: >-
134
+ ftux always runs after every builder pass, regardless of whether the
135
+ change is user-facing
136
+ E: >-
137
+ jinx — to stress-test the new error messages for failure modes
138
+ correct: B
139
+ explanation: >-
140
+ ftux (Nora) is the framework's first-time-user-experience guard. Its
141
+ simulation integrity rule is strict — it reads ONLY user-facing surfaces
142
+ (README, --help, docs, changelogs, error strings). It never reads
143
+ source code; confusion observed in user-facing surfaces **is** data.
144
+ The trigger condition is "the task touches a user-visible surface" —
145
+ a CLI `--help` change, a README update, or new error messages all
146
+ qualify. Internal-only refactors do not. ftux running after every
147
+ builder pass would be wasted invocation; ftux skipping a CLI surface
148
+ change would miss the friction it exists to catch.
149
+ - id: q5
150
+ question: >-
151
+ You are about to redesign the visual layout of a settings panel — UI
152
+ hierarchy, spacing, motion, accessibility. Which agent owns this work,
153
+ and what is the relationship to builder?
154
+ choices:
155
+ A: >-
156
+ builder owns it — visual work is just code, and builder writes the
157
+ code
158
+ B: >-
159
+ designer (Mika) owns the visual surface; builder owns the wiring.
160
+ Invoke designer for the visual decisions, builder for the
161
+ implementation, often in parallel for visual / UI / design-system
162
+ work.
163
+ C: >-
164
+ forge owns it — visual changes are agent work
165
+ D: >-
166
+ documentor owns it, since visual changes are user-facing
167
+ E: >-
168
+ Only mika can ever touch UI code; builder must be benched on UI
169
+ projects entirely
170
+ correct: B
171
+ explanation: >-
172
+ designer (Mika) is the design engineer — UI/UX, design systems, motion,
173
+ accessibility. designer owns the **surface** (the visual decisions, the
174
+ hierarchy, the spacing, the motion); builder owns the **wiring** (the
175
+ implementation that makes the surface real). On UI work the two run
176
+ together — often in parallel — with designer producing the surface
177
+ decisions and builder shipping the implementation. forge is the
178
+ intelligence-officer archetype (Loid) and has nothing to do with
179
+ visual work. documentor only touches framework metadata. Benching
180
+ builder on UI projects entirely would be incorrect — builder is
181
+ always part of the implementation pipeline; designer is the
182
+ *additional* agent that owns the visual decisions builder implements.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a-company/paradigm",
3
- "version": "6.0.2",
3
+ "version": "6.0.4",
4
4
  "description": "Unified CLI for Paradigm developer tools",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -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};