Class: Rigor::Triage::Hint

Inherits:
Data
  • Object
show all
Defined in:
lib/rigor/triage/hint.rb

Overview

ADR-23 — one heuristic finding produced by the Catalogue.

  • ‘id` — stable kebab-case identifier (`activesupport-core-ext`, …).

  • ‘confidence` — `:likely` or `:possible`. Surfaced in the `[likely …]` / `[possible …]` report framing; a hint is signal, never a verdict.

  • ‘diagnostic_count` — size of the matched cluster.

  • ‘summary` — one-line evidence string (what was matched).

  • ‘action` — the suggested next step, phrased imperatively for a human / agent (ADR-23 WD4: triage never acts itself).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action

Returns:

  • (Object)

    the current value of action



15
16
17
# File 'lib/rigor/triage/hint.rb', line 15

def action
  @action
end

#confidenceObject (readonly)

Returns the value of attribute confidence

Returns:

  • (Object)

    the current value of confidence



15
16
17
# File 'lib/rigor/triage/hint.rb', line 15

def confidence
  @confidence
end

#diagnostic_countObject (readonly)

Returns the value of attribute diagnostic_count

Returns:

  • (Object)

    the current value of diagnostic_count



15
16
17
# File 'lib/rigor/triage/hint.rb', line 15

def diagnostic_count
  @diagnostic_count
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



15
16
17
# File 'lib/rigor/triage/hint.rb', line 15

def id
  @id
end

#summaryObject (readonly)

Returns the value of attribute summary

Returns:

  • (Object)

    the current value of summary



15
16
17
# File 'lib/rigor/triage/hint.rb', line 15

def summary
  @summary
end

Instance Method Details

#to_hObject



16
17
18
19
20
21
22
23
24
# File 'lib/rigor/triage/hint.rb', line 16

def to_h
  {
    "id" => id,
    "confidence" => confidence.to_s,
    "diagnostic_count" => diagnostic_count,
    "summary" => summary,
    "action" => action
  }
end