@a-company/paradigm 3.24.1 → 3.25.2
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-AAYFKS74.js → accept-orchestration-6EM5EHXA.js} +4 -4
- package/dist/{auto-B22FVSQI.js → auto-24ICVUH4.js} +1 -1
- package/dist/{chunk-EZ6XW6FB.js → chunk-7IJ5JVKT.js} +1 -1
- package/dist/{chunk-6EQRU7WC.js → chunk-J26YQVAK.js} +1 -1
- package/dist/{chunk-VHSTF72C.js → chunk-N6RNYCZD.js} +1 -1
- package/dist/{chunk-XKI55IFI.js → chunk-SCC77UUP.js} +82 -62
- package/dist/chunk-UPLDI7CN.js +1334 -0
- package/dist/{chunk-GC6X3YM7.js → chunk-ZOH24ZPF.js} +5 -5
- package/dist/{diff-QC7PWIPF.js → diff-AH7L4PRQ.js} +4 -4
- package/dist/discipline-5F5OVTXB.js +24 -0
- package/dist/{doctor-RVODPMHJ.js → doctor-INBOLZC7.js} +1 -1
- package/dist/index.js +53 -25
- package/dist/{list-CAL7KS7B.js → list-QTFWN35D.js} +3 -2
- package/dist/mcp.js +4 -3
- package/dist/{orchestrate-NNNWNELP.js → orchestrate-HMSQ2CED.js} +4 -4
- package/dist/{providers-NKGY36QF.js → providers-YW3FG6DA.js} +1 -1
- package/dist/{reindex-CMZARW5K.js → reindex-YG3KIXAK.js} +1 -1
- package/dist/{shift-R6TQ6MBP.js → shift-DRF5M3G6.js} +23 -17
- package/dist/{spawn-52PASJJL.js → spawn-DIY7T4QW.js} +2 -2
- package/dist/{team-JZHIH7H5.js → team-YOGT2Q2X.js} +5 -5
- package/dist/{timeline-B6TMGWRU.js → timeline-RKXNRMKF.js} +4 -3
- package/dist/university-content/courses/.purpose +4 -4
- package/dist/university-content/courses/para-101.json +1 -1
- package/dist/university-content/courses/para-201.json +18 -2
- package/dist/university-content/plsat/.purpose +18 -0
- package/dist/university-content/plsat/v3.0.json +105 -0
- package/package.json +1 -1
- package/templates/paradigm/config.yaml +1 -0
- package/dist/chunk-CHSHON3O.js +0 -669
- package/dist/{chunk-7WTOOH23.js → chunk-5SXMV4SP.js} +0 -0
- package/dist/{chunk-4UC6AQOC.js → chunk-C5ZE6WEX.js} +0 -0
- package/dist/{flow-KZKMMXJC.js → flow-UFMPVOEM.js} +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
BackgroundOrchestrator
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZOH24ZPF.js";
|
|
5
5
|
import "./chunk-6QC3YGB6.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-J26YQVAK.js";
|
|
7
7
|
import "./chunk-PBHIFAL4.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-5SXMV4SP.js";
|
|
9
9
|
import "./chunk-PMXRGPRQ.js";
|
|
10
|
+
import "./chunk-MW5DMGBB.js";
|
|
10
11
|
import "./chunk-5JGJACDU.js";
|
|
11
12
|
import "./chunk-6P4IFIK2.js";
|
|
12
13
|
import "./chunk-MRENOFTR.js";
|
|
13
14
|
import "./chunk-IRKUEJVW.js";
|
|
14
|
-
import "./chunk-MW5DMGBB.js";
|
|
15
15
|
import "./chunk-ZXMDA7VB.js";
|
|
16
16
|
|
|
17
17
|
// src/commands/team/accept-orchestration.ts
|
|
@@ -2779,7 +2779,7 @@ async function buildRecoveryPreamble(rootDir) {
|
|
|
2779
2779
|
return lines.join("\n");
|
|
2780
2780
|
}
|
|
2781
2781
|
|
|
2782
|
-
// ../paradigm-mcp/src/utils/tool-cache.
|
|
2782
|
+
// ../paradigm-mcp/src/utils/tool-cache.js
|
|
2783
2783
|
var ToolCache = class {
|
|
2784
2784
|
cache = /* @__PURE__ */ new Map();
|
|
2785
2785
|
ttlMs;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
detectDiscipline,
|
|
4
|
-
getDisciplineConfig
|
|
5
|
-
} from "./chunk-CHSHON3O.js";
|
|
6
2
|
import {
|
|
7
3
|
indexCommand
|
|
8
4
|
} from "./chunk-W4VFKZVF.js";
|
|
@@ -12,6 +8,13 @@ import {
|
|
|
12
8
|
import {
|
|
13
9
|
getDefaultPurposeContent
|
|
14
10
|
} from "./chunk-MRENOFTR.js";
|
|
11
|
+
import {
|
|
12
|
+
STACK_PRESETS,
|
|
13
|
+
detectDiscipline,
|
|
14
|
+
detectStack,
|
|
15
|
+
getDisciplineConfig,
|
|
16
|
+
getStackConfig
|
|
17
|
+
} from "./chunk-UPLDI7CN.js";
|
|
15
18
|
import {
|
|
16
19
|
detectIDE,
|
|
17
20
|
loadParadigmFiles,
|
|
@@ -36,32 +39,14 @@ function countLines(filePath) {
|
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
function detectProjectType(rootDir) {
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
43
|
-
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
44
|
-
if (deps["next"]) return "Next.js";
|
|
45
|
-
if (deps["nuxt"]) return "Nuxt";
|
|
46
|
-
if (deps["@angular/core"]) return "Angular";
|
|
47
|
-
if (deps["vue"]) return "Vue";
|
|
48
|
-
if (deps["svelte"]) return "Svelte";
|
|
49
|
-
if (deps["express"]) return "Express";
|
|
50
|
-
if (deps["fastify"]) return "Fastify";
|
|
51
|
-
if (deps["react"] && !deps["next"]) return "React";
|
|
52
|
-
if (deps["typescript"]) return "TypeScript";
|
|
53
|
-
return "Node.js";
|
|
54
|
-
} catch {
|
|
55
|
-
return void 0;
|
|
56
|
-
}
|
|
42
|
+
const stackId = detectStack(rootDir);
|
|
43
|
+
if (stackId && STACK_PRESETS[stackId]) {
|
|
44
|
+
return STACK_PRESETS[stackId].name;
|
|
57
45
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return "Python";
|
|
46
|
+
const discipline = detectDiscipline(rootDir);
|
|
47
|
+
if (discipline !== "backend") {
|
|
48
|
+
return discipline.charAt(0).toUpperCase() + discipline.slice(1);
|
|
62
49
|
}
|
|
63
|
-
if (fs.existsSync(path.join(rootDir, "go.mod"))) return "Go";
|
|
64
|
-
if (fs.existsSync(path.join(rootDir, "Cargo.toml"))) return "Rust";
|
|
65
50
|
return void 0;
|
|
66
51
|
}
|
|
67
52
|
function detectExistingIDEFiles(rootDir) {
|
|
@@ -142,13 +127,15 @@ function detectExistingIDEFiles(rootDir) {
|
|
|
142
127
|
totalLines += lines;
|
|
143
128
|
}
|
|
144
129
|
const discipline = detectDiscipline(rootDir);
|
|
130
|
+
const stack = detectStack(rootDir);
|
|
145
131
|
return {
|
|
146
132
|
ides,
|
|
147
133
|
hasExisting: ides.length > 0,
|
|
148
134
|
totalLines,
|
|
149
135
|
projectType: detectProjectType(rootDir),
|
|
150
|
-
discipline: discipline !== "backend" ? discipline : void 0
|
|
136
|
+
discipline: discipline !== "backend" ? discipline : void 0,
|
|
151
137
|
// Only show if non-fallback
|
|
138
|
+
stack: stack || void 0
|
|
152
139
|
};
|
|
153
140
|
}
|
|
154
141
|
function generateMigrationPrompt(detection, projectName) {
|
|
@@ -324,7 +311,7 @@ function displayDetectionResults(detection, projectName) {
|
|
|
324
311
|
console.log(chalk.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\n"));
|
|
325
312
|
console.log(chalk.white(" \u{1F4C1} Project: ") + chalk.cyan(projectName) + (detection.projectType ? chalk.gray(` (${detection.projectType} detected)`) : ""));
|
|
326
313
|
if (detection.discipline) {
|
|
327
|
-
console.log(chalk.white(" \u{1F3AF} Discipline: ") + chalk.cyan(detection.discipline));
|
|
314
|
+
console.log(chalk.white(" \u{1F3AF} Discipline: ") + chalk.cyan(detection.discipline) + (detection.stack ? chalk.gray(` \u2192 stack: ${detection.stack}`) : ""));
|
|
328
315
|
}
|
|
329
316
|
console.log("");
|
|
330
317
|
if (detection.hasExisting) {
|
|
@@ -457,7 +444,7 @@ async function initCommand(options) {
|
|
|
457
444
|
if (!fs.existsSync(path.join(paradigmDir, "fixtures.yaml"))) {
|
|
458
445
|
createFixturesTemplate(paradigmDir);
|
|
459
446
|
}
|
|
460
|
-
applyDisciplineToConfig(paradigmDir, cwd);
|
|
447
|
+
applyDisciplineToConfig(paradigmDir, cwd, options.stack);
|
|
461
448
|
spinner.succeed(chalk.green(".paradigm/ created"));
|
|
462
449
|
} else {
|
|
463
450
|
spinner.warn(chalk.yellow("Templates not found, creating minimal structure"));
|
|
@@ -517,7 +504,7 @@ async function initCommand(options) {
|
|
|
517
504
|
displaySummary(targetIDE, detection);
|
|
518
505
|
tracker.success("Paradigm initialized", { project: projectName, ide: targetIDE });
|
|
519
506
|
}
|
|
520
|
-
function applyDisciplineToConfig(paradigmDir, rootDir) {
|
|
507
|
+
function applyDisciplineToConfig(paradigmDir, rootDir, explicitStack) {
|
|
521
508
|
const configPath = path.join(paradigmDir, "config.yaml");
|
|
522
509
|
if (!fs.existsSync(configPath)) return;
|
|
523
510
|
const discipline = detectDiscipline(rootDir);
|
|
@@ -527,7 +514,39 @@ function applyDisciplineToConfig(paradigmDir, rootDir) {
|
|
|
527
514
|
/^discipline:\s*auto\b.*$/m,
|
|
528
515
|
`discipline: ${discipline}`
|
|
529
516
|
);
|
|
530
|
-
const
|
|
517
|
+
const stackId = explicitStack || detectStack(rootDir);
|
|
518
|
+
const config = stackId ? getStackConfig(stackId) : getDisciplineConfig(discipline);
|
|
519
|
+
if (!config) {
|
|
520
|
+
let applyConfigToContent2 = function() {
|
|
521
|
+
const mappingLines2 = Object.entries(fallback.symbolMapping).map(([pattern, symbol]) => ` "${pattern}": "${symbol}"`).join("\n");
|
|
522
|
+
content = content.replace(
|
|
523
|
+
/ symbol-mapping:\n(?:(?: .*| *)\n)*/,
|
|
524
|
+
` symbol-mapping:
|
|
525
|
+
${mappingLines2}
|
|
526
|
+
`
|
|
527
|
+
);
|
|
528
|
+
const purposeLines2 = fallback.purposeRequired.map((pr) => ` - pattern: "${pr.pattern}"
|
|
529
|
+
depth: ${pr.depth}`).join("\n");
|
|
530
|
+
content = content.replace(
|
|
531
|
+
/purpose-required:\n(?: - pattern:.*\n depth:.*\n)*/,
|
|
532
|
+
`purpose-required:
|
|
533
|
+
${purposeLines2}
|
|
534
|
+
`
|
|
535
|
+
);
|
|
536
|
+
fs.writeFileSync(configPath, content, "utf8");
|
|
537
|
+
};
|
|
538
|
+
var applyConfigToContent = applyConfigToContent2;
|
|
539
|
+
const fallback = getDisciplineConfig(discipline);
|
|
540
|
+
applyConfigToContent2();
|
|
541
|
+
return;
|
|
542
|
+
}
|
|
543
|
+
if (stackId) {
|
|
544
|
+
content = content.replace(
|
|
545
|
+
/^(discipline:\s*.+)$/m,
|
|
546
|
+
`$1
|
|
547
|
+
stack: ${stackId}`
|
|
548
|
+
);
|
|
549
|
+
}
|
|
531
550
|
const mappingLines = Object.entries(config.symbolMapping).map(([pattern, symbol]) => ` "${pattern}": "${symbol}"`).join("\n");
|
|
532
551
|
content = content.replace(
|
|
533
552
|
/ symbol-mapping:\n(?:(?: .*| *)\n)*/,
|
|
@@ -549,7 +568,7 @@ function createMinimalStructure(paradigmDir, projectName) {
|
|
|
549
568
|
fs.mkdirSync(path.join(paradigmDir, "specs"), { recursive: true });
|
|
550
569
|
fs.mkdirSync(path.join(paradigmDir, "docs"), { recursive: true });
|
|
551
570
|
fs.mkdirSync(path.join(paradigmDir, "tasks"), { recursive: true });
|
|
552
|
-
fs.mkdirSync(path.join(paradigmDir, "
|
|
571
|
+
fs.mkdirSync(path.join(paradigmDir, "lore"), { recursive: true });
|
|
553
572
|
const minimalConfig = `# Paradigm Configuration
|
|
554
573
|
version: "1.0"
|
|
555
574
|
project: "${projectName}"
|
|
@@ -557,48 +576,49 @@ project: "${projectName}"
|
|
|
557
576
|
agent-guidelines:
|
|
558
577
|
overview: |
|
|
559
578
|
This project uses Paradigm for structured AI-assisted development.
|
|
579
|
+
All context, symbols, and specifications live in the .paradigm/ directory.
|
|
560
580
|
how-to-use:
|
|
561
|
-
- Check .paradigm/specs/ for philosophy and patterns
|
|
562
|
-
-
|
|
563
|
-
-
|
|
564
|
-
-
|
|
581
|
+
- "Check .paradigm/specs/ for philosophy and patterns before making changes"
|
|
582
|
+
- "Reference symbols using prefixes: #component ^gate !signal $flow ~aspect"
|
|
583
|
+
- "Use the Paradigm logger instead of raw console.log/print statements"
|
|
584
|
+
- "Check .paradigm/docs/ for command reference and troubleshooting"
|
|
585
|
+
update-rules:
|
|
586
|
+
- "When adding a feature, create/update the nearest .purpose file"
|
|
587
|
+
- "When adding authorization, update portal.yaml"
|
|
588
|
+
- "Always update references when renaming symbols"
|
|
565
589
|
|
|
566
590
|
symbol-system:
|
|
567
|
-
"@":
|
|
568
|
-
name: Feature
|
|
569
|
-
description: User-facing capabilities
|
|
570
|
-
examples: ["@login", "@checkout"]
|
|
571
591
|
"#":
|
|
572
592
|
name: Component
|
|
573
|
-
description:
|
|
574
|
-
examples: ["#Button", "#
|
|
593
|
+
description: Any documented code unit (feature, service, module, integration)
|
|
594
|
+
examples: ["#checkout", "#login-handler", "#Button", "#stripe-client"]
|
|
595
|
+
"$":
|
|
596
|
+
name: Flow
|
|
597
|
+
description: Multi-step processes or user journeys
|
|
598
|
+
examples: ["$checkout-flow", "$onboarding", "$auth-flow"]
|
|
575
599
|
"^":
|
|
576
|
-
name:
|
|
577
|
-
description:
|
|
578
|
-
examples: ["^authenticated", "^admin-only"]
|
|
600
|
+
name: Gate
|
|
601
|
+
description: Access control points and authorization rules
|
|
602
|
+
examples: ["^authenticated", "^admin-only", "^rate-limited"]
|
|
579
603
|
"!":
|
|
580
604
|
name: Signal
|
|
581
|
-
description: Events
|
|
582
|
-
examples: ["!login-success", "!payment-failed"]
|
|
583
|
-
"
|
|
584
|
-
name:
|
|
585
|
-
description:
|
|
586
|
-
examples: ["
|
|
587
|
-
"$":
|
|
588
|
-
name: Flow
|
|
589
|
-
description: Multi-step processes
|
|
590
|
-
examples: ["$checkout-flow", "$onboarding"]
|
|
605
|
+
description: Events emitted for side effects
|
|
606
|
+
examples: ["!login-success", "!payment-failed", "!rate-limited"]
|
|
607
|
+
"~":
|
|
608
|
+
name: Aspect
|
|
609
|
+
description: Cross-cutting rules with required code anchors
|
|
610
|
+
examples: ["~audit-required", "~rate-limited", "~cached"]
|
|
591
611
|
|
|
592
612
|
logging:
|
|
593
613
|
enforce: true
|
|
594
614
|
default-level: debug
|
|
595
615
|
|
|
596
|
-
scan:
|
|
597
|
-
enabled: true
|
|
598
|
-
|
|
599
616
|
conventions:
|
|
600
|
-
- Use kebab-case for symbol IDs
|
|
601
|
-
-
|
|
617
|
+
- "Use kebab-case for all symbol IDs (feature-name, not featureName)"
|
|
618
|
+
- "Document flows when logic spans 3+ components"
|
|
619
|
+
- "Reference related items using symbol prefixes (# $ ^ ! ~)"
|
|
620
|
+
- "Update .purpose files when changing feature behavior"
|
|
621
|
+
- "ALWAYS use Paradigm logger, NEVER raw console.log/print"
|
|
602
622
|
`;
|
|
603
623
|
fs.writeFileSync(path.join(paradigmDir, "config.yaml"), minimalConfig, "utf8");
|
|
604
624
|
createFixturesTemplate(paradigmDir);
|