{"id":47770442,"url":"https://github.com/mateu/treb","last_synced_at":"2026-04-03T09:01:37.783Z","repository":{"id":347643097,"uuid":"1194664397","full_name":"mateu/treb","owner":"mateu","description":"Treb: Bert's quieter attic offshoot IRC bot","archived":false,"fork":false,"pushed_at":"2026-03-28T19:45:39.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T21:09:47.464Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mateu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-28T16:51:26.000Z","updated_at":"2026-03-28T19:45:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mateu/treb","commit_stats":null,"previous_names":["mateu/treb"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mateu/treb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateu%2Ftreb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateu%2Ftreb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateu%2Ftreb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateu%2Ftreb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mateu","download_url":"https://codeload.github.com/mateu/treb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateu%2Ftreb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31344434,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T08:03:20.796Z","status":"ssl_error","status_checked_at":"2026-04-03T08:00:37.834Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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-04-03T09:01:36.872Z","updated_at":"2026-04-03T09:01:37.779Z","avatar_url":"https://github.com/mateu.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# treb\n\nTreb is Bert backwards: a quieter attic offshoot IRC bot.\n\nCurrent baseline:\n- IRC-first behavior\n- mission loaded from `treb.mission.txt`\n- local env contract in `treb.env.example`\n- Perl deps declared in `cpanfile`\n\nThis repo is the clean home for the bot, separate from the earlier Squirt/Koan testbed history.\n\n## Local IRC integration harness (live + deterministic)\n\nA first-pass behavior-regression harness is available at:\n\n- runtime runner: `script/irc_harness.py`\n- wrapper: `script/run-local-irc-harness.sh`\n- deterministic integration test: `t/irc_harness_deterministic.t`\n- evaluator unit test: `test/irc_harness_evaluate.py`\n\nWhat it does:\n\n1. Starts a tiny local IRC server process on `127.0.0.1:6667`.\n2. In deterministic mode (default), starts a fake Ollama-compatible local HTTP endpoint for deterministic model replies.\n   In real mode, skips the fake endpoint and uses a real model backend (configured via env).\n3. Launches **burt_bot** and **treb_bot** as real `perl` processes with dedicated harness env + sqlite DBs.\n4. Launches a simulated human IRC client (`Alice`) in the same channel.\n5. Runs scripted scenarios:\n   - burt_bot joins first, then treb_bot joins.\n   - Human runs an addressed split prompt to burt_bot and treb_bot (addressed bot should reply; non-addressed should not pile on).\n   - Human issues `:time` command (command path check).\n   - Human asks burt_bot to prompt treb_bot (bounded bot-to-bot exchange).\n   - Evaluator checks explicit join order/greet expectation and repeated-line spam guardrail.\n6. Produces transcript + readable behavior artifacts with guardrail evaluation (shape checks, not exact prose matching).\n\nRun it:\n\n```bash\n# deterministic (default; fake model backend)\nscript/run-local-irc-harness.sh\n# or: script/run-local-irc-harness.sh --mode deterministic\n\n# real model mode (opt-in)\nscript/run-local-irc-harness.sh --mode real\n# or: IRC_HARNESS_MODE=real script/run-local-irc-harness.sh\n```\n\n\n### Mode selection and env\n\n- `--mode deterministic|real` (flag takes precedence over env)\n- `IRC_HARNESS_MODE=deterministic|real` (default: `deterministic`)\n\nReal mode assumptions (smallest practical implementation):\n\n- defaults to a real local Ollama endpoint at `http://127.0.0.1:11434`\n- defaults model to `llama3.2:3b`\n- override with:\n  - `IRC_HARNESS_REAL_OLLAMA_URL`\n  - `IRC_HARNESS_REAL_MODEL`\n  - optional `IRC_HARNESS_REAL_ENGINE` (default `Ollama`)\n\nArtifacts land under:\n\n- `log/irc-harness/\u003cmode\u003e-\u003ctimestamp\u003e/transcript.log` (full low-level trace; includes mode/engine/model header)\n- `log/irc-harness/\u003cmode\u003e-\u003ctimestamp\u003e/conversation.log` (high-value joins/scenario markers/messages/evaluator notes)\n- `log/irc-harness/\u003cmode\u003e-\u003ctimestamp\u003e/evaluation.txt` (PASS/FAIL checks)\n- `log/irc-harness/\u003cmode\u003e-\u003ctimestamp\u003e/behavior_report.txt` (sectioned human-readable report)\n- `log/irc-harness/\u003cmode\u003e-\u003ctimestamp\u003e/summary.json` (includes `mode`, `engine`, `model`, `ollama_url`)\n- plus bot process logs: `burt.log`, `treb.log`\n\nThe harness exits non-zero when evaluator checks fail.\n\nNotes:\n- `script/irc_harness.py` is the real harness runner for both deterministic and live/real mode.\n- `t/irc_harness_deterministic.t` is the Perl/TAP integration test that exercises deterministic mode.\n- `test/irc_harness_evaluate.py` is a Python unit test for the harness evaluator logic; it is not the live harness itself.\n\n### Autoresearch-style local evaluator\n\nUse this runner to score a repo state with strict gatekeepers + live green count:\n\n```bash\npython3 script/irc_autoresearch_eval.py\n```\n\nOptions:\n\n- `--live-runs {1,3,5}` (default `3`)\n- `--jobs N` parallel live runs (default `3`; capped to live run count)\n- `--live-mode real|deterministic` (default `real`)\n- `--allow-dirty` to skip clean working-tree gate\n\nIt writes outputs to `log/irc-autoresearch/\u003ctimestamp\u003e/`:\n\n- `summary.json` (machine-readable)\n- `summary.txt` (compact human summary)\n- gatekeeper stdout/stderr logs for `test/irc_harness_evaluate.py`\n\nPrimary score is `live_green_count` (green runs out of N).\nNear-miss/fail labels are secondary diagnostics only.\n\n- `search: 2 Olaf Alders`\n\n## MetaCPAN\n\nTreb supports explicit MetaCPAN lookup commands in channel.\n\nAccepted forms:\n\n- `:cpan Moo`\n- `cpan: Moo`\n- `:cpan module Moo`\n- `:cpan describe Adam`\n- `cpan: describe Adam`\n- `:cpan author OALDERS`\n- `cpan: author OALDERS`\n- `:cpan recent`\n- `:cpan recent 5`\n- `cpan: recent 5`\n\nNotes:\n\n- `:cpan \u003cname\u003e` and `cpan: \u003cname\u003e` are shorthand for module lookup.\n- `describe` returns DESCRIPTION-oriented output.\n- `recent` defaults to 3 and is capped at 7.\n- MetaCPAN commands are command-only; they do not trigger from ordinary conversation.\n\n## Web search\n\nTreb supports an explicit channel search command via Brave Search.\n\nAccepted forms:\n\n- `:search Olaf Alders`\n- `search: Olaf Alders`\n- `:search 5 Olaf Alders`\n- `search: 2 Olaf Alders`\n\nNotes:\n\n- Default result count is 3.\n- Result count is capped at 5.\n- Set `BRAVE_API_KEY` in `treb.env` to enable search.\n- Search is command-only; it does not trigger from ordinary conversation.\n- Optional: `NON_SUBSTANTIVE_ALLOW_PCT=33` allows some otherwise-suppressed non-substantive replies through; default is `0` (strict).\n\n\n## URL summary\n\nTreb supports explicit URL summarization in channel via:\n\n- `:sum \u003curl\u003e`\n- `sum: \u003curl\u003e`\n\nNotes:\n\n- Only `http://` and `https://` URLs are accepted.\n- URL summary is command-only; Treb will not summarize pasted links automatically.\n- The summarizer fetches a single page, extracts readable text, and asks the LLM for a short factual summary.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateu%2Ftreb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmateu%2Ftreb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateu%2Ftreb/lists"}