majlis 0.8.0 → 0.8.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/cli.js +36 -17
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -531,7 +531,7 @@ Read source code at the specific locations relevant to your change. Do NOT
|
|
|
531
531
|
read the entire codebase or run diagnostic Python scripts. If the synthesis
|
|
532
532
|
says "lines 1921-22" then read those lines and their context. That's it.
|
|
533
533
|
|
|
534
|
-
Do NOT read raw data files (fixtures/, ground truth
|
|
534
|
+
Do NOT read raw data files (fixtures/, ground truth, test data). The synthesis
|
|
535
535
|
has the relevant facts. Reading raw data wastes turns re-deriving what the
|
|
536
536
|
doubt/challenge/verify cycle already established.
|
|
537
537
|
|
|
@@ -570,7 +570,7 @@ Do NOT iterate. Do NOT "try one more thing." The adversary, critic, and verifier
|
|
|
570
570
|
exist to diagnose what went wrong. The cycle comes back to you with their insights.
|
|
571
571
|
|
|
572
572
|
## Off-limits (DO NOT modify)
|
|
573
|
-
- \`fixtures/\` \u2014 test data, ground truth,
|
|
573
|
+
- \`fixtures/\` \u2014 test data, ground truth, reference outputs. Read-only.
|
|
574
574
|
- \`scripts/benchmark.py\` \u2014 the measurement tool. Never change how you're measured.
|
|
575
575
|
- \`.majlis/\` \u2014 framework config. Not your concern.
|
|
576
576
|
|
|
@@ -835,15 +835,20 @@ the database export.
|
|
|
835
835
|
2. Read docs/ files for narrative context, but trust the database when they conflict.
|
|
836
836
|
3. Cross-reference: same question in different language? contradicting decisions?
|
|
837
837
|
workaround masking root cause?
|
|
838
|
-
4.
|
|
838
|
+
4. **VERIFY before claiming code is live.** Dead-ended experiments are REVERTED \u2014
|
|
839
|
+
their code changes do NOT exist on the current branch. Before writing that code
|
|
840
|
+
is "live", "shipping", or "regressing", use Grep/Glob to confirm it actually
|
|
841
|
+
exists in the current codebase. If the code only existed on experiment branches,
|
|
842
|
+
say so explicitly and mark the issue as RESOLVED, not CRITICAL.
|
|
843
|
+
5. Update fragility map: thin coverage, weak components, untested judgment
|
|
839
844
|
decisions, broken provenance.
|
|
840
|
-
|
|
845
|
+
6. Update dead-end registry: compress rejected experiments into structural constraints.
|
|
841
846
|
Mark each dead-end as [structural] or [procedural].
|
|
842
|
-
|
|
847
|
+
7. REWRITE synthesis using the Write tool \u2014 shorter and denser. If it's growing,
|
|
843
848
|
you're accumulating, not compressing. You MUST use the Write tool to update
|
|
844
849
|
docs/synthesis/current.md, docs/synthesis/fragility.md, and docs/synthesis/dead-ends.md.
|
|
845
850
|
The framework does NOT auto-save your output for these files.
|
|
846
|
-
|
|
851
|
+
8. Review classification: new sub-types? resolved sub-types?
|
|
847
852
|
|
|
848
853
|
You may ONLY write to these three files:
|
|
849
854
|
- docs/synthesis/current.md
|
|
@@ -1148,9 +1153,9 @@ falsifiable structural constraint that blocks future experiments from repeating
|
|
|
1148
1153
|
## Constraint Quality
|
|
1149
1154
|
|
|
1150
1155
|
Good constraints are specific and block future repetition:
|
|
1151
|
-
- "
|
|
1152
|
-
- "Relaxing
|
|
1153
|
-
- "
|
|
1156
|
+
- "Binary search fallback in sortedMerge() is O(n log n) worst-case when input contains >40% duplicates \u2014 measured via 13-run sweep, ceiling 0.67x baseline"
|
|
1157
|
+
- "Relaxing the pruning threshold in recursiveSplit() causes false positives on sparse inputs (accuracy 95->72.5%)"
|
|
1158
|
+
- "Cyclic dependency in the module graph prevents topological sort \u2014 requires at least one back-edge cut"
|
|
1154
1159
|
|
|
1155
1160
|
Bad constraints are vague and useless:
|
|
1156
1161
|
- "Didn't work"
|
|
@@ -2431,7 +2436,7 @@ ${taskPrompt}`;
|
|
|
2431
2436
|
}
|
|
2432
2437
|
async function spawnSynthesiser(context, projectRoot, opts) {
|
|
2433
2438
|
const root = projectRoot ?? findProjectRoot() ?? process.cwd();
|
|
2434
|
-
const maxTurns = opts?.maxTurns ??
|
|
2439
|
+
const maxTurns = opts?.maxTurns ?? 15;
|
|
2435
2440
|
const tools = opts?.tools ?? ["Read", "Glob", "Grep"];
|
|
2436
2441
|
const contextJson = JSON.stringify(context);
|
|
2437
2442
|
const taskPrompt = context.taskPrompt ?? "Synthesise the findings into actionable builder guidance.";
|
|
@@ -2535,7 +2540,7 @@ async function generateSlug(hypothesis, projectRoot) {
|
|
|
2535
2540
|
|
|
2536
2541
|
"${hypothesis.slice(0, 500)}"
|
|
2537
2542
|
|
|
2538
|
-
Output ONLY the slug, nothing else. Examples:
|
|
2543
|
+
Output ONLY the slug, nothing else. Examples: add-index-lookup, skip-empty-batches, fix-retry-backoff`,
|
|
2539
2544
|
model: "haiku",
|
|
2540
2545
|
tools: [],
|
|
2541
2546
|
systemPrompt: "Output only a short hyphenated slug. No explanation, no quotes, no punctuation except hyphens.",
|
|
@@ -2610,13 +2615,13 @@ var init_spawn = __esm({
|
|
|
2610
2615
|
adversary: 30,
|
|
2611
2616
|
verifier: 50,
|
|
2612
2617
|
compressor: 30,
|
|
2613
|
-
reframer:
|
|
2614
|
-
scout:
|
|
2615
|
-
gatekeeper:
|
|
2618
|
+
reframer: 30,
|
|
2619
|
+
scout: 30,
|
|
2620
|
+
gatekeeper: 15,
|
|
2616
2621
|
diagnostician: 60,
|
|
2617
2622
|
cartographer: 40,
|
|
2618
2623
|
toolsmith: 30,
|
|
2619
|
-
postmortem:
|
|
2624
|
+
postmortem: 30
|
|
2620
2625
|
};
|
|
2621
2626
|
CHECKPOINT_INTERVAL = {
|
|
2622
2627
|
builder: 12,
|
|
@@ -5389,8 +5394,22 @@ async function doCompress(db, root) {
|
|
|
5389
5394
|
const sizeBefore = fs11.existsSync(synthesisPath) ? fs11.statSync(synthesisPath).size : 0;
|
|
5390
5395
|
const sessionCount = getSessionsSinceCompression(db);
|
|
5391
5396
|
const dbExport = exportForCompressor(db);
|
|
5397
|
+
let currentBranch = "main";
|
|
5398
|
+
try {
|
|
5399
|
+
currentBranch = (0, import_node_child_process5.execFileSync)("git", ["rev-parse", "--abbrev-ref", "HEAD"], {
|
|
5400
|
+
cwd: root,
|
|
5401
|
+
encoding: "utf-8"
|
|
5402
|
+
}).trim();
|
|
5403
|
+
} catch {
|
|
5404
|
+
}
|
|
5392
5405
|
const result = await spawnAgent("compressor", {
|
|
5393
|
-
taskPrompt: "## Structured Data (CANONICAL \u2014 from SQLite database)\nThe database export below is the source of truth. docs/ files are agent artifacts that may contain stale or incorrect information. Cross-reference everything against this data.\n\n" + dbExport +
|
|
5406
|
+
taskPrompt: "## Structured Data (CANONICAL \u2014 from SQLite database)\nThe database export below is the source of truth. docs/ files are agent artifacts that may contain stale or incorrect information. Cross-reference everything against this data.\n\n" + dbExport + `
|
|
5407
|
+
|
|
5408
|
+
## Current Branch: ${currentBranch}
|
|
5409
|
+
Dead-ended experiments have been REVERTED \u2014 their code changes do NOT exist on this branch. Before claiming any code is "live" or "regressing", verify with Grep/Glob that it exists in the current codebase.
|
|
5410
|
+
|
|
5411
|
+
## Your Task
|
|
5412
|
+
Read ALL experiments, decisions, doubts, challenges, verification reports, reframes, and recent diffs. Cross-reference for contradictions, redundancies, and patterns. REWRITE docs/synthesis/current.md \u2014 shorter and denser. Update docs/synthesis/fragility.md with current weak areas. Update docs/synthesis/dead-ends.md with structural constraints from rejected experiments.`
|
|
5394
5413
|
}, root);
|
|
5395
5414
|
const sizeAfter = fs11.existsSync(synthesisPath) ? fs11.statSync(synthesisPath).size : 0;
|
|
5396
5415
|
recordCompression(db, sessionCount, sizeBefore, sizeAfter);
|
|
@@ -6678,7 +6697,7 @@ DO NOT read source code or use tools. All context you need is above. Plan from t
|
|
|
6678
6697
|
- It must be specific and actionable \u2014 name the function or mechanism to change
|
|
6679
6698
|
- Do NOT reference specific line numbers \u2014 they shift between experiments
|
|
6680
6699
|
- The hypothesis should be a single sentence describing what to do, e.g.:
|
|
6681
|
-
|
|
6700
|
+
"Replace the O(n^2) pairwise comparison in filterCandidates() with an interval-tree lookup"
|
|
6682
6701
|
|
|
6683
6702
|
CRITICAL: Your LAST line of output MUST be EXACTLY this format (on its own line, nothing after it):
|
|
6684
6703
|
<!-- majlis-json {"goal_met": false, "hypothesis": "your single-sentence hypothesis here"} -->
|