Repository is archived
No release in over 3 years
Toulmin-model argument mapping for LegionIO — claim/grounds/warrant/backing/qualifier/rebuttal argument construction, strength assessment, and soundness evaluation
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

 Project Readme

lex-argument-mapping

Toulmin-model argument mapping for LegionIO — structured claim construction, strength assessment, and soundness evaluation.

What It Does

Models Stephen Toulmin's argumentation framework: claims supported by grounds, justified by warrants, reinforced by backing, hedged by qualifiers, and challenged by rebuttals. The agent can construct formal arguments for its decisions, assess their logical strength, and identify where rebuttals weaken the case.

Core Concept: The Toulmin Model

An argument has six components:

  • Claim: the conclusion being argued for
  • Grounds: factual evidence supporting the claim
  • Warrant: the logical principle connecting grounds to claim
  • Backing: support for the warrant itself
  • Qualifier: epistemic hedge (certainly/presumably/probably/possibly/apparently)
  • Rebuttal: conditions under which the claim would not hold
strength = (grounds_count * 0.3) + (warrant_present * 0.3) + (backing_count * 0.2)
         - sum(rebuttal_penalties)

Usage

client = Legion::Extensions::ArgumentMapping::Client.new

# Build a Toulmin argument
arg = client.create_argument(
  claim: 'we should migrate to Vault for secrets management',
  domain: :architecture,
  warrant: 'centralized secrets reduce credential sprawl',
  qualifier: :presumably
)

# Add supporting components
client.add_argument_ground(argument_id: arg[:id], ground: 'current rotation is manual and error-prone')
client.add_argument_backing(argument_id: arg[:id], backing: 'CIS benchmark recommends centralized secrets')

# Add a rebuttal
client.add_argument_rebuttal(argument_id: arg[:id], content: 'Vault adds operational complexity', impact: 0.4)

# Assess strength
client.assess_argument_strength(argument_id: arg[:id])
# => { strength: 0.72, label: :strong, rebuttal_count: 1 }

# Find strongest arguments
client.strongest_arguments_report(limit: 3)

Integration

Wire into lex-tick's action_selection phase to require formal justification before high-stakes actions. Feed sound_arguments_report into lex-governance proposals for council review.

Development

bundle install
bundle exec rspec
bundle exec rubocop

License

MIT