omegon 0.8.1 → 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.
|
@@ -194,21 +194,22 @@ export const PATTERNS: Record<string, PatternDefinition> = {
|
|
|
194
194
|
modifiersDefault: ["breaking_changes"],
|
|
195
195
|
splitStrategy: ["New versioned endpoint", "Deprecation + dual-support", "Client migration"],
|
|
196
196
|
},
|
|
197
|
-
|
|
198
|
-
name: "
|
|
199
|
-
description: "Code cleanup, renaming, or
|
|
197
|
+
refactor: {
|
|
198
|
+
name: "Refactor",
|
|
199
|
+
description: "Code cleanup, renaming, restructuring, or replacing implementations while preserving behavior",
|
|
200
200
|
keywords: [
|
|
201
201
|
"refactor", "rename", "reorganize", "cleanup", "extract", "inline", "move",
|
|
202
|
-
"restructure", "mechanical", "no functional",
|
|
202
|
+
"restructure", "mechanical", "no functional", "replace", "rewrite",
|
|
203
|
+
"swap", "substitute", "modernize",
|
|
203
204
|
],
|
|
204
|
-
requiredAny: ["refactor", "rename", "cleanup", "extract", "reorganize"],
|
|
205
|
+
requiredAny: ["refactor", "rename", "cleanup", "extract", "reorganize", "replace", "rewrite", "swap", "substitute"],
|
|
205
206
|
expectedComponents: {
|
|
206
|
-
operation: ["rename", "extract", "inline", "move", "reorganize"],
|
|
207
|
-
scope: ["function", "class", "file", "module", "component", "method"],
|
|
207
|
+
operation: ["rename", "extract", "inline", "move", "reorganize", "replace", "rewrite", "swap", "substitute"],
|
|
208
|
+
scope: ["function", "class", "file", "module", "component", "method", "implementation", "approach", "library", "framework", "pattern"],
|
|
208
209
|
},
|
|
209
210
|
systemsBase: 1,
|
|
210
211
|
modifiersDefault: [],
|
|
211
|
-
splitStrategy: ["
|
|
212
|
+
splitStrategy: ["Implement replacement / perform refactor", "Update call sites + tests", "Remove old implementation"],
|
|
212
213
|
},
|
|
213
214
|
bug_fix: {
|
|
214
215
|
name: "Bug Fix",
|
|
@@ -282,21 +283,27 @@ export const PATTERNS: Record<string, PatternDefinition> = {
|
|
|
282
283
|
modifiersDefault: ["state_coordination"],
|
|
283
284
|
splitStrategy: ["Core data model", "Rendering/UI layer", "Event handling + state management", "Application shell"],
|
|
284
285
|
},
|
|
285
|
-
|
|
286
|
-
name: "
|
|
287
|
-
description: "
|
|
286
|
+
infrastructure_tooling: {
|
|
287
|
+
name: "Infrastructure & Tooling",
|
|
288
|
+
description: "Extension development, CLI tooling, internal infrastructure, build systems, or agentic framework work",
|
|
288
289
|
keywords: [
|
|
289
|
-
"
|
|
290
|
-
"
|
|
290
|
+
"extension", "plugin", "tool", "command", "cli", "config", "configuration",
|
|
291
|
+
"pipeline", "build", "deploy", "ci", "cd", "workflow", "script", "hook",
|
|
292
|
+
"provider", "routing", "dispatch", "handler", "registry", "loader",
|
|
293
|
+
"prompt", "agent", "inference",
|
|
294
|
+
"dashboard", "diagnostic", "telemetry", "logging",
|
|
295
|
+
"skill", "template", "scaffold", "generate", "emit",
|
|
291
296
|
],
|
|
292
|
-
requiredAny: ["
|
|
297
|
+
requiredAny: ["extension", "plugin", "provider", "routing",
|
|
298
|
+
"dispatch", "registry", "agent", "skill"],
|
|
293
299
|
expectedComponents: {
|
|
294
|
-
|
|
295
|
-
|
|
300
|
+
core: ["extension", "plugin", "tool", "command", "handler", "provider", "registry"],
|
|
301
|
+
integration: ["config", "pipeline", "workflow", "routing", "dispatch", "loader"],
|
|
302
|
+
surface: ["cli", "dashboard", "status", "prompt", "template", "diagnostic"],
|
|
296
303
|
},
|
|
297
|
-
systemsBase: 1
|
|
304
|
+
systemsBase: 1,
|
|
298
305
|
modifiersDefault: [],
|
|
299
|
-
splitStrategy: ["
|
|
306
|
+
splitStrategy: ["Core implementation", "Integration + wiring", "Tests + documentation"],
|
|
300
307
|
},
|
|
301
308
|
};
|
|
302
309
|
|
|
@@ -462,11 +469,18 @@ export function detectModifiers(directive: string): string[] {
|
|
|
462
469
|
}
|
|
463
470
|
|
|
464
471
|
/**
|
|
465
|
-
* Calculate complexity:
|
|
472
|
+
* Calculate complexity: systems × (1 + 0.5 × modifiers).
|
|
473
|
+
*
|
|
474
|
+
* Previous formula was (1 + systems) which gave a floor of 2.0 even for
|
|
475
|
+
* single-system, zero-modifier directives — making the heuristic path
|
|
476
|
+
* always exceed the default threshold of 2.0. Using bare `systems`
|
|
477
|
+
* allows trivial directives (1 system, 0 modifiers) to score 1.0,
|
|
478
|
+
* so they correctly get `needs_assessment` instead of `cleave`.
|
|
479
|
+
*
|
|
466
480
|
* Capped at 100.0.
|
|
467
481
|
*/
|
|
468
482
|
export function calculateComplexity(systems: number, modifiers: string[]): number {
|
|
469
|
-
const raw =
|
|
483
|
+
const raw = systems * (1 + 0.5 * modifiers.length);
|
|
470
484
|
return Math.round(Math.min(raw, 100.0) * 10) / 10;
|
|
471
485
|
}
|
|
472
486
|
|
|
@@ -536,7 +550,7 @@ export function assessDirective(
|
|
|
536
550
|
reasoning:
|
|
537
551
|
`Pattern '${match.name}' matched with ${(match.confidence * 100).toFixed(0)}% confidence. ` +
|
|
538
552
|
`Systems: ${systemsForDisplay}, Modifiers: ${allModifiers.length}. ` +
|
|
539
|
-
`Formula:
|
|
553
|
+
`Formula: ${systemsForCalc} × (1 + 0.5 × ${allModifiers.length}) = ${complexity}. ` +
|
|
540
554
|
`Effective (validate=${validate}): ${effComplexity}`,
|
|
541
555
|
skipInterrogation: false,
|
|
542
556
|
};
|
|
@@ -545,7 +559,7 @@ export function assessDirective(
|
|
|
545
559
|
if (
|
|
546
560
|
match.confidence >= 0.90 &&
|
|
547
561
|
effComplexity <= threshold &&
|
|
548
|
-
match.name === "
|
|
562
|
+
match.name === "Refactor"
|
|
549
563
|
) {
|
|
550
564
|
result.skipInterrogation = true;
|
|
551
565
|
}
|
|
@@ -1586,7 +1586,7 @@ export default function cleaveExtension(pi: ExtensionAPI) {
|
|
|
1586
1586
|
"Every non-trivial code change must include tests in co-located *.test.ts files. Untested code is incomplete — do not commit without tests for new functions and changed behavior.",
|
|
1587
1587
|
"Call cleave_assess before starting any multi-system or cross-cutting task to determine if decomposition is needed",
|
|
1588
1588
|
"If decision is 'execute', proceed directly. If 'cleave', use /cleave to decompose. If 'needs_assessment', proceed directly — it means no pattern matched but the task is likely simple enough for in-session execution.",
|
|
1589
|
-
"Complexity formula:
|
|
1589
|
+
"Complexity formula: systems × (1 + 0.5 × modifiers). Threshold default: 2.0.",
|
|
1590
1590
|
"The /assess command provides code assessment: `/assess cleave` (adversarial review + auto-fix), `/assess diff [ref]` (review only), `/assess spec [change]` (validate against OpenSpec scenarios), `/assess design [node-id]` (evaluate design-tree node readiness before set_status(decided)).",
|
|
1591
1591
|
"When the repo has openspec/ with active changes, suggest `/assess spec` after implementation and before `/opsx:archive`.",
|
|
1592
1592
|
"Run `/assess design <node-id>` before calling design_tree_update with set_status(decided) to verify acceptance criteria are satisfied.",
|
|
@@ -427,9 +427,13 @@ export function computeAssessmentSnapshot(repoPath: string, changeName: string):
|
|
|
427
427
|
const gitHead = safeReadGit(repoPath, ["rev-parse", "HEAD"]);
|
|
428
428
|
const dirty = detectGitDirty(repoPath, snapshotPaths);
|
|
429
429
|
|
|
430
|
+
// Fingerprint represents implementation file content — NOT git HEAD.
|
|
431
|
+
// Including gitHead would create a chicken-and-egg: committing the
|
|
432
|
+
// assessment.json (which lives in-repo) changes HEAD, which invalidates
|
|
433
|
+
// the fingerprint, making the assessment permanently stale.
|
|
434
|
+
// Git HEAD is stored separately in the snapshot for informational use.
|
|
430
435
|
const fingerprintSeed = JSON.stringify({
|
|
431
436
|
changeName,
|
|
432
|
-
gitHead,
|
|
433
437
|
dirty,
|
|
434
438
|
files,
|
|
435
439
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omegon",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Omegon — an opinionated distribution of pi (by Mario Zechner) with extensions for lifecycle management, memory, orchestration, and visualization",
|
|
5
5
|
"bin": {
|
|
6
6
|
"omegon": "bin/omegon.mjs",
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"./extensions/cleave",
|
|
59
59
|
"./extensions/openspec",
|
|
60
60
|
"./extensions/defaults.ts",
|
|
61
|
-
"./extensions/distill.ts",
|
|
62
61
|
"./extensions/render",
|
|
63
62
|
"./extensions/local-inference",
|
|
64
63
|
"./extensions/mcp-bridge",
|
package/skills/cleave/SKILL.md
CHANGED
|
@@ -91,15 +91,21 @@ This status is injected into the agent context (not just displayed).
|
|
|
91
91
|
## Complexity Formula
|
|
92
92
|
|
|
93
93
|
```
|
|
94
|
-
complexity =
|
|
94
|
+
complexity = systems × (1 + 0.5 × modifiers)
|
|
95
95
|
effective = complexity + 1 (when validation enabled)
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
The formula uses bare `systems` (not `1 + systems`) so that single-system,
|
|
99
|
+
zero-modifier directives score 1.0 (effective 2.0) — at the default threshold
|
|
100
|
+
of 2.0, they get `needs_assessment` rather than being falsely recommended
|
|
101
|
+
for decomposition.
|
|
102
|
+
|
|
103
|
+
## Patterns (12)
|
|
99
104
|
|
|
100
105
|
Full-Stack CRUD, Authentication System, External Service Integration,
|
|
101
106
|
Database Migration, Performance Optimization, Breaking API Change,
|
|
102
|
-
|
|
107
|
+
Refactor, Bug Fix, Greenfield Project, Multi-Module Library,
|
|
108
|
+
Application Bootstrap, Infrastructure & Tooling.
|
|
103
109
|
|
|
104
110
|
## Adversarial Review Loop
|
|
105
111
|
|