{"id":47270300,"url":"https://github.com/legionio/lex-cognitive-resonance","last_synced_at":"2026-03-15T11:00:01.616Z","repository":{"id":344487023,"uuid":"1181770767","full_name":"LegionIO/lex-cognitive-resonance","owner":"LegionIO","description":"Adaptive resonance theory for LegionIO cognition","archived":false,"fork":false,"pushed_at":"2026-03-15T05:43:57.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-15T08:54:30.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LegionIO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-14T15:50:11.000Z","updated_at":"2026-03-15T04:37:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/LegionIO/lex-cognitive-resonance","commit_stats":null,"previous_names":["legionio/lex-cognitive-resonance"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/LegionIO/lex-cognitive-resonance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Flex-cognitive-resonance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Flex-cognitive-resonance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Flex-cognitive-resonance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Flex-cognitive-resonance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LegionIO","download_url":"https://codeload.github.com/LegionIO/lex-cognitive-resonance/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Flex-cognitive-resonance/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30540730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-15T07:17:37.589Z","status":"ssl_error","status_checked_at":"2026-03-15T07:17:31.738Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-15T11:00:00.091Z","updated_at":"2026-03-15T11:00:01.607Z","avatar_url":"https://github.com/LegionIO.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lex-cognitive-resonance\n\nA LegionIO cognitive architecture extension that models pattern recognition using Adaptive Resonance Theory (ART). Input vectors either resonate with known categories or create new ones, controlled by a vigilance parameter that sets the discrimination threshold.\n\n## What It Does\n\nMaintains a registry of **categories**, each represented as a prototype float vector. When a new input is presented:\n\n- If it matches an existing category above the vigilance threshold, the prototype is updated toward the input (learning)\n- If no category meets the threshold, a new category is created (novelty detection)\n\nThe vigilance parameter controls granularity: high vigilance produces many narrow categories; low vigilance produces fewer, broader ones.\n\n## Usage\n\n```ruby\nrequire 'lex-cognitive-resonance'\n\nclient = Legion::Extensions::CognitiveResonance::Client.new\n\n# Present an input vector (normalized 0.0..1.0 floats)\nresult = client.present_input(input: [0.8, 0.6, 0.4, 0.9])\n# =\u003e { success: true, outcome: :new_category, category_id: \"uuid...\", quality: 0.0, label: :new, created: true }\n\n# Present a similar input — resonates with the existing category\nresult = client.present_input(input: [0.75, 0.65, 0.45, 0.85])\n# =\u003e { success: true, outcome: :resonance, category_id: \"uuid...\", quality: 0.94, label: :perfect, created: false }\n\n# Classify without modifying state\nresult = client.classify(input: [0.8, 0.6, 0.4, 0.9])\n# =\u003e { success: true, found: true, category_id: \"uuid...\", quality: 0.99, label: :perfect }\n\n# Tighten vigilance for finer discrimination\nclient.adjust_vigilance(amount: 0.1)\n# =\u003e { success: true, vigilance: 0.8, vigilance_label: :medium, adjustment: 0.1 }\n\n# Full report\nclient.resonance_report\n# =\u003e { success: true, category_count: 3, vigilance: 0.8, vigilance_label: :medium, categories: [...] }\n\n# How many categories exist\nclient.category_count\n# =\u003e { success: true, count: 3 }\n\n# Reset the engine (clears all categories)\nclient.reset_engine\n# =\u003e { success: true, reset: true }\n```\n\n## Development\n\n```bash\nbundle install\nbundle exec rspec\nbundle exec rubocop\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegionio%2Flex-cognitive-resonance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flegionio%2Flex-cognitive-resonance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegionio%2Flex-cognitive-resonance/lists"}