create-majlis 0.5.2 → 0.6.1
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/index.js +79 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -505,7 +505,74 @@ Rules:
|
|
|
505
505
|
{ "approach": "Name of alternative approach", "source": "Where you found it", "relevance": "How it applies", "contradicts_current": true }
|
|
506
506
|
]
|
|
507
507
|
}
|
|
508
|
-
|
|
508
|
+
-->`,
|
|
509
|
+
diagnostician: `---
|
|
510
|
+
name: diagnostician
|
|
511
|
+
model: opus
|
|
512
|
+
tools: [Read, Write, Bash, Glob, Grep, WebSearch]
|
|
513
|
+
---
|
|
514
|
+
You are the Diagnostician. You perform deep project-wide analysis.
|
|
515
|
+
|
|
516
|
+
You have the highest turn budget of any agent. Use it for depth, not breadth.
|
|
517
|
+
Your job is pure insight \u2014 you do NOT fix code, you do NOT build, you do NOT
|
|
518
|
+
make decisions. You diagnose.
|
|
519
|
+
|
|
520
|
+
## What You Receive
|
|
521
|
+
- Full database export: every experiment, decision, doubt, challenge, verification,
|
|
522
|
+
dead-end, metric, and compression across the entire project history
|
|
523
|
+
- Current synthesis, fragility map, and dead-end registry
|
|
524
|
+
- Full read access to the entire project codebase
|
|
525
|
+
- Bash access to run tests, profiling, git archaeology, and analysis scripts
|
|
526
|
+
|
|
527
|
+
## What You Can Do
|
|
528
|
+
1. **Read everything** \u2014 source code, docs, git history, test output
|
|
529
|
+
2. **Run analysis** \u2014 execute tests, profilers, git log/blame/bisect, custom scripts
|
|
530
|
+
3. **Write analysis scripts** \u2014 you may write scripts ONLY to \`.majlis/scripts/\`
|
|
531
|
+
4. **Search externally** \u2014 WebSearch for patterns, known issues, relevant techniques
|
|
532
|
+
|
|
533
|
+
## What You CANNOT Do
|
|
534
|
+
- Modify any project files outside \`.majlis/scripts/\`
|
|
535
|
+
- Make code changes, fixes, or patches
|
|
536
|
+
- Create experiments or make decisions
|
|
537
|
+
- Write to docs/, src/, or any other project directory
|
|
538
|
+
|
|
539
|
+
## Your Approach
|
|
540
|
+
|
|
541
|
+
Phase 1: Orientation (turns 1-10)
|
|
542
|
+
- Read the full database export in your context
|
|
543
|
+
- Read synthesis, fragility, dead-ends
|
|
544
|
+
- Identify patterns: recurring failures, unresolved doubts, evidence gaps
|
|
545
|
+
|
|
546
|
+
Phase 2: Deep Investigation (turns 11-40)
|
|
547
|
+
- Read source code at critical points identified in Phase 1
|
|
548
|
+
- Run targeted tests, profiling, git archaeology
|
|
549
|
+
- Write and execute analysis scripts in .majlis/scripts/
|
|
550
|
+
- Cross-reference findings across experiments
|
|
551
|
+
|
|
552
|
+
Phase 3: Synthesis (turns 41-60)
|
|
553
|
+
- Compile findings into a diagnostic report
|
|
554
|
+
- Identify root causes, not symptoms
|
|
555
|
+
- Rank issues by structural impact
|
|
556
|
+
- Suggest investigation directions (not fixes)
|
|
557
|
+
|
|
558
|
+
## Output Format
|
|
559
|
+
Produce a diagnostic report as markdown. At the end, include:
|
|
560
|
+
|
|
561
|
+
<!-- majlis-json
|
|
562
|
+
{
|
|
563
|
+
"diagnosis": {
|
|
564
|
+
"root_causes": ["List of identified root causes"],
|
|
565
|
+
"patterns": ["Recurring patterns across experiments"],
|
|
566
|
+
"evidence_gaps": ["What we don't know but should"],
|
|
567
|
+
"investigation_directions": ["Suggested directions for next experiments"]
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
-->
|
|
571
|
+
|
|
572
|
+
## Safety Reminders
|
|
573
|
+
- You are READ-ONLY for project code. Write ONLY to .majlis/scripts/.
|
|
574
|
+
- Focus on diagnosis, not fixing. Your value is insight, not implementation.
|
|
575
|
+
- Trust the database export over docs/ files when they conflict.`
|
|
509
576
|
};
|
|
510
577
|
var COMMANDS = {
|
|
511
578
|
classify: {
|
|
@@ -565,6 +632,14 @@ Produce a rihla document at docs/rihla/.`
|
|
|
565
632
|
If the CLI is not installed, review: original objective, current classification,
|
|
566
633
|
recent failures, dead-ends. Ask: is the classification serving the objective?
|
|
567
634
|
Would we decompose differently with what we now know?`
|
|
635
|
+
},
|
|
636
|
+
diagnose: {
|
|
637
|
+
description: "Deep project-wide diagnostic analysis",
|
|
638
|
+
body: `Run \`majlis diagnose $ARGUMENTS\` for deep diagnosis.
|
|
639
|
+
If the CLI is not installed, perform a deep diagnostic analysis.
|
|
640
|
+
Read docs/synthesis/current.md, fragility.md, dead-ends.md, and all experiments.
|
|
641
|
+
Identify root causes, recurring patterns, evidence gaps, and investigation directions.
|
|
642
|
+
Do NOT modify project code \u2014 analysis only.`
|
|
568
643
|
}
|
|
569
644
|
};
|
|
570
645
|
var HOOKS_CONFIG = {
|
|
@@ -987,7 +1062,7 @@ function scaffoldInit(targetDir, answers, noHooks, minimal) {
|
|
|
987
1062
|
console.log(' majlis session start "First session"\n');
|
|
988
1063
|
}
|
|
989
1064
|
function scaffoldMajlisFiles(projectRoot, answers, noHooks, minimal) {
|
|
990
|
-
const agentNames = minimal ? ["builder", "critic", "verifier", "compressor", "gatekeeper"] : ["builder", "critic", "adversary", "verifier", "reframer", "compressor", "scout", "gatekeeper"];
|
|
1065
|
+
const agentNames = minimal ? ["builder", "critic", "verifier", "compressor", "gatekeeper", "diagnostician"] : ["builder", "critic", "adversary", "verifier", "reframer", "compressor", "scout", "gatekeeper", "diagnostician"];
|
|
991
1066
|
const majlisDir = path.join(projectRoot, ".majlis");
|
|
992
1067
|
mkdirSafe(majlisDir);
|
|
993
1068
|
const configPath = path.join(majlisDir, "config.json");
|
|
@@ -1044,7 +1119,8 @@ ${cmd.body}
|
|
|
1044
1119
|
"verification",
|
|
1045
1120
|
"reframes",
|
|
1046
1121
|
"rihla",
|
|
1047
|
-
"synthesis"
|
|
1122
|
+
"synthesis",
|
|
1123
|
+
"diagnosis"
|
|
1048
1124
|
];
|
|
1049
1125
|
for (const dir of docDirs) {
|
|
1050
1126
|
mkdirSafe(path.join(docsDir, dir));
|