Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions plugins/openflywheel/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openflywheel",
"version": "0.6.0",
"description": "Initialize ITSM-bench harness workspaces, query Langfuse trajectories, and mine compact failure diagnoses and exact patterns.",
"version": "0.7.0",
"description": "Initialize ITSM-bench workspaces, mine exact failure patterns, and record evidence-bound curations.",
"author": {
"name": "OpenFlyWheel"
},
Expand All @@ -10,8 +10,8 @@
"skills": "./skills/",
"interface": {
"displayName": "OpenFlyWheel",
"shortDescription": "Diagnose and mine ITSM failure patterns",
"longDescription": "Initialize an ITSM-bench agent-harness optimization workspace, inspect bounded Langfuse evidence, record authoritative outcomes and compact diagnoses, and mine exact recurring patterns without copying trace payloads.",
"shortDescription": "Mine and curate ITSM failure patterns",
"longDescription": "Initialize an ITSM-bench agent-harness optimization workspace, inspect bounded Langfuse evidence, record authoritative outcomes and compact diagnoses, mine exact recurring patterns, and persist evidence-bound cross-task curations without copying trace payloads.",
"developerName": "OpenFlyWheel",
"category": "Productivity",
"capabilities": ["Read", "Write"],
Expand Down
2 changes: 1 addition & 1 deletion plugins/openflywheel/.mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"command": "uvx",
"args": [
"--from",
"git+https://github.com/divo12/OpenFlyWheel.git@ab0ef62cbe1e6cddf0bfd8ec61374d10120c61aa",
"git+https://github.com/divo12/OpenFlyWheel.git@726594a56c6683d1d32207a462fe524b202f4b8b",
"--with",
"mcp>=1.13,<2",
"openflywheel-mcp"
Expand Down
8 changes: 8 additions & 0 deletions plugins/openflywheel/program_templates/itsm.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ After recording the diagnoses for one bounded run, use `$failure-pattern-miner`
type and exact normalized root cause; results are not semantic clusters. Keep inconclusive
diagnoses separate, and reread each supporting diagnosis before forming a shared hypothesis.

After every failed outcome has a retained artifact, use `$failure-curator` for one bounded
cross-task debugger pass. Use only the current run's retained `record_failure` receipt IDs.
Do not glob `.workspace/failures/`, which may contain earlier runs. Submit the complete set of at
most 50 IDs to `record_failure_curation`, assigning each exactly once to a repeated
evidence-bound group or a deferred entry. Retain the `.workspace/failure-curations/` artifact
before forming a harness hypothesis. If the run has more than 50 failure artifacts, report the
curation bound and stop before forming a harness hypothesis.

An intermediate tool error is evidence, not an outcome failure, when the agent recovered
and the verifier passed. A technically clean trajectory is still a failure when the ITSM
verifier shows that the required environment state was not achieved.
Expand Down
33 changes: 33 additions & 0 deletions plugins/openflywheel/skills/failure-curator/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: failure-curator
description: Group a completed bounded set of recorded failure diagnoses into evidence-bound cross-task patterns before forming a harness hypothesis. Use after failure-miner has recorded every verifier-backed failure; do not query traces, edit the harness, or evaluate candidates.
---

# Failure Curator

Turn only the retained `record_failure` receipt IDs produced for the current completed baseline
or candidate run into a compact cross-task debugger overview. Do not glob or enumerate
`.workspace/failures/`; it may also contain artifacts from earlier runs. Langfuse remains the
source of trace content; read only the current run's recorded diagnosis artifacts in this phase.

## Curate

1. Read every retained failure artifact for the run, up to the tool's 50-artifact bound. If
the run exceeds that bound, stop and report that complete curation is unavailable.
2. Defer every inconclusive diagnosis with the specific evidence or recurrence gap. A
supported diagnosis may also be deferred when it has no matching failure from another task.
3. Group supported diagnoses only when at least two distinct task IDs share the same causal
mechanism and top-level `issue_type`. Shared entities, words, tools, or symptoms alone do
not establish a pattern.
4. Give each group a stable lowercase `pattern_key`, concise title, causal mechanism, general
prevention mechanism, and exactly one most relevant harness `target_component`. Keep the
prevention mechanism structural rather than task-specific; do not describe a file edit yet.
5. Assign every source artifact exactly once, either to one group or one deferred entry.

Call `record_failure_curation` once with the prepared worktree as `workspace_root`, the full
source artifact ID set, the proposed groups, and deferred entries. Retain the returned
`.workspace/failure-curations/<curation-id>.json` path for the hypothesis phase.

Do not call trace tools, copy trace content, invent missing causal evidence, combine different
failure types, form a repair hypothesis, edit the harness, run a benchmark, or promote a change
while following this skill.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "openflywheel"
version = "0.6.0"
version = "0.7.0"
description = "A governed self-improving agent harness"
requires-python = ">=3.11"
dependencies = [
Expand Down
14 changes: 14 additions & 0 deletions src/ofw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,23 @@
WorkspaceFile,
)
from ofw.evaluation import (
DeferredFailure,
FailureCuration,
FailureCurationErrorCode,
FailureCurationFailure,
FailureDiagnosis,
FailureDiagnosisError,
FailureErrorCode,
FailureEvidenceStatus,
FailureGroup,
FailureGroupMember,
FailurePatternMiningError,
FailurePatternMiningErrorCode,
FailurePatternMiningObservation,
FailurePatternMiningStatus,
FailurePatternOrdering,
FailurePatternSummary,
FailureSource,
FailureType,
LangfuseOutcomeStore,
MineFailurePatternsInput,
Expand Down Expand Up @@ -109,19 +116,26 @@ def editable(self, path: Path) -> EditableFile:
"CollectionErrorCode",
"CommandLoop",
"CommandVerifier",
"DeferredFailure",
"E2BSandbox",
"EditableFile",
"EvidenceReference",
"FailureCuration",
"FailureCurationErrorCode",
"FailureCurationFailure",
"FailureDiagnosis",
"FailureDiagnosisError",
"FailureErrorCode",
"FailureEvidenceStatus",
"FailureGroup",
"FailureGroupMember",
"FailurePatternMiningError",
"FailurePatternMiningErrorCode",
"FailurePatternMiningObservation",
"FailurePatternMiningStatus",
"FailurePatternOrdering",
"FailurePatternSummary",
"FailureSource",
"FailureType",
"GitCommit",
"Harness",
Expand Down
16 changes: 16 additions & 0 deletions src/ofw/evaluation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
FailureEvidenceStatus,
FailureType,
)
from ofw.evaluation.failure_curation import (
DeferredFailure,
FailureCuration,
FailureCurationErrorCode,
FailureCurationFailure,
FailureGroup,
FailureGroupMember,
FailureSource,
)
from ofw.evaluation.failure_patterns import (
FailurePatternMiningError,
FailurePatternMiningErrorCode,
Expand All @@ -31,16 +40,23 @@
)

__all__ = [
"DeferredFailure",
"FailureCuration",
"FailureCurationErrorCode",
"FailureCurationFailure",
"FailureDiagnosis",
"FailureDiagnosisError",
"FailureErrorCode",
"FailureEvidenceStatus",
"FailureGroup",
"FailureGroupMember",
"FailurePatternMiningError",
"FailurePatternMiningErrorCode",
"FailurePatternMiningObservation",
"FailurePatternMiningStatus",
"FailurePatternOrdering",
"FailurePatternSummary",
"FailureSource",
"FailureType",
"LangfuseOutcomeStore",
"MineFailurePatternsInput",
Expand Down
Loading