From a8d8f772ee87cf976b03fbbb3cec7f283d976fbb Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:05:55 +0000 Subject: [PATCH 01/13] feat: add redthread ECC bundle (.claude/ecc-tools.json) --- .claude/ecc-tools.json | 285 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 .claude/ecc-tools.json diff --git a/.claude/ecc-tools.json b/.claude/ecc-tools.json new file mode 100644 index 0000000..76fe400 --- /dev/null +++ b/.claude/ecc-tools.json @@ -0,0 +1,285 @@ +{ + "version": "1.3", + "schemaVersion": "1.0", + "generatedBy": "ecc-tools", + "generatedAt": "2026-06-24T14:04:58.079Z", + "repo": "https://github.com/matheusht/redthread", + "referenceSetReadiness": { + "score": 14, + "present": 1, + "total": 7, + "items": [ + { + "id": "deep-analyzer-corpus", + "label": "Deep analyzer corpus", + "status": "missing", + "evidence": [], + "recommendation": "Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions." + }, + { + "id": "rag-evaluator", + "label": "RAG/evaluator comparison", + "status": "missing", + "evidence": [], + "recommendation": "Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior." + }, + { + "id": "pr-salvage", + "label": "PR salvage/review corpus", + "status": "missing", + "evidence": [], + "recommendation": "Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation." + }, + { + "id": "discussion-triage", + "label": "Discussion triage corpus", + "status": "missing", + "evidence": [], + "recommendation": "Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications." + }, + { + "id": "harness-compatibility", + "label": "Harness compatibility", + "status": "present", + "evidence": [ + "tests/test_gepa_adapter.py" + ], + "recommendation": "Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces." + }, + { + "id": "security-evidence", + "label": "Security evidence", + "status": "missing", + "evidence": [], + "recommendation": "Attach security evidence such as SBOMs, SARIF, audit reports, or AgentShield evidence packs." + }, + { + "id": "ci-failure-mode", + "label": "CI failure-mode evidence", + "status": "missing", + "evidence": [], + "recommendation": "Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes." + } + ] + }, + "profiles": { + "requested": "research", + "recommended": "research", + "effective": "developer", + "requestedAlias": "research", + "recommendedAlias": "research", + "effectiveAlias": "developer" + }, + "requestedProfile": "research", + "profile": "developer", + "recommendedProfile": "research", + "effectiveProfile": "developer", + "tier": "free", + "requestedComponents": [ + "repo-baseline", + "workflow-automation", + "research-tooling" + ], + "selectedComponents": [ + "repo-baseline", + "workflow-automation" + ], + "requestedAddComponents": [], + "requestedRemoveComponents": [], + "blockedRemovalComponents": [], + "tierFilteredComponents": [ + "research-tooling" + ], + "requestedRootPackages": [ + "runtime-core", + "workflow-pack", + "research-pack" + ], + "selectedRootPackages": [ + "runtime-core", + "workflow-pack" + ], + "requestedPackages": [ + "runtime-core", + "workflow-pack", + "research-pack" + ], + "requestedAddPackages": [], + "requestedRemovePackages": [], + "selectedPackages": [ + "runtime-core", + "workflow-pack" + ], + "packages": [ + "runtime-core", + "workflow-pack" + ], + "blockedRemovalPackages": [], + "tierFilteredRootPackages": [ + "research-pack" + ], + "tierFilteredPackages": [ + "research-pack" + ], + "conflictingPackages": [], + "dependencyGraph": { + "runtime-core": [], + "workflow-pack": [ + "runtime-core" + ] + }, + "resolutionOrder": [ + "runtime-core", + "workflow-pack" + ], + "requestedModules": [ + "runtime-core", + "workflow-pack", + "research-pack" + ], + "selectedModules": [ + "runtime-core", + "workflow-pack" + ], + "modules": [ + "runtime-core", + "workflow-pack" + ], + "managedFiles": [ + ".claude/skills/redthread/SKILL.md", + ".agents/skills/redthread/SKILL.md", + ".agents/skills/redthread/agents/openai.yaml", + ".claude/identity.json", + ".codex/config.toml", + ".codex/AGENTS.md", + ".codex/agents/explorer.toml", + ".codex/agents/reviewer.toml", + ".codex/agents/docs-researcher.toml", + ".claude/homunculus/instincts/inherited/redthread-instincts.yaml", + ".claude/commands/add-new-research-module.md", + ".claude/commands/add-or-update-research-dependency.md" + ], + "packageFiles": { + "runtime-core": [ + ".claude/skills/redthread/SKILL.md", + ".agents/skills/redthread/SKILL.md", + ".agents/skills/redthread/agents/openai.yaml", + ".claude/identity.json", + ".codex/config.toml", + ".codex/AGENTS.md", + ".codex/agents/explorer.toml", + ".codex/agents/reviewer.toml", + ".codex/agents/docs-researcher.toml", + ".claude/homunculus/instincts/inherited/redthread-instincts.yaml" + ], + "workflow-pack": [ + ".claude/commands/add-new-research-module.md", + ".claude/commands/add-or-update-research-dependency.md" + ] + }, + "moduleFiles": { + "runtime-core": [ + ".claude/skills/redthread/SKILL.md", + ".agents/skills/redthread/SKILL.md", + ".agents/skills/redthread/agents/openai.yaml", + ".claude/identity.json", + ".codex/config.toml", + ".codex/AGENTS.md", + ".codex/agents/explorer.toml", + ".codex/agents/reviewer.toml", + ".codex/agents/docs-researcher.toml", + ".claude/homunculus/instincts/inherited/redthread-instincts.yaml" + ], + "workflow-pack": [ + ".claude/commands/add-new-research-module.md", + ".claude/commands/add-or-update-research-dependency.md" + ] + }, + "files": [ + { + "moduleId": "runtime-core", + "path": ".claude/skills/redthread/SKILL.md", + "description": "Repository-specific Claude Code skill generated from git history." + }, + { + "moduleId": "runtime-core", + "path": ".agents/skills/redthread/SKILL.md", + "description": "Codex-facing copy of the generated repository skill." + }, + { + "moduleId": "runtime-core", + "path": ".agents/skills/redthread/agents/openai.yaml", + "description": "Codex skill metadata so the repo skill appears cleanly in the skill interface." + }, + { + "moduleId": "runtime-core", + "path": ".claude/identity.json", + "description": "Suggested identity.json baseline derived from repository conventions." + }, + { + "moduleId": "runtime-core", + "path": ".codex/config.toml", + "description": "Repo-local Codex MCP and multi-agent baseline aligned with ECC defaults." + }, + { + "moduleId": "runtime-core", + "path": ".codex/AGENTS.md", + "description": "Codex usage guide that points at the generated repo skill and workflow bundle." + }, + { + "moduleId": "runtime-core", + "path": ".codex/agents/explorer.toml", + "description": "Read-only explorer role config for Codex multi-agent work." + }, + { + "moduleId": "runtime-core", + "path": ".codex/agents/reviewer.toml", + "description": "Read-only reviewer role config focused on correctness and security." + }, + { + "moduleId": "runtime-core", + "path": ".codex/agents/docs-researcher.toml", + "description": "Read-only docs researcher role config for API verification." + }, + { + "moduleId": "runtime-core", + "path": ".claude/homunculus/instincts/inherited/redthread-instincts.yaml", + "description": "Continuous-learning instincts derived from repository patterns." + }, + { + "moduleId": "workflow-pack", + "path": ".claude/commands/add-new-research-module.md", + "description": "Workflow command scaffold for add-new-research-module." + }, + { + "moduleId": "workflow-pack", + "path": ".claude/commands/add-or-update-research-dependency.md", + "description": "Workflow command scaffold for add-or-update-research-dependency." + } + ], + "workflows": [ + { + "command": "add-new-research-module", + "path": ".claude/commands/add-new-research-module.md" + }, + { + "command": "add-or-update-research-dependency", + "path": ".claude/commands/add-or-update-research-dependency.md" + } + ], + "adapters": { + "claudeCode": { + "skillPath": ".claude/skills/redthread/SKILL.md", + "identityPath": ".claude/identity.json", + "commandPaths": [ + ".claude/commands/add-new-research-module.md", + ".claude/commands/add-or-update-research-dependency.md" + ] + }, + "codex": { + "configPath": ".codex/config.toml", + "agentsGuidePath": ".codex/AGENTS.md", + "skillPath": ".agents/skills/redthread/SKILL.md" + } + } +} \ No newline at end of file From 1878080a5f83f65b9e0ec730784e39075135cecd Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:05:57 +0000 Subject: [PATCH 02/13] feat: add redthread ECC bundle (.claude/skills/redthread/SKILL.md) --- .claude/skills/redthread/SKILL.md | 117 ++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 .claude/skills/redthread/SKILL.md diff --git a/.claude/skills/redthread/SKILL.md b/.claude/skills/redthread/SKILL.md new file mode 100644 index 0000000..bebe594 --- /dev/null +++ b/.claude/skills/redthread/SKILL.md @@ -0,0 +1,117 @@ +```markdown +# redthread Development Patterns + +> Auto-generated skill from repository analysis + +## Overview +This skill teaches the core development patterns and workflows used in the `redthread` Python codebase. You'll learn the project's coding conventions, how to add new research modules or phases, manage research dependencies, and follow the repository's commit and testing standards. This guide is designed to help contributors maintain consistency and quality across the codebase. + +## Coding Conventions + +### File Naming +- Use **snake_case** for all Python files. + - Example: `gepa_phase.py`, `test_gepa_adapter.py` + +### Import Style +- Use **relative imports** within modules. + - Example: + ```python + from .models import GEPAResult + from . import gepa_adapter + ``` + +### Export Style +- Use **named exports** (explicitly define what is exported from each module). + - Example: + ```python + __all__ = ["GEPAResult", "run_gepa_phase"] + ``` + +### Commit Messages +- Follow **conventional commit** style. + - Prefixes: `feat`, `docs` + - Example: `feat: add GEPA phase 0 module and tests` + +## Workflows + +### Add New Research Module +**Trigger:** When adding a new research phase, module, or major algorithmic component (e.g., GEPA phase, Pareto selection, adapter) to the research pipeline. +**Command:** `/new-research-module` + +1. **Create or modify Python modules** under `src/redthread/research/`. + - Example: `src/redthread/research/gepa_phase.py` +2. **Update or add test files** under `tests/`. + - Example: `tests/test_gepa_phase0.py` +3. **Update supporting files** as needed to integrate the new module. + - Example: `src/redthread/research/models.py`, `workspace.py` +4. **Ensure code quality and correctness:** + - Run `ruff` for linting. + - Run `mypy` for type checking. + - Run all relevant tests and ensure they pass. + +**Example:** +```python +# src/redthread/research/gepa_phase.py +from .models import GEPAResult + +def run_gepa_phase(data): + # Implementation here + pass + +__all__ = ["run_gepa_phase"] +``` + +```python +# tests/test_gepa_phase0.py +from src.redthread.research.gepa_phase import run_gepa_phase + +def test_gepa_phase_basic(): + result = run_gepa_phase(sample_data) + assert result is not None +``` + +--- + +### Add or Update Research Dependency +**Trigger:** When introducing or updating a research-related dependency (e.g., gepa, litellm), especially for new research phases or scripts. +**Command:** `/add-research-dependency` + +1. **Edit `pyproject.toml`** to add or update the dependency under an `[optional]` group. + - Example: + ```toml + [project.optional-dependencies] + research-gepa = ["gepa>=1.2.0"] + ``` +2. **Update `uv.lock`** to reflect the new or updated dependency. +3. **Import the dependency lazily or optionally** in the relevant research module. + - Example: + ```python + try: + import gepa + except ImportError: + gepa = None + ``` +4. **Verify that core installs do not require the optional dependency.** + - Ensure the main package can be installed without the research dependency unless explicitly requested. + +--- + +## Testing Patterns + +- **Test files** are named with the pattern `test_*.py` and located in the `tests/` directory. + - Example: `tests/test_gepa_adapter.py` +- **Testing framework** is not explicitly specified, but tests follow standard Python test conventions. +- **Example test:** + ```python + def test_gepa_adapter_runs(): + from src.redthread.research.gepa_adapter import run_adapter + assert run_adapter(sample_input) == expected_output + ``` + +## Commands + +| Command | Purpose | +|------------------------|----------------------------------------------------------------| +| /new-research-module | Scaffold and integrate a new research module or phase | +| /add-research-dependency | Add or update an optional research dependency for research | +``` From 97291926770ccfd59e3da2f82cf0482947b019a1 Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:05:59 +0000 Subject: [PATCH 03/13] feat: add redthread ECC bundle (.agents/skills/redthread/SKILL.md) --- .agents/skills/redthread/SKILL.md | 117 ++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 .agents/skills/redthread/SKILL.md diff --git a/.agents/skills/redthread/SKILL.md b/.agents/skills/redthread/SKILL.md new file mode 100644 index 0000000..bebe594 --- /dev/null +++ b/.agents/skills/redthread/SKILL.md @@ -0,0 +1,117 @@ +```markdown +# redthread Development Patterns + +> Auto-generated skill from repository analysis + +## Overview +This skill teaches the core development patterns and workflows used in the `redthread` Python codebase. You'll learn the project's coding conventions, how to add new research modules or phases, manage research dependencies, and follow the repository's commit and testing standards. This guide is designed to help contributors maintain consistency and quality across the codebase. + +## Coding Conventions + +### File Naming +- Use **snake_case** for all Python files. + - Example: `gepa_phase.py`, `test_gepa_adapter.py` + +### Import Style +- Use **relative imports** within modules. + - Example: + ```python + from .models import GEPAResult + from . import gepa_adapter + ``` + +### Export Style +- Use **named exports** (explicitly define what is exported from each module). + - Example: + ```python + __all__ = ["GEPAResult", "run_gepa_phase"] + ``` + +### Commit Messages +- Follow **conventional commit** style. + - Prefixes: `feat`, `docs` + - Example: `feat: add GEPA phase 0 module and tests` + +## Workflows + +### Add New Research Module +**Trigger:** When adding a new research phase, module, or major algorithmic component (e.g., GEPA phase, Pareto selection, adapter) to the research pipeline. +**Command:** `/new-research-module` + +1. **Create or modify Python modules** under `src/redthread/research/`. + - Example: `src/redthread/research/gepa_phase.py` +2. **Update or add test files** under `tests/`. + - Example: `tests/test_gepa_phase0.py` +3. **Update supporting files** as needed to integrate the new module. + - Example: `src/redthread/research/models.py`, `workspace.py` +4. **Ensure code quality and correctness:** + - Run `ruff` for linting. + - Run `mypy` for type checking. + - Run all relevant tests and ensure they pass. + +**Example:** +```python +# src/redthread/research/gepa_phase.py +from .models import GEPAResult + +def run_gepa_phase(data): + # Implementation here + pass + +__all__ = ["run_gepa_phase"] +``` + +```python +# tests/test_gepa_phase0.py +from src.redthread.research.gepa_phase import run_gepa_phase + +def test_gepa_phase_basic(): + result = run_gepa_phase(sample_data) + assert result is not None +``` + +--- + +### Add or Update Research Dependency +**Trigger:** When introducing or updating a research-related dependency (e.g., gepa, litellm), especially for new research phases or scripts. +**Command:** `/add-research-dependency` + +1. **Edit `pyproject.toml`** to add or update the dependency under an `[optional]` group. + - Example: + ```toml + [project.optional-dependencies] + research-gepa = ["gepa>=1.2.0"] + ``` +2. **Update `uv.lock`** to reflect the new or updated dependency. +3. **Import the dependency lazily or optionally** in the relevant research module. + - Example: + ```python + try: + import gepa + except ImportError: + gepa = None + ``` +4. **Verify that core installs do not require the optional dependency.** + - Ensure the main package can be installed without the research dependency unless explicitly requested. + +--- + +## Testing Patterns + +- **Test files** are named with the pattern `test_*.py` and located in the `tests/` directory. + - Example: `tests/test_gepa_adapter.py` +- **Testing framework** is not explicitly specified, but tests follow standard Python test conventions. +- **Example test:** + ```python + def test_gepa_adapter_runs(): + from src.redthread.research.gepa_adapter import run_adapter + assert run_adapter(sample_input) == expected_output + ``` + +## Commands + +| Command | Purpose | +|------------------------|----------------------------------------------------------------| +| /new-research-module | Scaffold and integrate a new research module or phase | +| /add-research-dependency | Add or update an optional research dependency for research | +``` From 1a9057f2ba7d625b88f79032e16814cae132b73c Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:06:01 +0000 Subject: [PATCH 04/13] feat: add redthread ECC bundle (.agents/skills/redthread/agents/openai.yaml) --- .agents/skills/redthread/agents/openai.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .agents/skills/redthread/agents/openai.yaml diff --git a/.agents/skills/redthread/agents/openai.yaml b/.agents/skills/redthread/agents/openai.yaml new file mode 100644 index 0000000..cb8997a --- /dev/null +++ b/.agents/skills/redthread/agents/openai.yaml @@ -0,0 +1,6 @@ +interface: + display_name: "Redthread" + short_description: "Repo-specific patterns and workflows for redthread" + default_prompt: "Use the redthread repo skill to follow existing architecture, testing, and workflow conventions." +policy: + allow_implicit_invocation: true \ No newline at end of file From ffddce3e263103e32313f0131ee5a793125d1312 Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:06:05 +0000 Subject: [PATCH 05/13] feat: add redthread ECC bundle (.claude/identity.json) --- .claude/identity.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .claude/identity.json diff --git a/.claude/identity.json b/.claude/identity.json new file mode 100644 index 0000000..06b46e6 --- /dev/null +++ b/.claude/identity.json @@ -0,0 +1,14 @@ +{ + "version": "2.0", + "technicalLevel": "technical", + "preferredStyle": { + "verbosity": "minimal", + "codeComments": true, + "explanations": true + }, + "domains": [ + "python" + ], + "suggestedBy": "ecc-tools-repo-analysis", + "createdAt": "2026-06-24T14:05:30.991Z" +} \ No newline at end of file From 7b64e86d52190aa6c99ff20b2e368c0fa3f8f6a9 Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:06:07 +0000 Subject: [PATCH 06/13] feat: add redthread ECC bundle (.codex/config.toml) --- .codex/config.toml | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .codex/config.toml diff --git a/.codex/config.toml b/.codex/config.toml new file mode 100644 index 0000000..bc1ee67 --- /dev/null +++ b/.codex/config.toml @@ -0,0 +1,48 @@ +#:schema https://developers.openai.com/codex/config-schema.json + +# ECC Tools generated Codex baseline +approval_policy = "on-request" +sandbox_mode = "workspace-write" +web_search = "live" + +[mcp_servers.github] +command = "npx" +args = ["-y", "@modelcontextprotocol/server-github"] + +[mcp_servers.context7] +command = "npx" +args = ["-y", "@upstash/context7-mcp@latest"] + +[mcp_servers.exa] +url = "https://mcp.exa.ai/mcp" + +[mcp_servers.memory] +command = "npx" +args = ["-y", "@modelcontextprotocol/server-memory"] + +[mcp_servers.playwright] +command = "npx" +args = ["-y", "@playwright/mcp@latest", "--extension"] + +[mcp_servers.sequential-thinking] +command = "npx" +args = ["-y", "@modelcontextprotocol/server-sequential-thinking"] + +[features] +multi_agent = true + +[agents] +max_threads = 6 +max_depth = 1 + +[agents.explorer] +description = "Read-only codebase explorer for gathering evidence before changes are proposed." +config_file = "agents/explorer.toml" + +[agents.reviewer] +description = "PR reviewer focused on correctness, security, and missing tests." +config_file = "agents/reviewer.toml" + +[agents.docs_researcher] +description = "Documentation specialist that verifies APIs, framework behavior, and release notes." +config_file = "agents/docs-researcher.toml" \ No newline at end of file From f40ebb98d8d590e203f813ab9e72c81f81abb08b Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:06:09 +0000 Subject: [PATCH 07/13] feat: add redthread ECC bundle (.codex/AGENTS.md) --- .codex/AGENTS.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .codex/AGENTS.md diff --git a/.codex/AGENTS.md b/.codex/AGENTS.md new file mode 100644 index 0000000..baf04be --- /dev/null +++ b/.codex/AGENTS.md @@ -0,0 +1,27 @@ +# ECC for Codex CLI + +This supplements the root `AGENTS.md` with a repo-local ECC baseline. + +## Repo Skill + +- Repo-generated Codex skill: `.agents/skills/redthread/SKILL.md` +- Claude-facing companion skill: `.claude/skills/redthread/SKILL.md` +- Keep user-specific credentials and private MCPs in `~/.codex/config.toml`, not in this repo. + +## MCP Baseline + +Treat `.codex/config.toml` as the default ECC-safe baseline for work in this repository. +The generated baseline enables GitHub, Context7, Exa, Memory, Playwright, and Sequential Thinking. + +## Multi-Agent Support + +- Explorer: read-only evidence gathering +- Reviewer: correctness, security, and regression review +- Docs researcher: API and release-note verification + +## Workflow Files + +- `.claude/commands/add-new-research-module.md` +- `.claude/commands/add-or-update-research-dependency.md` + +Use these workflow files as reusable task scaffolds when the detected repository workflows recur. \ No newline at end of file From f5ff2e1734611b3d111aea463d63ef3a74775a60 Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:06:11 +0000 Subject: [PATCH 08/13] feat: add redthread ECC bundle (.codex/agents/explorer.toml) --- .codex/agents/explorer.toml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .codex/agents/explorer.toml diff --git a/.codex/agents/explorer.toml b/.codex/agents/explorer.toml new file mode 100644 index 0000000..732df7a --- /dev/null +++ b/.codex/agents/explorer.toml @@ -0,0 +1,9 @@ +model = "gpt-5.4" +model_reasoning_effort = "medium" +sandbox_mode = "read-only" + +developer_instructions = """ +Stay in exploration mode. +Trace the real execution path, cite files and symbols, and avoid proposing fixes unless the parent agent asks for them. +Prefer targeted search and file reads over broad scans. +""" \ No newline at end of file From 4ad6fbc82ece5231a2aa3fbc79c4342272df526f Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:06:13 +0000 Subject: [PATCH 09/13] feat: add redthread ECC bundle (.codex/agents/reviewer.toml) --- .codex/agents/reviewer.toml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .codex/agents/reviewer.toml diff --git a/.codex/agents/reviewer.toml b/.codex/agents/reviewer.toml new file mode 100644 index 0000000..b13ed9c --- /dev/null +++ b/.codex/agents/reviewer.toml @@ -0,0 +1,9 @@ +model = "gpt-5.4" +model_reasoning_effort = "high" +sandbox_mode = "read-only" + +developer_instructions = """ +Review like an owner. +Prioritize correctness, security, behavioral regressions, and missing tests. +Lead with concrete findings and avoid style-only feedback unless it hides a real bug. +""" \ No newline at end of file From e16077e52d4ec74b01ec27d6baff4572b9d7755c Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:06:14 +0000 Subject: [PATCH 10/13] feat: add redthread ECC bundle (.codex/agents/docs-researcher.toml) --- .codex/agents/docs-researcher.toml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .codex/agents/docs-researcher.toml diff --git a/.codex/agents/docs-researcher.toml b/.codex/agents/docs-researcher.toml new file mode 100644 index 0000000..0daae57 --- /dev/null +++ b/.codex/agents/docs-researcher.toml @@ -0,0 +1,9 @@ +model = "gpt-5.4" +model_reasoning_effort = "medium" +sandbox_mode = "read-only" + +developer_instructions = """ +Verify APIs, framework behavior, and release-note claims against primary documentation before changes land. +Cite the exact docs or file paths that support each claim. +Do not invent undocumented behavior. +""" \ No newline at end of file From cb9d25b6926db058a9b3ed634679419f4d26644c Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:06:16 +0000 Subject: [PATCH 11/13] feat: add redthread ECC bundle (.claude/homunculus/instincts/inherited/redthread-instincts.yaml) --- .../inherited/redthread-instincts.yaml | 449 ++++++++++++++++++ 1 file changed, 449 insertions(+) create mode 100644 .claude/homunculus/instincts/inherited/redthread-instincts.yaml diff --git a/.claude/homunculus/instincts/inherited/redthread-instincts.yaml b/.claude/homunculus/instincts/inherited/redthread-instincts.yaml new file mode 100644 index 0000000..713071e --- /dev/null +++ b/.claude/homunculus/instincts/inherited/redthread-instincts.yaml @@ -0,0 +1,449 @@ +# Instincts generated from https://github.com/matheusht/redthread +# Generated: 2026-06-24T14:05:30.991Z +# Version: 2.0 +# NOTE: This file supplements (does not replace) any existing curated instincts. +# High-confidence manually curated instincts should be preserved alongside these. + +--- +id: redthread-commit-conventional +trigger: "when writing a commit message" +confidence: 0.85 +domain: git +source: repo-analysis +source_repo: https://github.com/matheusht/redthread +--- + +# Redthread Commit Conventional + +## Action + +Use conventional commit format with prefixes: feat, docs + +## Evidence + +- 5 commits analyzed +- Detected conventional commit pattern +- Examples: feat(research): GEPA Phase 0 shadow harness + per-objective plumbing, docs: change repo state + +--- +id: redthread-commit-length +trigger: "when writing a commit message" +confidence: 0.6 +domain: git +source: repo-analysis +source_repo: https://github.com/matheusht/redthread +--- + +# Redthread Commit Length + +## Action + +Write moderate-length commit messages (~60 characters) + +## Evidence + +- Average commit message length: 60 chars +- Based on 5 commits + +--- +id: redthread-naming-files +trigger: "when creating a new file" +confidence: 0.8 +domain: code-style +source: repo-analysis +source_repo: https://github.com/matheusht/redthread +--- + +# Redthread Naming Files + +## Action + +Use snake_case naming convention + +## Evidence + +- Analyzed file naming patterns in repository +- Dominant pattern: snake_case + +--- +id: redthread-import-relative +trigger: "when importing modules" +confidence: 0.75 +domain: code-style +source: repo-analysis +source_repo: https://github.com/matheusht/redthread +--- + +# Redthread Import Relative + +## Action + +Use relative imports for project files + +## Evidence + +- Import analysis shows relative import pattern +- Example: import { x } from '../lib/x' + +--- +id: redthread-export-style +trigger: "when exporting from a module" +confidence: 0.7 +domain: code-style +source: repo-analysis +source_repo: https://github.com/matheusht/redthread +--- + +# Redthread Export Style + +## Action + +Prefer named exports + +## Evidence + +- Export pattern analysis +- Dominant style: named + +--- +id: redthread-test-separate +trigger: "when writing tests" +confidence: 0.8 +domain: testing +source: repo-analysis +source_repo: https://github.com/matheusht/redthread +--- + +# Redthread Test Separate + +## Action + +Place tests in the tests/ or __tests__/ directory, mirroring src structure + +## Evidence + +- Separate test directory pattern detected +- Tests live in dedicated test folders + +--- +id: redthread-test-naming +trigger: "when creating a test file" +confidence: 0.85 +domain: testing +source: repo-analysis +source_repo: https://github.com/matheusht/redthread +--- + +# Redthread Test Naming + +## Action + +Name test files using the pattern: *.test.ts + +## Evidence + +- File pattern: *.test.ts +- Consistent across test files + +--- +id: redthread-workflow-add-new-research-module +trigger: "when doing add new research module" +confidence: 0.6 +domain: workflow +source: repo-analysis +source_repo: https://github.com/matheusht/redthread +--- + +# Redthread Workflow Add New Research Module + +## Action + +Follow the add-new-research-module workflow: +1. Create or modify one or more new Python modules under src/redthread/research/ (e.g., gepa_phase.py, gepa_adapter.py, gepa_pareto.py, etc.) +2. Update or add corresponding test files under tests/ (e.g., test_gepa_phase0.py, test_gepa_adapter.py, test_gepa_pareto.py) +3. Update or create any necessary supporting files (e.g., models.py, workspace.py) to integrate the new module +4. Ensure ruff and mypy pass, and all relevant tests are green + +## Evidence + +- Workflow detected from commit patterns +- Frequency: ~2x per month +- Files: src/redthread/research/*.py, tests/test_*.py + +--- +id: redthread-workflow-add-or-update-research-dependency +trigger: "when doing add or update research dependency" +confidence: 0.6 +domain: workflow +source: repo-analysis +source_repo: https://github.com/matheusht/redthread +--- + +# Redthread Workflow Add Or Update Research Dependency + +## Action + +Follow the add-or-update-research-dependency workflow: +1. Edit pyproject.toml to add or update the dependency under an [optional] group (e.g., [research-gepa]) +2. Update uv.lock to reflect the new/updated dependency +3. Ensure that the dependency is imported lazily or optionally in the relevant research module +4. Verify that core installs do not require the optional dependency + +## Evidence + +- Workflow detected from commit patterns +- Frequency: ~2x per month +- Files: pyproject.toml, uv.lock, src/redthread/research/*.py + +--- +id: redthread-instinct-file-naming +trigger: "When creating or renaming a source file" +confidence: 0.9 +domain: code-style +source: repo-analysis +source_repo: matheusht/redthread +--- + +# Redthread Instinct File Naming + +## Action + +Use snake_case for file names + +## Evidence + +- Pattern in src/redthread/research/*.py +- Architecture namingConventions.files: snake_case + +--- +id: redthread-instinct-function-naming +trigger: "When defining a new function" +confidence: 0.8 +domain: code-style +source: repo-analysis +source_repo: matheusht/redthread +--- + +# Redthread Instinct Function Naming + +## Action + +Use camelCase for function names + +## Evidence + +- Architecture namingConventions.functions: camelCase + +--- +id: redthread-instinct-class-naming +trigger: "When defining a new class" +confidence: 0.9 +domain: code-style +source: repo-analysis +source_repo: matheusht/redthread +--- + +# Redthread Instinct Class Naming + +## Action + +Use PascalCase for class names + +## Evidence + +- Architecture namingConventions.classes: PascalCase + +--- +id: redthread-instinct-constant-naming +trigger: "When defining a constant" +confidence: 0.9 +domain: code-style +source: repo-analysis +source_repo: matheusht/redthread +--- + +# Redthread Instinct Constant Naming + +## Action + +Use SCREAMING_SNAKE_CASE for constant names + +## Evidence + +- Architecture namingConventions.constants: SCREAMING_SNAKE_CASE + +--- +id: redthread-instinct-relative-imports +trigger: "When importing modules within the package" +confidence: 0.8 +domain: code-style +source: repo-analysis +source_repo: matheusht/redthread +--- + +# Redthread Instinct Relative Imports + +## Action + +Use relative imports + +## Evidence + +- Architecture importStyle: relative + +--- +id: redthread-instinct-named-exports +trigger: "When exporting functions or classes" +confidence: 0.7 +domain: code-style +source: repo-analysis +source_repo: matheusht/redthread +--- + +# Redthread Instinct Named Exports + +## Action + +Use named exports (do not use wildcard or default exports) + +## Evidence + +- Architecture exportStyle: named + +--- +id: redthread-instinct-test-file-location +trigger: "When adding or updating tests" +confidence: 0.9 +domain: testing +source: repo-analysis +source_repo: matheusht/redthread +--- + +# Redthread Instinct Test File Location + +## Action + +Place test files in the separate tests/ directory, following the pattern tests/test_*.py + +## Evidence + +- Pattern in tests/test_*.py +- Architecture testLocation: separate + +--- +id: redthread-instinct-test-type-unit +trigger: "When writing tests" +confidence: 0.8 +domain: testing +source: repo-analysis +source_repo: matheusht/redthread +--- + +# Redthread Instinct Test Type Unit + +## Action + +Write unit tests for new or modified modules + +## Evidence + +- Testing testTypes: unit + +--- +id: redthread-instinct-test-pattern-py +trigger: "When naming a test file" +confidence: 0.9 +domain: testing +source: repo-analysis +source_repo: matheusht/redthread +--- + +# Redthread Instinct Test Pattern Py + +## Action + +Use the pattern test_*.py for test file names + +## Evidence + +- Pattern in tests/test_*.py + +--- +id: redthread-instinct-git-commit-prefix +trigger: "When writing a commit message" +confidence: 0.9 +domain: git +source: repo-analysis +source_repo: matheusht/redthread +--- + +# Redthread Instinct Git Commit Prefix + +## Action + +Use a conventional commit prefix (e.g., feat, docs) followed by a scope in parentheses if applicable + +## Evidence + +- feat(research): GEPA Phase 0 shadow harness + per-objective plumbing +- docs: change repo state + +--- +id: redthread-instinct-git-commit-length +trigger: "When writing a commit message" +confidence: 0.7 +domain: git +source: repo-analysis +source_repo: matheusht/redthread +--- + +# Redthread Instinct Git Commit Length + +## Action + +Keep the commit message concise, around 60 characters on average + +## Evidence + +- commits.averageLength: 60 + +--- +id: redthread-instinct-add-new-research-module +trigger: "When adding a new research phase, module, or major algorithmic component" +confidence: 0.95 +domain: workflow +source: repo-analysis +source_repo: matheusht/redthread +--- + +# Redthread Instinct Add New Research Module + +## Action + +Create or modify Python modules in src/redthread/research/, add or update corresponding tests in tests/, update supporting files as needed, and ensure ruff, mypy, and tests all pass + +## Evidence + +- Workflow: add-new-research-module +- Example commit sequence for new research modules + +--- +id: redthread-instinct-add-or-update-research-dependency +trigger: "When introducing or updating a research-related dependency" +confidence: 0.9 +domain: workflow +source: repo-analysis +source_repo: matheusht/redthread +--- + +# Redthread Instinct Add Or Update Research Dependency + +## Action + +Edit pyproject.toml to add/update the dependency under an [optional] group, update uv.lock, ensure lazy/optional import in relevant research module, and verify core installs do not require the dependency + +## Evidence + +- Workflow: add-or-update-research-dependency +- Example commit sequence for dependency updates + From cfde8a3d3f07b8ca055a966564a6befc3301bc15 Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:06:18 +0000 Subject: [PATCH 12/13] feat: add redthread ECC bundle (.claude/commands/add-new-research-module.md) --- .claude/commands/add-new-research-module.md | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .claude/commands/add-new-research-module.md diff --git a/.claude/commands/add-new-research-module.md b/.claude/commands/add-new-research-module.md new file mode 100644 index 0000000..9f64717 --- /dev/null +++ b/.claude/commands/add-new-research-module.md @@ -0,0 +1,37 @@ +--- +name: add-new-research-module +description: Workflow command scaffold for add-new-research-module in redthread. +allowed_tools: ["Bash", "Read", "Write", "Grep", "Glob"] +--- + +# /add-new-research-module + +Use this workflow when working on **add-new-research-module** in `redthread`. + +## Goal + +Implements a new research module or phase, including code, tests, and plumbing for new GEPA phases or components. + +## Common Files + +- `src/redthread/research/*.py` +- `tests/test_*.py` + +## Suggested Sequence + +1. Understand the current state and failure mode before editing. +2. Make the smallest coherent change that satisfies the workflow goal. +3. Run the most relevant verification for touched files. +4. Summarize what changed and what still needs review. + +## Typical Commit Signals + +- Create or modify one or more new Python modules under src/redthread/research/ (e.g., gepa_phase.py, gepa_adapter.py, gepa_pareto.py, etc.) +- Update or add corresponding test files under tests/ (e.g., test_gepa_phase0.py, test_gepa_adapter.py, test_gepa_pareto.py) +- Update or create any necessary supporting files (e.g., models.py, workspace.py) to integrate the new module +- Ensure ruff and mypy pass, and all relevant tests are green + +## Notes + +- Treat this as a scaffold, not a hard-coded script. +- Update the command if the workflow evolves materially. \ No newline at end of file From 45f7ee60a2389788c2880320c198fe0347134f41 Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:06:20 +0000 Subject: [PATCH 13/13] feat: add redthread ECC bundle (.claude/commands/add-or-update-research-dependency.md) --- .../add-or-update-research-dependency.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .claude/commands/add-or-update-research-dependency.md diff --git a/.claude/commands/add-or-update-research-dependency.md b/.claude/commands/add-or-update-research-dependency.md new file mode 100644 index 0000000..9bf5051 --- /dev/null +++ b/.claude/commands/add-or-update-research-dependency.md @@ -0,0 +1,38 @@ +--- +name: add-or-update-research-dependency +description: Workflow command scaffold for add-or-update-research-dependency in redthread. +allowed_tools: ["Bash", "Read", "Write", "Grep", "Glob"] +--- + +# /add-or-update-research-dependency + +Use this workflow when working on **add-or-update-research-dependency** in `redthread`. + +## Goal + +Adds or updates an optional research dependency (e.g., gepa, litellm) and ensures it is properly pinned and grouped in pyproject.toml and lockfile. + +## Common Files + +- `pyproject.toml` +- `uv.lock` +- `src/redthread/research/*.py` + +## Suggested Sequence + +1. Understand the current state and failure mode before editing. +2. Make the smallest coherent change that satisfies the workflow goal. +3. Run the most relevant verification for touched files. +4. Summarize what changed and what still needs review. + +## Typical Commit Signals + +- Edit pyproject.toml to add or update the dependency under an [optional] group (e.g., [research-gepa]) +- Update uv.lock to reflect the new/updated dependency +- Ensure that the dependency is imported lazily or optionally in the relevant research module +- Verify that core installs do not require the optional dependency + +## Notes + +- Treat this as a scaffold, not a hard-coded script. +- Update the command if the workflow evolves materially. \ No newline at end of file