@a-company/paradigm 3.46.0 → 5.3.3
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-ZUWQUHSK.js → accept-orchestration-GX2YRWM4.js} +5 -5
- package/dist/{add-VSPZ6FM4.js → add-FZRKEGH4.js} +1 -1
- package/dist/agent-HYKC2LAK.js +387 -0
- package/dist/agent-loader-SJPJJS33.js +36 -0
- package/dist/{agents-suggest-65SER5IS.js → agents-suggest-DNSYJ6IA.js} +1 -1
- package/dist/{aggregate-SV3VGEIL.js → aggregate-H57K7PNV.js} +1 -1
- package/dist/{assess-UHBDYIK7.js → assess-4WVXZLZQ.js} +2 -2
- package/dist/{auto-24ICVUH4.js → auto-QFS5NHQU.js} +1 -1
- package/dist/{beacon-3SJV4DAP.js → beacon-KXZXYQHX.js} +1 -1
- package/dist/{calibration-WWHK73WU.js → calibration-V46G7JTY.js} +2 -2
- package/dist/{check-OLI6AUS6.js → check-OWAIWV23.js} +1 -1
- package/dist/{chunk-RP6TZYGE.js → chunk-2IO7JAG2.js} +1 -1
- package/dist/chunk-2T6BTYBN.js +712 -0
- package/dist/{chunk-CDMAMDSG.js → chunk-5VKJBNJL.js} +13 -5
- package/dist/{chunk-KB4XJWE3.js → chunk-6N3JTACN.js} +98 -437
- package/dist/chunk-7N7GSU6K.js +34 -0
- package/dist/chunk-A2L4TSLZ.js +526 -0
- package/dist/{chunk-P7XSBJE3.js → chunk-ABVQGRF7.js} +1 -1
- package/dist/{chunk-HIKKOCXY.js → chunk-EI32ZBE6.js} +1 -1
- package/dist/{chunk-QIOCFXDQ.js → chunk-EKGMAM62.js} +1 -1
- package/dist/chunk-EZ3GOCYC.js +132 -0
- package/dist/chunk-GGMI6C2L.js +1075 -0
- package/dist/{chunk-DS5QY37M.js → chunk-GTR2TBIJ.js} +247 -15
- package/dist/{chunk-QDXI2DHR.js → chunk-J2JEQRT3.js} +1 -1
- package/dist/{chunk-AKIMFN6I.js → chunk-JASGXLK3.js} +2 -2
- package/dist/{chunk-J4E6K5MG.js → chunk-LSRABQIY.js} +25 -1
- package/dist/chunk-MCMOGQMU.js +145 -0
- package/dist/{chunk-ZXMDA7VB.js → chunk-PDX44BCA.js} +1 -6
- package/dist/{chunk-2SKXFXIT.js → chunk-S3ORKP3V.js} +10 -15
- package/dist/{chunk-ZMQA6SCO.js → chunk-S6MZ2IEX.js} +628 -228
- package/dist/chunk-TAIJOFOE.js +124 -0
- package/dist/{chunk-FS3WTUHY.js → chunk-TXESEO7Y.js} +6 -6
- package/dist/{chunk-7COU5S2Z.js → chunk-VL67H5IC.js} +1 -1
- package/dist/{chunk-QWA26UNO.js → chunk-WQITYKHM.js} +7 -7
- package/dist/{chunk-MW5DMGBB.js → chunk-YMDLDELF.js} +114 -55
- package/dist/{claude-63ISJAZK.js → claude-FRRWJSTJ.js} +1 -1
- package/dist/{claude-cli-ABML5RHX.js → claude-cli-XJLK2X4L.js} +1 -1
- package/dist/{claude-code-JRLMRPTO.js → claude-code-HTBA4XRB.js} +1 -1
- package/dist/{claude-code-teams-CAJBEFIZ.js → claude-code-teams-T4SP24MD.js} +1 -1
- package/dist/{conductor-HLWYWUVH.js → conductor-PGPDVIVE.js} +1 -1
- package/dist/{config-schema-3YNIFJCJ.js → config-schema-EA4XALGG.js} +4 -2
- package/dist/{constellation-FAGT45TU.js → constellation-A26CCGQS.js} +1 -1
- package/dist/{context-audit-557EO6PK.js → context-audit-RLO3ETRP.js} +8 -5
- package/dist/{cost-XEBADYFT.js → cost-BGM32XJU.js} +1 -1
- package/dist/{cost-UD3WPEKZ.js → cost-VI46A4XL.js} +1 -1
- package/dist/{cursor-cli-QUOOF2N4.js → cursor-cli-JVEZGHWQ.js} +1 -1
- package/dist/{cursorrules-3TKZ4E4R.js → cursorrules-HLIKJJZT.js} +1 -1
- package/dist/decision-loader-WWCLIQPJ.js +20 -0
- package/dist/{delete-RRK4RL6Y.js → delete-KBRPQLPC.js} +2 -2
- package/dist/{diff-IP5CIARP.js → diff-RQLLNAFI.js} +5 -5
- package/dist/{discipline-5F5OVTXB.js → discipline-FA4OZXIS.js} +1 -1
- package/dist/{dist-UXWV4OKX.js → dist-34NA5RS5.js} +1 -1
- package/dist/{dist-5QE2BB2B-X6DYVSUL.js → dist-5QE2BB2B-5S3T6Y3T.js} +1 -1
- package/dist/{dist-CM3MVWWW.js → dist-77JDTVAY.js} +1 -0
- package/dist/{dist-POMVY6WP.js → dist-QK4SQAK7.js} +1 -1
- package/dist/{dist-3RVKEJRT.js → dist-TA6LSC2Q.js} +1 -1
- package/dist/docs-LVLRPBAW.js +155 -0
- package/dist/docs-PBZB7LYP.js +89 -0
- package/dist/{doctor-GKZJU7QG.js → doctor-ULBOHEIC.js} +3 -3
- package/dist/{drift-YGT4LJ7Q.js → drift-R5NRKFHI.js} +1 -1
- package/dist/{echo-A6HD5UP7.js → echo-O2LY7CC2.js} +1 -1
- package/dist/{edit-4CLNN5JG.js → edit-R2HNLMOG.js} +2 -2
- package/dist/event-25OJKDCE.js +31 -0
- package/dist/{export-T7CMMJIB.js → export-IWVL7XLF.js} +1 -1
- package/dist/{flow-UFMPVOEM.js → flow-CRRVV3O3.js} +2 -2
- package/dist/{global-HHUJSBG5.js → global-3NG5JXUB.js} +1 -1
- package/dist/graduate-USAWGBJM.js +160 -0
- package/dist/{graph-YYUXI3F7.js → graph-VHUMAAS6.js} +2 -2
- package/dist/{graph-server-ZPXRSGCW.js → graph-server-YL22VBBN.js} +1 -1
- package/dist/{habits-RG5SVKXP.js → habits-OL5NGPXO.js} +3 -3
- package/dist/{history-CETCSUCP.js → history-WOWC573W.js} +1 -1
- package/dist/{hooks-TCUHQMPF.js → hooks-HFWSCGPV.js} +2 -2
- package/dist/index.js +290 -188
- package/dist/{integrity-MK2OP5TA.js → integrity-IHO4FZTS.js} +1 -1
- package/dist/{integrity-checker-J7YXRTBT.js → integrity-checker-PSKJA5SB.js} +1 -0
- package/dist/journal-loader-5EYSBFFY.js +18 -0
- package/dist/{lint-HYWGS3JJ.js → lint-K6CJGGPH.js} +1 -1
- package/dist/{list-IUCYPGMK.js → list-4YK7QKFF.js} +1 -1
- package/dist/{list-BTLFHSRC.js → list-ENR7Q4CR.js} +2 -2
- package/dist/{lore-loader-VTEEZDX3.js → lore-loader-7NO6N6FT.js} +4 -1
- package/dist/{lore-server-NOOAHKJX.js → lore-server-UNJY5KC3.js} +1 -1
- package/dist/{manual-AFJ2J2V3.js → manual-G6FISID5.js} +1 -1
- package/dist/mcp.js +3764 -359
- package/dist/{migrate-FQVGQNXZ.js → migrate-LS45DNEV.js} +2 -2
- package/dist/{migrate-assessments-JP6Q5KME.js → migrate-assessments-RGH4O6IX.js} +2 -2
- package/dist/nomination-engine-Q4XSXFKT.js +40 -0
- package/dist/notebook-YWIYGEHV.js +155 -0
- package/dist/{orchestrate-A226N6FC.js → orchestrate-XZA33TJC.js} +5 -5
- package/dist/{peers-RFQCWVLV.js → peers-DEOUIZM6.js} +1 -1
- package/dist/persona-UHAHIVST.js +390 -0
- package/dist/{pipeline-3G2FRAKM.js → pipeline-L4HCSBGN.js} +1 -1
- package/dist/{platform-server-H7Y6Q7O4.js → platform-server-PMD57BEG.js} +264 -18
- package/dist/{plugin-update-checker-HMRPGY5Z.js → plugin-update-checker-ELOEEQYS.js} +1 -0
- package/dist/{portal-check-FF5EKZE5.js → portal-check-NPYGII2D.js} +2 -2
- package/dist/{portal-compliance-VU4NIFEN.js → portal-compliance-J7DGAPFX.js} +2 -2
- package/dist/{probe-7JK7IDNI.js → probe-MHL5HQZ2.js} +3 -3
- package/dist/{promote-XO63XMAN.js → promote-F6ZYZZAL.js} +2 -2
- package/dist/{providers-YNFSL6HK.js → providers-GK7PB2OL.js} +2 -2
- package/dist/{quiz-I75NU2QQ.js → quiz-M66SC7F7.js} +1 -1
- package/dist/{record-46CLR4OG.js → record-RA4WR2BO.js} +2 -2
- package/dist/{reindex-WIJMCJ4A.js → reindex-HRA2AUS6.js} +3 -2
- package/dist/{remember-4EUZKIIB.js → remember-HBWJ655S.js} +1 -1
- package/dist/{retag-KC4JVRLE.js → retag-3OLCVDEQ.js} +2 -2
- package/dist/{review-Q7M4CRB5.js → review-27ATYTD2.js} +2 -2
- package/dist/review-57QMURZV.js +334 -0
- package/dist/{ripple-RI3LOT6R.js → ripple-JPBXP5I3.js} +1 -1
- package/dist/{sentinel-UOIGJWHH.js → sentinel-4XIG4STA.js} +2 -2
- package/dist/{sentinel-bridge-APDXYAZS.js → sentinel-bridge-MDUXTQRL.js} +2 -2
- package/dist/{serve-KKEHE44G.js → serve-FLTFTM3P.js} +2 -2
- package/dist/{serve-22A4XOIG.js → serve-INL7SNBK.js} +2 -2
- package/dist/{serve-2YJ6D2Y6.js → serve-KBSE36PL.js} +4 -4
- package/dist/{server-JV6UFGWZ.js → server-54SKYFFY.js} +2 -2
- package/dist/{server-RDLQ3DK7.js → server-XUOIO7E6.js} +1 -1
- package/dist/{setup-YNZJQLW7.js → setup-EDS27WUR.js} +1 -1
- package/dist/{setup-M2ZKLKNN.js → setup-KO5AFC4K.js} +2 -2
- package/dist/{shift-LNMKFYLR.js → shift-VFG23DLA.js} +16 -16
- package/dist/{show-P7GYO43X.js → show-5PV5KFJE.js} +2 -2
- package/dist/{show-PKZMYKRN.js → show-NQKYX6WQ.js} +1 -1
- package/dist/{snapshot-Y3COXK4T.js → snapshot-BK4RBPCG.js} +1 -1
- package/dist/{spawn-SSXZX45U.js → spawn-AW6GDECS.js} +3 -3
- package/dist/{status-KLHALGW4.js → status-WGIAQODY.js} +1 -1
- package/dist/{summary-5NQNOD3F.js → summary-NIRABMF5.js} +2 -2
- package/dist/{sweep-EZU3GU6S.js → sweep-QMHNSIY5.js} +2 -2
- package/dist/{switch-WYUMVNA5.js → switch-6EJPZDIA.js} +1 -1
- package/dist/{symphony-6K3HD7AW.js → symphony-4OCY36AI.js} +5 -5
- package/dist/{symphony-YCHBYN3E.js → symphony-B75X2MME.js} +2 -2
- package/dist/{symphony-peers-HSY3RI3S.js → symphony-peers-2ZQYLRNI.js} +1 -1
- package/dist/{symphony-peers-APOGJPF4.js → symphony-peers-OL7F6M5S.js} +1 -0
- package/dist/{symphony-relay-GTAJRCVF.js → symphony-relay-UJYUXN65.js} +28 -1
- package/dist/{sync-ZM4Q3R4U.js → sync-VEHUH4OA.js} +3 -3
- package/dist/{sync-llms-JIPP3XX4.js → sync-llms-YHCFIE6X.js} +2 -2
- package/dist/{task-loader-7M2FCBX6.js → task-loader-LDYWQSLM.js} +1 -0
- package/dist/{team-HGLJXWQG.js → team-7HG7XK5C.js} +6 -6
- package/dist/{test-WTR5Q33E.js → test-566CP5KC.js} +1 -1
- package/dist/{thread-3WM7KKID.js → thread-N754I4D5.js} +1 -1
- package/dist/{timeline-ANC7LVDL.js → timeline-M3CICQFE.js} +2 -2
- package/dist/{triage-IZ4MDYNB.js → triage-HHYGT3HY.js} +1 -1
- package/dist/{tutorial-GC6QL4US.js → tutorial-KD22SUNO.js} +1 -1
- package/dist/university-content/courses/.purpose +66 -0
- package/dist/university-content/courses/para-401.json +146 -0
- package/dist/university-content/courses/para-501.json +67 -0
- package/dist/university-content/courses/para-601.json +608 -0
- package/dist/university-content/plsat/.purpose +6 -0
- package/dist/university-content/plsat/v2.0.json +2 -2
- package/dist/university-content/plsat/v3.0.json +563 -3
- package/dist/university-content/reference.json +91 -0
- package/dist/{upgrade-ANX3LVSA.js → upgrade-H5PF32BW.js} +2 -2
- package/dist/{validate-GD5XWILV.js → validate-CNKEKO6A.js} +1 -1
- package/dist/{validate-ITC5D6QG.js → validate-MB5ULIHS.js} +1 -1
- package/dist/{validate-ZVPNN4FL.js → validate-QH3LADM6.js} +1 -1
- package/dist/{watch-X64UK7K4.js → watch-2TKP5PVL.js} +3 -3
- package/dist/{watch-ERBEJUJW.js → watch-ZF4ML6CD.js} +2 -2
- package/dist/{wisdom-L2WC7J62.js → wisdom-AATMGNFA.js} +1 -1
- package/dist/work-log-loader-5L45XNYZ.js +14 -0
- package/dist/{workspace-UIUTHZTD.js → workspace-6E6OSRNU.js} +4 -4
- package/package.json +1 -1
- package/platform-ui/dist/assets/DocsSection-ByAgPzWV.js +1 -0
- package/platform-ui/dist/assets/DocsSection-CjdO6R-u.css +1 -0
- package/platform-ui/dist/assets/{GitSection-BD3Ze06e.js → GitSection-BLovj9yT.js} +1 -1
- package/platform-ui/dist/assets/{GraphSection-SglITfSs.js → GraphSection-C5PCPUFl.js} +1 -1
- package/platform-ui/dist/assets/{LoreSection-bR5Km4Fd.js → LoreSection-BftejTla.js} +1 -1
- package/platform-ui/dist/assets/{SentinelSection-QSpAZArG.js → SentinelSection-CnYcasN7.js} +1 -1
- package/platform-ui/dist/assets/{SymphonySection-CobYJgvg.js → SymphonySection-BpmqCHeK.js} +1 -1
- package/platform-ui/dist/assets/{index-DbxeSMkV.js → index-G9JnWEs_.js} +10 -10
- package/platform-ui/dist/index.html +1 -1
- package/dist/dist-PSF5CP4I.js +0 -7294
|
@@ -10,11 +10,10 @@ import * as path6 from "path";
|
|
|
10
10
|
// src/core/ide-adapters/cursor.ts
|
|
11
11
|
import * as fs from "fs";
|
|
12
12
|
import * as path from "path";
|
|
13
|
-
import * as
|
|
13
|
+
import * as os from "os";
|
|
14
14
|
import * as yaml from "js-yaml";
|
|
15
15
|
|
|
16
16
|
// src/core/ide-adapters/base.ts
|
|
17
|
-
import * as os from "os";
|
|
18
17
|
function generateHeader(projectName, ideName) {
|
|
19
18
|
const lines = [];
|
|
20
19
|
lines.push(`# ${projectName} - Paradigm Context`);
|
|
@@ -218,43 +217,6 @@ function generateNavigationSection(_config) {
|
|
|
218
217
|
lines.push("");
|
|
219
218
|
return lines.join("\n");
|
|
220
219
|
}
|
|
221
|
-
function generateTerminalGuidance() {
|
|
222
|
-
const platform3 = os.platform();
|
|
223
|
-
const isWindows = platform3 === "win32";
|
|
224
|
-
const lines = [];
|
|
225
|
-
lines.push("## Terminal Syntax");
|
|
226
|
-
lines.push("");
|
|
227
|
-
if (isWindows) {
|
|
228
|
-
lines.push("This project runs on **Windows**. Use appropriate syntax:");
|
|
229
|
-
lines.push("");
|
|
230
|
-
lines.push("| Operation | Windows Syntax |");
|
|
231
|
-
lines.push("|-----------|----------------|");
|
|
232
|
-
lines.push("| Chain commands | `cmd1 ; cmd2` or `cmd1 && cmd2` (PowerShell) |");
|
|
233
|
-
lines.push("| Path separator | `\\` (backslash) |");
|
|
234
|
-
lines.push("| Environment vars | `$env:VAR` (PowerShell) or `%VAR%` (CMD) |");
|
|
235
|
-
lines.push("| Null device | `$null` (PowerShell) or `NUL` (CMD) |");
|
|
236
|
-
lines.push("| List files | `dir` or `Get-ChildItem` |");
|
|
237
|
-
lines.push("| Remove files | `del` or `Remove-Item` |");
|
|
238
|
-
lines.push("");
|
|
239
|
-
lines.push("**IMPORTANT:** Do NOT use Unix-style commands like `rm`, `cat`, `grep` directly.");
|
|
240
|
-
} else {
|
|
241
|
-
const osName = platform3 === "darwin" ? "macOS" : "Linux";
|
|
242
|
-
lines.push(`This project runs on **${osName}**. Use appropriate syntax:`);
|
|
243
|
-
lines.push("");
|
|
244
|
-
lines.push("| Operation | Unix Syntax |");
|
|
245
|
-
lines.push("|-----------|-------------|");
|
|
246
|
-
lines.push("| Chain commands | `cmd1 && cmd2` (stop on error) or `cmd1 ; cmd2` (always continue) |");
|
|
247
|
-
lines.push("| Path separator | `/` (forward slash) |");
|
|
248
|
-
lines.push("| Environment vars | `$VAR` or `${VAR}` |");
|
|
249
|
-
lines.push("| Null device | `/dev/null` |");
|
|
250
|
-
lines.push("| List files | `ls` |");
|
|
251
|
-
lines.push("| Remove files | `rm` |");
|
|
252
|
-
lines.push("");
|
|
253
|
-
lines.push("**IMPORTANT:** Do NOT use Windows-style commands like `dir`, `del`, or `%VAR%`.");
|
|
254
|
-
}
|
|
255
|
-
lines.push("");
|
|
256
|
-
return lines.join("\n");
|
|
257
|
-
}
|
|
258
220
|
function generateCommitConvention() {
|
|
259
221
|
const lines = [];
|
|
260
222
|
lines.push("## Commit Messages");
|
|
@@ -362,7 +324,7 @@ function generateHandoffProtocol() {
|
|
|
362
324
|
lines.push("| Usage | Recommendation | Action |");
|
|
363
325
|
lines.push("|-------|----------------|--------|");
|
|
364
326
|
lines.push("| <50% | continue | Keep working |");
|
|
365
|
-
lines.push("| 50-70% | consider-handoff | Plan
|
|
327
|
+
lines.push("| 50-70% | consider-handoff | Plan handoff; prepare summary when ready |");
|
|
366
328
|
lines.push("| 70-85% | handoff-recommended | Prepare handoff soon |");
|
|
367
329
|
lines.push("| >85% | handoff-urgent | Handoff after current task |");
|
|
368
330
|
lines.push("");
|
|
@@ -474,41 +436,6 @@ function generateLlmsTxtSection() {
|
|
|
474
436
|
lines.push("");
|
|
475
437
|
return lines.join("\n");
|
|
476
438
|
}
|
|
477
|
-
function generateWorkspaceSection(files) {
|
|
478
|
-
if (!files.workspace) return "";
|
|
479
|
-
const ws = files.workspace;
|
|
480
|
-
const siblings = ws.members.filter((m) => m.name !== ws.currentMember);
|
|
481
|
-
if (siblings.length === 0) return "";
|
|
482
|
-
const lines = [];
|
|
483
|
-
lines.push(`## Workspace: ${ws.name}`);
|
|
484
|
-
lines.push("");
|
|
485
|
-
lines.push("This project is part of a multi-project workspace.");
|
|
486
|
-
lines.push("");
|
|
487
|
-
lines.push("| Member | Role | Path |");
|
|
488
|
-
lines.push("|--------|------|------|");
|
|
489
|
-
for (const m of ws.members) {
|
|
490
|
-
const tag = m.name === ws.currentMember ? " **(this project)**" : "";
|
|
491
|
-
lines.push(`| ${m.name}${tag} | ${m.role || "-"} | \`${m.path}\` |`);
|
|
492
|
-
}
|
|
493
|
-
lines.push("");
|
|
494
|
-
lines.push("### Cross-Project Tools");
|
|
495
|
-
lines.push("");
|
|
496
|
-
lines.push("Use `includeWorkspace: true` when:");
|
|
497
|
-
lines.push("- Modifying symbols consumed by sibling projects");
|
|
498
|
-
lines.push("- Adding API endpoints or gates that siblings depend on");
|
|
499
|
-
lines.push("- Investigating cross-project impact of changes");
|
|
500
|
-
lines.push("");
|
|
501
|
-
lines.push("| Tool | Workspace Parameter |");
|
|
502
|
-
lines.push("|------|-------------------|");
|
|
503
|
-
lines.push("| `paradigm_search` | `includeWorkspace: true` \u2014 search sibling indices |");
|
|
504
|
-
lines.push("| `paradigm_ripple` | `includeWorkspace: true` \u2014 cross-project impact |");
|
|
505
|
-
lines.push("| `paradigm_gates_for_route` | Automatic \u2014 learns from sibling portal.yaml |");
|
|
506
|
-
lines.push("| `paradigm_workspace_reindex` | Rebuild all member indices |");
|
|
507
|
-
lines.push("");
|
|
508
|
-
lines.push("Cross-project symbols are prefixed: " + siblings.map((s) => `\`${s.name}/#symbol\``).join(", "));
|
|
509
|
-
lines.push("");
|
|
510
|
-
return lines.join("\n");
|
|
511
|
-
}
|
|
512
439
|
function generateFooter() {
|
|
513
440
|
const lines = [];
|
|
514
441
|
lines.push("---");
|
|
@@ -943,7 +870,7 @@ This returns a recommendation: \`continue\`, \`consider-handoff\`, \`handoff-rec
|
|
|
943
870
|
| Usage | Recommendation | Action |
|
|
944
871
|
|-------|----------------|--------|
|
|
945
872
|
| <50% | continue | Keep working |
|
|
946
|
-
| 50-70% | consider-handoff | Plan
|
|
873
|
+
| 50-70% | consider-handoff | Plan handoff; prepare summary when ready |
|
|
947
874
|
| 70-85% | handoff-recommended | Prepare handoff soon |
|
|
948
875
|
| >85% | handoff-urgent | Handoff after current task |
|
|
949
876
|
|
|
@@ -1106,8 +1033,8 @@ If you find yourself doing any of these, STOP:
|
|
|
1106
1033
|
}
|
|
1107
1034
|
}
|
|
1108
1035
|
}
|
|
1109
|
-
const
|
|
1110
|
-
const isWindows =
|
|
1036
|
+
const platform2 = os.platform();
|
|
1037
|
+
const isWindows = platform2 === "win32";
|
|
1111
1038
|
const terminalGuidance = isWindows ? `## Terminal Syntax (Windows)
|
|
1112
1039
|
|
|
1113
1040
|
This project runs on **Windows**. Use appropriate syntax:
|
|
@@ -1121,9 +1048,9 @@ This project runs on **Windows**. Use appropriate syntax:
|
|
|
1121
1048
|
| List files | \`dir\` or \`Get-ChildItem\` |
|
|
1122
1049
|
| Remove files | \`del\` or \`Remove-Item\` |
|
|
1123
1050
|
|
|
1124
|
-
**IMPORTANT:** Do NOT use Unix-style commands like \`rm\`, \`cat\`, \`grep\` directly.` : `## Terminal Syntax (${
|
|
1051
|
+
**IMPORTANT:** Do NOT use Unix-style commands like \`rm\`, \`cat\`, \`grep\` directly.` : `## Terminal Syntax (${platform2 === "darwin" ? "macOS" : "Linux"})
|
|
1125
1052
|
|
|
1126
|
-
This project runs on **${
|
|
1053
|
+
This project runs on **${platform2 === "darwin" ? "macOS" : "Linux"}**. Use appropriate syntax:
|
|
1127
1054
|
|
|
1128
1055
|
| Operation | Unix Syntax |
|
|
1129
1056
|
|-----------|-------------|
|
|
@@ -1736,19 +1663,6 @@ var ClaudeAdapter = class {
|
|
|
1736
1663
|
sections.push(".paradigm/lore/ \u2192 Project timeline and history");
|
|
1737
1664
|
sections.push("```");
|
|
1738
1665
|
sections.push("");
|
|
1739
|
-
sections.push(generateTerminalGuidance());
|
|
1740
|
-
sections.push("## Agent Onboarding");
|
|
1741
|
-
sections.push("");
|
|
1742
|
-
sections.push("**First Session:**");
|
|
1743
|
-
sections.push("1. Call `paradigm_status` for project overview");
|
|
1744
|
-
sections.push("2. Read `.paradigm/config.yaml` for conventions");
|
|
1745
|
-
sections.push("3. Check if `portal.yaml` exists (for auth gates)");
|
|
1746
|
-
sections.push("");
|
|
1747
|
-
sections.push("**Before Each Task:**");
|
|
1748
|
-
sections.push("1. `paradigm_wisdom_context` for symbols you'll modify");
|
|
1749
|
-
sections.push("2. `paradigm_ripple` to check impact");
|
|
1750
|
-
sections.push("3. `paradigm_history_fragility` for stability warnings");
|
|
1751
|
-
sections.push("");
|
|
1752
1666
|
sections.push("## Symbol System");
|
|
1753
1667
|
sections.push("");
|
|
1754
1668
|
sections.push("Use these prefixes in documentation and commits:");
|
|
@@ -1763,197 +1677,86 @@ var ClaudeAdapter = class {
|
|
|
1763
1677
|
}
|
|
1764
1678
|
}
|
|
1765
1679
|
sections.push("");
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
sections.push(
|
|
1771
|
-
sections.push("
|
|
1772
|
-
sections.push('3. **Locate:** Use `paradigm_navigate` with "context" intent for your task');
|
|
1773
|
-
sections.push("4. **Review:** Read the nearest `.purpose` file before making changes");
|
|
1774
|
-
sections.push("5. **Check:** Call `paradigm_gates_for_route` before adding API endpoints");
|
|
1775
|
-
sections.push("");
|
|
1776
|
-
sections.push("## Before Implementing (Every Task)");
|
|
1777
|
-
sections.push("");
|
|
1778
|
-
sections.push("1. **Is this task complex?** (3+ files, security + implementation, multiple features)");
|
|
1779
|
-
sections.push(' \u2192 Call `paradigm_orchestrate_inline` with mode="plan" BEFORE writing code');
|
|
1780
|
-
sections.push("2. **Does it affect existing symbols?** \u2192 Call `paradigm_ripple`");
|
|
1781
|
-
sections.push("3. **Does it add API endpoints?** \u2192 Call `paradigm_gates_for_route`");
|
|
1782
|
-
sections.push("");
|
|
1783
|
-
sections.push("## Portal Protocol (Authorization)");
|
|
1784
|
-
sections.push("");
|
|
1785
|
-
sections.push("**Portal.yaml is REQUIRED when the project has protected routes.**");
|
|
1786
|
-
sections.push("");
|
|
1787
|
-
sections.push("### When to Create portal.yaml");
|
|
1788
|
-
sections.push("");
|
|
1789
|
-
sections.push("Create `portal.yaml` in project root when:");
|
|
1790
|
-
sections.push("- Adding any endpoint that requires authentication");
|
|
1791
|
-
sections.push("- Adding role-based access (admin, member, owner)");
|
|
1792
|
-
sections.push("- Adding resource ownership checks (user can only edit their own data)");
|
|
1793
|
-
sections.push("");
|
|
1794
|
-
sections.push("### Portal.yaml Structure");
|
|
1795
|
-
sections.push("");
|
|
1796
|
-
sections.push("```yaml");
|
|
1797
|
-
sections.push('version: "1.0"');
|
|
1798
|
-
sections.push("gates:");
|
|
1799
|
-
sections.push(" ^authenticated:");
|
|
1800
|
-
sections.push(" description: User must be logged in");
|
|
1801
|
-
sections.push(" check: req.user != null");
|
|
1802
|
-
sections.push(" ^project-admin:");
|
|
1803
|
-
sections.push(" description: User must be admin of the project");
|
|
1804
|
-
sections.push(" check: project.admins.includes(req.user.id)");
|
|
1805
|
-
sections.push(" ^comment-author:");
|
|
1806
|
-
sections.push(" description: User must be the comment author");
|
|
1807
|
-
sections.push(" check: comment.authorId === req.user.id");
|
|
1808
|
-
sections.push("");
|
|
1809
|
-
sections.push("routes:");
|
|
1810
|
-
sections.push(' "GET /api/projects/:id": [^authenticated, ^project-member]');
|
|
1811
|
-
sections.push(' "PUT /api/projects/:id": [^authenticated, ^project-admin]');
|
|
1812
|
-
sections.push(' "DELETE /api/comments/:id": [^authenticated, ^comment-author]');
|
|
1813
|
-
sections.push("```");
|
|
1814
|
-
sections.push("");
|
|
1815
|
-
sections.push("### When Adding New Endpoints");
|
|
1816
|
-
sections.push("");
|
|
1817
|
-
sections.push("**ALWAYS update portal.yaml when adding routes:**");
|
|
1818
|
-
sections.push("");
|
|
1819
|
-
sections.push("1. Call `paradigm_gates_for_route` to get suggestions");
|
|
1820
|
-
sections.push("2. Add the route to portal.yaml with required gates");
|
|
1821
|
-
sections.push("3. Implement the gate checks in your middleware/code");
|
|
1822
|
-
sections.push("4. Test that unauthorized access returns 403");
|
|
1823
|
-
sections.push("");
|
|
1824
|
-
sections.push("### Common Gate Patterns");
|
|
1825
|
-
sections.push("");
|
|
1826
|
-
sections.push("| Pattern | Gate Name | Description |");
|
|
1827
|
-
sections.push("|---------|-----------|-------------|");
|
|
1828
|
-
sections.push("| Any logged-in user | `^authenticated` | Basic auth check |");
|
|
1829
|
-
sections.push("| Resource membership | `^{resource}-member` | User is member of resource |");
|
|
1830
|
-
sections.push("| Resource admin | `^{resource}-admin` | User is admin of resource |");
|
|
1831
|
-
sections.push("| Resource owner | `^{resource}-owner` | User owns the resource |");
|
|
1832
|
-
sections.push("| Author only | `^{resource}-author` | User created the resource |");
|
|
1833
|
-
sections.push("");
|
|
1834
|
-
sections.push("## Context Discovery");
|
|
1835
|
-
sections.push("");
|
|
1836
|
-
sections.push("**Before making changes:**");
|
|
1837
|
-
sections.push("");
|
|
1838
|
-
sections.push("1. Check `.paradigm/config.yaml` for project configuration");
|
|
1839
|
-
sections.push("2. Read the `.purpose` file in the directory you're modifying");
|
|
1840
|
-
sections.push("3. Check `portal.yaml` for existing auth gates");
|
|
1841
|
-
sections.push("4. Check `.paradigm/docs/patterns.md` for coding patterns");
|
|
1842
|
-
sections.push("");
|
|
1843
|
-
sections.push("## Lore (Project Timeline)");
|
|
1844
|
-
sections.push("");
|
|
1845
|
-
sections.push("Lore records what happened, why, and what was learned \u2014 forming a queryable project history.");
|
|
1846
|
-
sections.push("");
|
|
1847
|
-
sections.push("### MCP Tools");
|
|
1848
|
-
sections.push("");
|
|
1849
|
-
sections.push("| Tool | Purpose |");
|
|
1850
|
-
sections.push("|------|---------|");
|
|
1851
|
-
sections.push("| `paradigm_lore_search` | Search and filter lore entries by author, symbol, date, type |");
|
|
1852
|
-
sections.push("| `paradigm_lore_record` | Record a new lore entry (session, decision, milestone, etc.) |");
|
|
1853
|
-
sections.push("| `paradigm_lore_timeline` | Get project timeline summary with entry count and authors |");
|
|
1854
|
-
sections.push("");
|
|
1855
|
-
sections.push("### CLI Commands");
|
|
1856
|
-
sections.push("");
|
|
1857
|
-
sections.push("| Command | Description |");
|
|
1858
|
-
sections.push("|---------|-------------|");
|
|
1859
|
-
sections.push("| `paradigm lore` | List recent lore entries |");
|
|
1860
|
-
sections.push("| `paradigm lore record` | Interactively record a new entry |");
|
|
1861
|
-
sections.push("| `paradigm lore show <id>` | Show full details of an entry |");
|
|
1862
|
-
sections.push("| `paradigm lore review <id>` | Add human review to an entry |");
|
|
1863
|
-
sections.push("| `paradigm lore timeline` | Show project timeline summary |");
|
|
1864
|
-
sections.push("");
|
|
1865
|
-
sections.push("### When to Record Lore");
|
|
1866
|
-
sections.push("");
|
|
1867
|
-
sections.push("- After completing a feature or significant session");
|
|
1868
|
-
sections.push("- When making architectural decisions");
|
|
1869
|
-
sections.push("- After resolving incidents or bugs");
|
|
1870
|
-
sections.push("- At project milestones");
|
|
1871
|
-
sections.push("");
|
|
1872
|
-
sections.push(generateNavigationSection(config));
|
|
1873
|
-
sections.push("## Context Monitoring Protocol");
|
|
1874
|
-
sections.push("");
|
|
1875
|
-
sections.push("**Periodically check context usage** by calling `paradigm_context_check` (every 10-15 tool calls or when user asks).");
|
|
1876
|
-
sections.push("");
|
|
1877
|
-
sections.push('**When recommendation is NOT "continue":**');
|
|
1878
|
-
sections.push('1. Inform user: "Context usage is at ~X%. Recommend handoff soon."');
|
|
1879
|
-
sections.push("2. Offer to prepare handoff summary");
|
|
1880
|
-
sections.push("3. If urgent (>85%), prioritize completing current task then handoff");
|
|
1881
|
-
sections.push("");
|
|
1882
|
-
sections.push("**To handoff:**");
|
|
1883
|
-
sections.push("1. Call `paradigm_handoff_prepare` with summary and next steps");
|
|
1884
|
-
sections.push('2. User runs: `paradigm team handoff --to <agent> --summary "..."`');
|
|
1885
|
-
sections.push("3. New session accepts with: `paradigm team accept <id>`");
|
|
1886
|
-
sections.push("");
|
|
1887
|
-
sections.push(generateCheckpointProtocol());
|
|
1888
|
-
sections.push("## MCP Workflow Protocol");
|
|
1680
|
+
const conventionsSection = generateConventions(config);
|
|
1681
|
+
if (conventionsSection) {
|
|
1682
|
+
sections.push(conventionsSection);
|
|
1683
|
+
}
|
|
1684
|
+
sections.push(generateCommitConvention());
|
|
1685
|
+
sections.push("## Agent Onboarding");
|
|
1889
1686
|
sections.push("");
|
|
1890
|
-
sections.push("**
|
|
1687
|
+
sections.push("**First session:** Call `paradigm_status` \u2192 read `.paradigm/config.yaml` \u2192 check `portal.yaml`");
|
|
1891
1688
|
sections.push("");
|
|
1892
|
-
sections.push("
|
|
1893
|
-
sections.push("|---------------------|----------------|");
|
|
1894
|
-
sections.push("| Modifying a symbol | `paradigm_ripple` with the symbol |");
|
|
1895
|
-
sections.push("| Understanding code | `paradigm_navigate` with explore intent |");
|
|
1896
|
-
sections.push("| Checking dependencies | `paradigm_related` for connections |");
|
|
1897
|
-
sections.push("| Getting oriented | `paradigm_status` for project overview |");
|
|
1898
|
-
sections.push("| **Adding API endpoint** | `paradigm_gates_for_route` for auth gates |");
|
|
1899
|
-
sections.push("| **Validating changes** | `paradigm_flows_affected` for flow impact |");
|
|
1900
|
-
sections.push("| **Getting test data** | `paradigm_test_fixtures` for fixtures |");
|
|
1901
|
-
sections.push('| **Building a feature (3+ files)** | `paradigm_orchestrate_inline` mode="plan" |');
|
|
1902
|
-
sections.push('| **Task involves security + code** | `paradigm_orchestrate_inline` mode="plan" |');
|
|
1903
|
-
sections.push("| **Recording work done** | `paradigm_lore_record` to capture session history |");
|
|
1904
|
-
sections.push("| **Checking project history** | `paradigm_lore_timeline` for timeline overview |");
|
|
1905
|
-
sections.push("| **Finishing work session** | `paradigm_reindex` to rebuild static index |");
|
|
1689
|
+
sections.push("**Before each task:** `paradigm_ripple` for impact, `paradigm_gates_for_route` for new endpoints");
|
|
1906
1690
|
sections.push("");
|
|
1907
|
-
sections.push("**
|
|
1691
|
+
sections.push("**Resuming:** Call `paradigm_session_recover`");
|
|
1908
1692
|
sections.push("");
|
|
1909
|
-
sections.push("
|
|
1910
|
-
sections.push("1. Adding endpoint? \u2192 Call `paradigm_gates_for_route`");
|
|
1911
|
-
sections.push("2. Get suggested gates \u2192 Add them to `portal.yaml`");
|
|
1912
|
-
sections.push("3. Implement gate checks \u2192 Test 403 responses");
|
|
1693
|
+
sections.push("## Before Implementing");
|
|
1913
1694
|
sections.push("");
|
|
1914
|
-
sections.push("
|
|
1695
|
+
sections.push("0. Call `paradigm_protocol_search` \u2014 if a protocol matches, follow it");
|
|
1696
|
+
sections.push('1. Complex task (3+ files)? \u2192 `paradigm_orchestrate_inline` mode="plan"');
|
|
1697
|
+
sections.push("2. Affects symbols? \u2192 `paradigm_ripple`");
|
|
1698
|
+
sections.push("3. Adds endpoints? \u2192 `paradigm_gates_for_route`");
|
|
1915
1699
|
sections.push("");
|
|
1916
|
-
sections.push("
|
|
1917
|
-
sections.push("|-----------|---------------|----------|");
|
|
1918
|
-
sections.push("| `paradigm_status` | ~100 | Starting a session |");
|
|
1919
|
-
sections.push("| `paradigm_search` | ~150 | Looking for symbols |");
|
|
1920
|
-
sections.push("| `paradigm_navigate` | ~200 | Finding code locations |");
|
|
1921
|
-
sections.push("| `paradigm_ripple` | ~300 | Before modifying symbols |");
|
|
1922
|
-
sections.push("| `paradigm_gates_for_route` | ~150 | Adding API endpoints |");
|
|
1923
|
-
sections.push("| File read (small) | ~500 | Need exact code |");
|
|
1924
|
-
sections.push("| File read (large) | ~2000+ | Avoid if possible |");
|
|
1925
|
-
sections.push("| Full .purpose + config | ~1500 | Initial orientation |");
|
|
1700
|
+
sections.push("## Automatic Enforcement (Hooks)");
|
|
1926
1701
|
sections.push("");
|
|
1927
|
-
sections.push("
|
|
1702
|
+
sections.push("The stop hook **BLOCKS** if source files were modified without .purpose updates.");
|
|
1928
1703
|
sections.push("");
|
|
1929
|
-
sections.push("
|
|
1704
|
+
sections.push("| Hook | Behavior |");
|
|
1705
|
+
sections.push("|------|----------|");
|
|
1706
|
+
sections.push("| **Stop** | Blocks on: missing .purpose, missing portal.yaml gates, aspect drift, stale purposes |");
|
|
1707
|
+
sections.push("| **Pre-commit** | Auto-rebuilds index \u2014 never blocks |");
|
|
1708
|
+
sections.push("| **Post-write** | Advisory reminder for .purpose coverage |");
|
|
1930
1709
|
sections.push("");
|
|
1931
|
-
sections.push("
|
|
1932
|
-
sections.push("|------|---------|---------------|");
|
|
1933
|
-
sections.push("| Find symbol | `paradigm_navigate` | Never |");
|
|
1934
|
-
sections.push("| Check impact | `paradigm_ripple` | Never |");
|
|
1935
|
-
sections.push("| Read implementation | MCP first | Then specific file |");
|
|
1936
|
-
sections.push("| Write code | N/A | Existing patterns |");
|
|
1937
|
-
sections.push("| Check team wisdom | `paradigm_wisdom_context` | Never |");
|
|
1710
|
+
sections.push("**If blocked:** Update .purpose files \u2192 update portal.yaml if needed \u2192 `paradigm_reindex` \u2192 finish");
|
|
1938
1711
|
sections.push("");
|
|
1939
|
-
sections.push("
|
|
1712
|
+
sections.push("## Maintaining Paradigm Files");
|
|
1940
1713
|
sections.push("");
|
|
1941
|
-
sections.push("
|
|
1714
|
+
sections.push("**You MUST update Paradigm files when making code changes:**");
|
|
1942
1715
|
sections.push("");
|
|
1943
|
-
sections.push("
|
|
1716
|
+
sections.push("- Add feature \u2192 create `.purpose` in directory");
|
|
1717
|
+
sections.push("- Add protected route \u2192 update `portal.yaml` with gates");
|
|
1718
|
+
sections.push("- Add signal/event \u2192 add to `.purpose`");
|
|
1719
|
+
sections.push("- Add multi-step flow \u2192 document as `$flow`");
|
|
1720
|
+
sections.push("- Rename/delete symbol \u2192 update all references");
|
|
1721
|
+
sections.push("- Record lore via `paradigm_lore_record` for sessions modifying 3+ files");
|
|
1722
|
+
sections.push("- Use Paradigm logger (`log.component()`, `log.gate()`, etc.) \u2014 never raw console.log");
|
|
1944
1723
|
sections.push("");
|
|
1945
|
-
sections.push("
|
|
1946
|
-
sections.push("|----------|-----|---------|");
|
|
1947
|
-
sections.push("| Prompts | `paradigm://prompts` | Task templates (add-feature, refactor, etc.) |");
|
|
1948
|
-
sections.push("| Commands | `paradigm://docs/commands` | CLI command reference |");
|
|
1949
|
-
sections.push("| Queries | `paradigm://docs/queries` | jq query examples |");
|
|
1950
|
-
sections.push("| Disciplines | `paradigm://specs/disciplines` | Symbol mappings by domain |");
|
|
1951
|
-
sections.push("| Scan | `paradigm://specs/scan` | Visual discovery protocol |");
|
|
1724
|
+
sections.push("**Auth requires portal.yaml** if your code has JWT, role checks, ownership checks, or protected endpoints.");
|
|
1952
1725
|
sections.push("");
|
|
1953
|
-
sections.push("
|
|
1726
|
+
sections.push("## On-Demand Guidance");
|
|
1954
1727
|
sections.push("");
|
|
1955
|
-
sections.push("
|
|
1728
|
+
sections.push("Detailed guidance is available via MCP resources \u2014 load only what you need:");
|
|
1956
1729
|
sections.push("");
|
|
1730
|
+
sections.push("| Topic | Resource |");
|
|
1731
|
+
sections.push("|-------|----------|");
|
|
1732
|
+
sections.push("| Logging rules & directory mapping | `paradigm://guidance/logging` |");
|
|
1733
|
+
sections.push("| Portal protocol & gate patterns | `paradigm://guidance/portal` |");
|
|
1734
|
+
sections.push("| MCP workflow & token budgets | `paradigm://guidance/mcp-workflow` |");
|
|
1735
|
+
sections.push("| Flow-first development | `paradigm://guidance/flows` |");
|
|
1736
|
+
sections.push("| Multi-agent orchestration | `paradigm://guidance/orchestration` |");
|
|
1737
|
+
sections.push("| Workspaces (multi-project) | `paradigm://guidance/workspaces` |");
|
|
1738
|
+
sections.push("| University (knowledge base) | `paradigm://guidance/university` |");
|
|
1739
|
+
sections.push("| Confidence calibration | `paradigm://guidance/calibration` |");
|
|
1740
|
+
sections.push("| Session checkpoints | `paradigm://guidance/checkpoints` |");
|
|
1741
|
+
sections.push("| Navigation & task recipes | `paradigm://guidance/navigation` |");
|
|
1742
|
+
sections.push("| Component types & hierarchy | `paradigm://guidance/component-types` |");
|
|
1743
|
+
sections.push("| Troubleshooting | `paradigm://guidance/troubleshooting` |");
|
|
1744
|
+
sections.push("");
|
|
1745
|
+
if (files.agents?.length) {
|
|
1746
|
+
const highPriority = files.agents.flatMap(
|
|
1747
|
+
(a) => (a.context?.contributions || []).filter((c) => c.priority === "high" && c.content).map((c) => ({ agent: a.id, section: c.section, content: c.content }))
|
|
1748
|
+
);
|
|
1749
|
+
if (highPriority.length > 0) {
|
|
1750
|
+
sections.push("## Agent Contributions");
|
|
1751
|
+
sections.push("");
|
|
1752
|
+
for (const contrib of highPriority) {
|
|
1753
|
+
sections.push(`### ${contrib.section} (${contrib.agent})`);
|
|
1754
|
+
sections.push("");
|
|
1755
|
+
sections.push(contrib.content);
|
|
1756
|
+
sections.push("");
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1957
1760
|
if (config["purpose-required"]?.length) {
|
|
1958
1761
|
sections.push("## Directory Structure");
|
|
1959
1762
|
sections.push("");
|
|
@@ -1963,176 +1766,9 @@ var ClaudeAdapter = class {
|
|
|
1963
1766
|
}
|
|
1964
1767
|
sections.push("");
|
|
1965
1768
|
}
|
|
1966
|
-
const loggingSection = generateLoggingRules(config);
|
|
1967
|
-
if (loggingSection) {
|
|
1968
|
-
sections.push(loggingSection);
|
|
1969
|
-
}
|
|
1970
|
-
const conventionsSection = generateConventions(config);
|
|
1971
|
-
if (conventionsSection) {
|
|
1972
|
-
sections.push(conventionsSection);
|
|
1973
|
-
}
|
|
1974
|
-
const updateSection = generateUpdateRules(config);
|
|
1975
|
-
if (updateSection) {
|
|
1976
|
-
sections.push(updateSection);
|
|
1977
|
-
}
|
|
1978
|
-
sections.push("## Multi-Agent Orchestration");
|
|
1979
|
-
sections.push("");
|
|
1980
|
-
sections.push("Paradigm supports multi-agent orchestration via `paradigm team` commands:");
|
|
1981
|
-
sections.push("");
|
|
1982
|
-
sections.push("### Commands");
|
|
1983
|
-
sections.push("");
|
|
1984
|
-
sections.push("| Command | Description |");
|
|
1985
|
-
sections.push("|---------|-------------|");
|
|
1986
|
-
sections.push('| `paradigm team spawn <agent> --task "..."` | Spawn a single agent |');
|
|
1987
|
-
sections.push('| `paradigm team orchestrate "task"` | AI orchestrator coordinates agents |');
|
|
1988
|
-
sections.push('| `paradigm team orchestrate "task" --solo` | Single Claude mode (no splitting) |');
|
|
1989
|
-
sections.push('| `paradigm team orchestrate "task" --compare` | A/B test solo vs faceted |');
|
|
1990
|
-
sections.push('| `paradigm team agents suggest "task"` | Suggest agents based on task triggers |');
|
|
1991
|
-
sections.push("| `paradigm team providers` | Show available providers |");
|
|
1992
|
-
sections.push("| `paradigm team providers --set X` | Set preferred provider |");
|
|
1993
|
-
sections.push("| `paradigm team models` | View/configure agent model assignments |");
|
|
1994
|
-
sections.push("| `paradigm team models --refresh` | Re-discover models from environment |");
|
|
1995
|
-
sections.push("");
|
|
1996
|
-
sections.push("### Agent Suggestions");
|
|
1997
|
-
sections.push("");
|
|
1998
|
-
sections.push("Before orchestrating, you can preview which agents will be involved:");
|
|
1999
|
-
sections.push("");
|
|
2000
|
-
sections.push("```bash");
|
|
2001
|
-
sections.push('paradigm team agents suggest "Add user authentication with JWT"');
|
|
2002
|
-
sections.push("```");
|
|
2003
|
-
sections.push("");
|
|
2004
|
-
sections.push("Or via MCP (returns `suggestedAgents` in plan mode):");
|
|
2005
|
-
sections.push("```");
|
|
2006
|
-
sections.push('paradigm_orchestrate_inline({ task: "...", mode: "plan" })');
|
|
2007
|
-
sections.push("```");
|
|
2008
|
-
sections.push("");
|
|
2009
|
-
const workspaceSection = generateWorkspaceSection(files);
|
|
2010
|
-
if (workspaceSection) {
|
|
2011
|
-
sections.push(workspaceSection);
|
|
2012
|
-
}
|
|
2013
|
-
sections.push("## Flow-First Development");
|
|
2014
|
-
sections.push("");
|
|
2015
|
-
sections.push("**Define flows BEFORE implementing features that span multiple steps.**");
|
|
2016
|
-
sections.push("");
|
|
2017
|
-
sections.push("### When to Define Flows");
|
|
2018
|
-
sections.push("");
|
|
2019
|
-
sections.push("Create a flow ($symbol) when your feature:");
|
|
2020
|
-
sections.push("- Has multiple authorization gates");
|
|
2021
|
-
sections.push("- Spans multiple components or services");
|
|
2022
|
-
sections.push("- Emits events that trigger other actions");
|
|
2023
|
-
sections.push('- Needs clear documentation of the "happy path"');
|
|
2024
|
-
sections.push("");
|
|
2025
|
-
sections.push("### Flow Definition");
|
|
2026
|
-
sections.push("");
|
|
2027
|
-
sections.push("Define flows in `.paradigm/flows.yaml`:");
|
|
2028
|
-
sections.push("");
|
|
2029
|
-
sections.push("```yaml");
|
|
2030
|
-
sections.push('version: "1.0"');
|
|
2031
|
-
sections.push("flows:");
|
|
2032
|
-
sections.push(" $task-creation:");
|
|
2033
|
-
sections.push(" name: Task Creation Flow");
|
|
2034
|
-
sections.push(' trigger: "POST /api/tasks"');
|
|
2035
|
-
sections.push(" steps:");
|
|
2036
|
-
sections.push(" - type: gate");
|
|
2037
|
-
sections.push(" symbol: ^authenticated");
|
|
2038
|
-
sections.push(" - type: gate");
|
|
2039
|
-
sections.push(" symbol: ^project-member");
|
|
2040
|
-
sections.push(" - type: action");
|
|
2041
|
-
sections.push(' symbol: "#create-task"');
|
|
2042
|
-
sections.push(" - type: signal");
|
|
2043
|
-
sections.push(' symbol: "!task-created"');
|
|
2044
|
-
sections.push(' successSignal: "!task-created"');
|
|
2045
|
-
sections.push("```");
|
|
2046
|
-
sections.push("");
|
|
2047
|
-
sections.push("### Flow-First Protocol");
|
|
2048
|
-
sections.push("");
|
|
2049
|
-
sections.push("1. **Define the flow first** - What gates, actions, and signals?");
|
|
2050
|
-
sections.push("2. **Validate** - Call `paradigm_flow_validate` to check completeness");
|
|
2051
|
-
sections.push("3. **Implement** - Each step becomes a clear implementation target");
|
|
2052
|
-
sections.push("");
|
|
2053
|
-
sections.push("## Flow Validation");
|
|
2054
|
-
sections.push("");
|
|
2055
|
-
sections.push("**Validate flows before and after implementing:**");
|
|
2056
|
-
sections.push("");
|
|
2057
|
-
sections.push("```");
|
|
2058
|
-
sections.push("# Validate specific flow");
|
|
2059
|
-
sections.push('paradigm_flow_validate({ flowId: "$task-creation" })');
|
|
2060
|
-
sections.push("");
|
|
2061
|
-
sections.push("# Validate all flows");
|
|
2062
|
-
sections.push("paradigm_flow_validate({})");
|
|
2063
|
-
sections.push("");
|
|
2064
|
-
sections.push("# Deep check (verify implementation exists)");
|
|
2065
|
-
sections.push("paradigm_flow_validate({ checkImplementation: true })");
|
|
2066
|
-
sections.push("```");
|
|
2067
|
-
sections.push("");
|
|
2068
|
-
sections.push("**After modifying symbols, check affected flows:**");
|
|
2069
|
-
sections.push("");
|
|
2070
|
-
sections.push("```");
|
|
2071
|
-
sections.push("# Check what flows are affected by #tasks");
|
|
2072
|
-
sections.push('paradigm_flows_affected({ symbol: "#tasks" })');
|
|
2073
|
-
sections.push("```");
|
|
2074
|
-
sections.push("");
|
|
2075
|
-
sections.push(generateCommitConvention());
|
|
2076
|
-
sections.push("## Automatic Enforcement (Claude Code Hooks)");
|
|
2077
|
-
sections.push("");
|
|
2078
|
-
sections.push("This project uses Claude Code hooks for paradigm compliance. These are installed");
|
|
2079
|
-
sections.push("automatically via `paradigm shift` or `paradigm hooks install`.");
|
|
2080
|
-
sections.push("");
|
|
2081
|
-
sections.push("| Hook | Type | Behavior |");
|
|
2082
|
-
sections.push("|------|------|----------|");
|
|
2083
|
-
sections.push("| **Stop hook** | Stop | **BLOCKS** you from finishing if source files were modified without .purpose updates |");
|
|
2084
|
-
sections.push("| **Pre-commit hook** | PreToolUse (Bash) | Auto-rebuilds index before `git commit` \u2014 never blocks |");
|
|
2085
|
-
sections.push("| **Post-write hook** | PostToolUse (Edit/Write) | Advisory reminder when editing files without .purpose coverage |");
|
|
2086
|
-
sections.push("");
|
|
2087
|
-
sections.push("**If the Stop hook blocks you:**");
|
|
2088
|
-
sections.push("1. Update the nearest `.purpose` file for each modified code area");
|
|
2089
|
-
sections.push("2. Update `portal.yaml` if you added routes or gates");
|
|
2090
|
-
sections.push("3. Call `paradigm_reindex` to rebuild the static index");
|
|
2091
|
-
sections.push("4. Then finish your session");
|
|
2092
|
-
sections.push("");
|
|
2093
|
-
sections.push("## Troubleshooting");
|
|
2094
|
-
sections.push("");
|
|
2095
|
-
sections.push("| Issue | Solution |");
|
|
2096
|
-
sections.push("|-------|----------|");
|
|
2097
|
-
sections.push('| "Symbol not found" | Run `paradigm scan` to rebuild index |');
|
|
2098
|
-
sections.push('| "Navigator not found" | Run `paradigm scan` to generate navigator.yaml |');
|
|
2099
|
-
sections.push("| Empty search results | Check that .purpose files define symbols |");
|
|
2100
|
-
sections.push("| High context usage | Call `paradigm_handoff_prepare` |");
|
|
2101
|
-
sections.push("| Gate suggestions missing | Check that portal.yaml exists and defines gates |");
|
|
2102
|
-
sections.push('| "Flow index not found" | Run `paradigm scan` and add flows to .purpose files |');
|
|
2103
|
-
sections.push('| "Fixtures not found" | Create `.paradigm/fixtures.yaml` with test data |');
|
|
2104
|
-
sections.push("");
|
|
2105
|
-
sections.push("## Maintaining Paradigm Files");
|
|
2106
|
-
sections.push("");
|
|
2107
|
-
sections.push("**You MUST update Paradigm files when making code changes. The Stop hook will block you if you don't:**");
|
|
2108
|
-
sections.push("");
|
|
2109
|
-
sections.push("| Change Type | Action Required |");
|
|
2110
|
-
sections.push("|-------------|-----------------|");
|
|
2111
|
-
sections.push("| Add feature | Create `.purpose` in feature directory |");
|
|
2112
|
-
sections.push("| Add ANY protected route | Create/update `portal.yaml` with gates |");
|
|
2113
|
-
sections.push("| Add ownership check | Add `^{resource}-owner` gate to `portal.yaml` |");
|
|
2114
|
-
sections.push("| Add role-based access | Add `^{role}` gate to `portal.yaml` |");
|
|
2115
|
-
sections.push("| Add signal/event | Add to emitting feature's `.purpose` |");
|
|
2116
|
-
sections.push("| Add multi-step flow | Document as `$flow` in `.purpose` |");
|
|
2117
|
-
sections.push("| Rename/delete symbol | Update all `.purpose` references |");
|
|
2118
|
-
sections.push("| Learn antipattern | Add to `.paradigm/wisdom/antipatterns.yaml` |");
|
|
2119
|
-
sections.push("| Complete feature/session | Record lore entry via `paradigm_lore_record` |");
|
|
2120
|
-
sections.push("");
|
|
2121
|
-
sections.push("**CRITICAL: Authorization requires portal.yaml**");
|
|
2122
|
-
sections.push("");
|
|
2123
|
-
sections.push("If your code has ANY of these, `portal.yaml` MUST exist:");
|
|
2124
|
-
sections.push("- JWT/session authentication");
|
|
2125
|
-
sections.push("- Role checks (admin, member, etc.)");
|
|
2126
|
-
sections.push("- Ownership checks (user can only edit own resources)");
|
|
2127
|
-
sections.push("- Protected API endpoints");
|
|
2128
|
-
sections.push("");
|
|
2129
|
-
sections.push("**Validation**: Run `paradigm doctor` to check for inconsistencies.");
|
|
2130
|
-
sections.push("");
|
|
2131
|
-
sections.push("See `.paradigm/docs/ai-maintenance-protocol.md` for detailed guidance.");
|
|
2132
|
-
sections.push("");
|
|
2133
1769
|
sections.push("---");
|
|
2134
1770
|
sections.push("");
|
|
2135
|
-
sections.push("*See `.
|
|
1771
|
+
sections.push("*See `.paradigm/specs/` for specifications. Run `paradigm sync` to regenerate.*");
|
|
2136
1772
|
return sections.filter((s) => s !== void 0).join("\n");
|
|
2137
1773
|
}
|
|
2138
1774
|
/**
|
|
@@ -2368,6 +2004,30 @@ function loadParadigmFiles(rootDir) {
|
|
|
2368
2004
|
}
|
|
2369
2005
|
}
|
|
2370
2006
|
}
|
|
2007
|
+
let agents = void 0;
|
|
2008
|
+
const agentsDir = path6.join(rootDir, ".paradigm", "agents");
|
|
2009
|
+
if (fs6.existsSync(agentsDir)) {
|
|
2010
|
+
try {
|
|
2011
|
+
const agentFiles = fs6.readdirSync(agentsDir).filter((f) => f.endsWith(".agent"));
|
|
2012
|
+
const loaded = [];
|
|
2013
|
+
for (const file of agentFiles) {
|
|
2014
|
+
try {
|
|
2015
|
+
const content = fs6.readFileSync(path6.join(agentsDir, file), "utf8");
|
|
2016
|
+
const profile = yaml2.load(content);
|
|
2017
|
+
if (profile?.id) {
|
|
2018
|
+
loaded.push({
|
|
2019
|
+
id: profile.id,
|
|
2020
|
+
role: profile.role,
|
|
2021
|
+
context: profile.context
|
|
2022
|
+
});
|
|
2023
|
+
}
|
|
2024
|
+
} catch {
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
if (loaded.length > 0) agents = loaded;
|
|
2028
|
+
} catch {
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2371
2031
|
let workspace = void 0;
|
|
2372
2032
|
const rawConfig = yaml2.load(fs6.readFileSync(configPath, "utf8"));
|
|
2373
2033
|
const wsField = rawConfig.workspace;
|
|
@@ -2394,7 +2054,8 @@ function loadParadigmFiles(rootDir) {
|
|
|
2394
2054
|
specs,
|
|
2395
2055
|
docs,
|
|
2396
2056
|
projectName: path6.basename(rootDir),
|
|
2397
|
-
workspace
|
|
2057
|
+
workspace,
|
|
2058
|
+
agents
|
|
2398
2059
|
};
|
|
2399
2060
|
}
|
|
2400
2061
|
function syncToIDE(rootDir, ideName, files, force = false) {
|