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
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ uvx --from radon radon cc -s -a src tests plugins/openflywheel/scripts/mcp_serve
python3 ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py plugins/openflywheel/skills/trace-query-planner
python3 ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py plugins/openflywheel/skills/outcome-recorder
python3 ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py plugins/openflywheel/skills/failure-miner
python3 ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py plugins/openflywheel/skills/failure-pattern-miner
python3 ~/.codex/skills/.system/plugin-creator/scripts/validate_plugin.py plugins/openflywheel
```

Expand Down
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.5.0",
"description": "Initialize ITSM-bench harness workspaces, query Langfuse trajectories, and record outcomes and compact failure diagnoses.",
"version": "0.6.0",
"description": "Initialize ITSM-bench harness workspaces, query Langfuse trajectories, and mine compact failure diagnoses and exact patterns.",
"author": {
"name": "OpenFlyWheel"
},
Expand All @@ -10,8 +10,8 @@
"skills": "./skills/",
"interface": {
"displayName": "OpenFlyWheel",
"shortDescription": "Prepare ITSM workspaces and mine failures",
"longDescription": "Initialize an ITSM-bench agent-harness optimization workspace, inspect bounded Langfuse trajectory evidence, record authoritative outcomes, and persist compact failure diagnoses in the prepared local workspace.",
"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.",
"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@0d4af6e0499c54765e2f7784b48b53baf96d1ad5",
"git+https://github.com/divo12/OpenFlyWheel.git@ab0ef62cbe1e6cddf0bfd8ec61374d10120c61aa",
"--with",
"mcp>=1.13,<2",
"openflywheel-mcp"
Expand Down
5 changes: 5 additions & 0 deletions plugins/openflywheel/program_templates/itsm.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ under `.workspace/failures/` before forming a harness hypothesis. Record an inco
diagnosis when the evidence is insufficient. Do not copy Langfuse trace payloads into the
workspace; Langfuse remains their source of truth.

After recording the diagnoses for one bounded run, use `$failure-pattern-miner` and call
`mine_failure_patterns` with only the returned artifact IDs from that run. It groups by failure
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.

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
28 changes: 28 additions & 0 deletions plugins/openflywheel/skills/failure-pattern-miner/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: failure-pattern-miner
description: Group explicit compact OpenFlywheel failure diagnoses by issue type and exact normalized root cause. Use after failure-miner records diagnoses for a bounded comparison scope; do not use to diagnose traces, infer outcomes, create semantic clusters, or edit a harness.
---

# Failure Pattern Miner

Mine repeated patterns from diagnoses already recorded by `$failure-miner`. Use only
artifact IDs returned by `record_failure` from the same prepared workspace and the same
comparison scope, such as one baseline or candidate run. Pass one to fifty unique artifact
IDs to `mine_failure_patterns`; never scan the workspace or substitute trace IDs and paths.

The tool groups supported diagnoses by failure type plus exact normalized root cause. Its
normalizer masks volatile absolute paths, recognizable opaque identifiers, and numbers before
fingerprinting the complete normalized cause; the returned cause text is only a bounded display
excerpt. Results are deterministic exact matches, not semantic clusters: similar wording may
remain separate, and matching wording does not prove one repair will fix every occurrence.
Inconclusive diagnoses remain separate and must not be forced into a pattern.

Read patterns in their declared order: occurrence count descending, distinct task count
descending, latest occurrence descending, then fingerprint ascending. Preserve the returned
fingerprints, normalized causes, task IDs, trace IDs, artifact IDs, and time bounds. A
repeated pattern may prioritize later hypothesis work, but reread its compact diagnosis
artifacts before proposing a harness change.

Do not query Langfuse, call `record_outcome` or `record_failure`, modify diagnosis artifacts,
merge results from unrelated experiment scopes, generate embeddings, infer a broader cause,
or edit the harness 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.5.0"
version = "0.6.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 @@ -31,8 +31,15 @@
FailureDiagnosisError,
FailureErrorCode,
FailureEvidenceStatus,
FailurePatternMiningError,
FailurePatternMiningErrorCode,
FailurePatternMiningObservation,
FailurePatternMiningStatus,
FailurePatternOrdering,
FailurePatternSummary,
FailureType,
LangfuseOutcomeStore,
MineFailurePatternsInput,
OutcomeErrorCode,
OutcomeEvaluation,
OutcomeEvaluationError,
Expand Down Expand Up @@ -109,6 +116,12 @@ def editable(self, path: Path) -> EditableFile:
"FailureDiagnosisError",
"FailureErrorCode",
"FailureEvidenceStatus",
"FailurePatternMiningError",
"FailurePatternMiningErrorCode",
"FailurePatternMiningObservation",
"FailurePatternMiningStatus",
"FailurePatternOrdering",
"FailurePatternSummary",
"FailureType",
"GitCommit",
"Harness",
Expand All @@ -124,6 +137,7 @@ def editable(self, path: Path) -> EditableFile:
"LangfuseProject",
"LangfuseSpan",
"ModelFingerprint",
"MineFailurePatternsInput",
"OutcomeErrorCode",
"OutcomeEvaluation",
"OutcomeEvaluationError",
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_patterns import (
FailurePatternMiningError,
FailurePatternMiningErrorCode,
FailurePatternMiningObservation,
FailurePatternMiningStatus,
FailurePatternOrdering,
FailurePatternSummary,
MineFailurePatternsInput,
)
from ofw.evaluation.langfuse import (
LangfuseOutcomeStore,
OutcomeScoreSubmission,
Expand All @@ -26,8 +35,15 @@
"FailureDiagnosisError",
"FailureErrorCode",
"FailureEvidenceStatus",
"FailurePatternMiningError",
"FailurePatternMiningErrorCode",
"FailurePatternMiningObservation",
"FailurePatternMiningStatus",
"FailurePatternOrdering",
"FailurePatternSummary",
"FailureType",
"LangfuseOutcomeStore",
"MineFailurePatternsInput",
"OutcomeErrorCode",
"OutcomeEvaluation",
"OutcomeEvaluationError",
Expand Down
Loading