Skip to content

Remove learn and extract-skills commands#401

Merged
kami619 merged 2 commits intomainfrom
remove-learn-extract-skills
May 8, 2026
Merged

Remove learn and extract-skills commands#401
kami619 merged 2 commits intomainfrom
remove-learn-extract-skills

Conversation

@jwm4
Copy link
Copy Markdown
Contributor

@jwm4 jwm4 commented May 7, 2026

Summary

  • Removes learn and extract-skills CLI commands and their shared LearningService
  • Removes the learners/ module (code_sampler, llm_enricher, pattern_extractor, prompt_templates, skill_generator)
  • Removes .github/workflows/continuous-learning.yml, which was running on every release and weekly with LLM enrichment silently disabled
  • Cleans up orphaned test files left over from the prior removal of eval_harness and benchmark commands

Closes #395

Why

As described in #395, the feature's core premise doesn't hold: scores measure file presence, not implementation quality. A 100 on claude_md_file only means the file exists and exceeds 50 bytes. Skills derived from such signals are not reliable examples worth replicating.

Additional implementation problems made it worse: metrics were fabricated, the extractor was hardcoded to 5 of 25 assessors (silently skipping all others), and the CI workflow produced unenriched proposals on a recurring schedule.

Test plan

🤖 Generated with Claude Code under the supervision of Bill Murdock

Removes the learn and extract-skills commands, the learners/ module,
learning_service.py, and the continuous-learning CI workflow. The
feature's premise is flawed: scores measure file presence not quality,
metrics are fabricated, the extractor is hardcoded to 5 of 25 assessors,
and the CI workflow was producing unenriched skill proposals on every
release with LLM enrichment silently disabled.

Also removes orphaned test files left over from the prior removal of
eval_harness and benchmark commands.

Closes #395

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: String must contain at most 250 character(s) at "tone_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: fbd11a22-d1c4-42be-9643-129f785a5923

📥 Commits

Reviewing files that changed from the base of the PR and between 3350fab and eb8bd32.

📒 Files selected for processing (1)
  • src/agentready/cli/main.py

Walkthrough

Removes the learn CLI command, adds/updates an extract-skills CLI command, modifies CLI lazy-loading registration, introduces/updates LearningService and learners (PatternExtractor, CodeSampler, LLMEnricher, SkillGenerator; prompt templates trimmed), updates project description, and adds/removes multiple unit and integration tests related to the learning flow.

Changes

Learning feature adjustments

Layer / File(s) Summary
Prompt / Constants
src/agentready/learners/prompt_templates.py
Removed PATTERN_EXTRACTION_PROMPT and CODE_SAMPLING_GUIDANCE constants.
Pattern Extraction
src/agentready/learners/pattern_extractor.py
PatternExtractor implemented to convert passing findings into DiscoveredSkill objects with confidence/impact/reusability scores and up to three code examples.
Code Sampling
src/agentready/learners/code_sampler.py
CodeSampler implemented to select files/directories per attribute patterns, build directory trees, and format code samples with truncation.
LLM Enrichment
src/agentready/learners/llm_enricher.py
LLMEnricher implemented: builds prompts, calls Anthropic Claude, parses JSON (handles fenced code), supports caching, retries on rate limits, merges enrichment into DiscoveredSkill.
Skill Output Generation
src/agentready/learners/skill_generator.py
SkillGenerator implemented to write per-skill SKILL.md, GitHub issue markdown, and detailed reports; supports batch generation and all formats.
Service Orchestration
src/agentready/services/learning_service.py
LearningService implemented to load assessment JSON, reconstruct domain objects, extract patterns (with min_confidence), optionally enrich via Anthropic, and generate outputs (json/skill_md/github_issues/markdown/all).
CLI Command
src/agentready/cli/extract_skills.py
Adds extract-skills Click command: validates repo/assessment discovery, configures LearningService, optionally enables LLM enrichment when ANTHROPIC_API_KEY present, runs full workflow, prints results and next steps.
CLI Wiring
src/agentready/cli/main.py
Updated LazyGroup lazy-subcommands mapping and comments to remove extract-skills and learn from heavy-command list; overall command registration adjusted.
Project Metadata
pyproject.toml
project.description updated to remove “continuous learning” phrase.
Tests — Added/Modified
tests/unit/learners/test_llm_enricher.py, tests/unit/test_cli_extract_skills.py, tests/unit/test_code_sampler.py, tests/unit/learners/test_pattern_extractor.py, ...
Extensive unit tests added/expanded for LLMEnricher, CodeSampler, PatternExtractor, SkillGenerator, and CLI extract-skills behavior.
Tests — Removed
tests/unit/test_learning_service.py, tests/integration/test_eval_harness_e2e.py, tests/unit/test_cli_learn.py, and several learner test modules indicated as deleted
Several test modules covering the prior learn command and eval-harness integration were deleted.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant CLI as CLI (extract-skills)
  participant LS as LearningService
  participant PE as PatternExtractor
  participant CS as CodeSampler
  participant LLM as Anthropic Claude
  participant SG as SkillGenerator
  CLI->>LS: run_full_workflow(assessment, options)
  LS->>LS: load_assessment -> build domain objects
  LS->>PE: extract_all_patterns(assessment)
  PE-->>LS: list[DiscoveredSkill]
  LS->>CS: initialize per-repo (when enriching)
  LS->>LLM: for up to budget -> request enrichment (prompt + samples)
  LLM-->>LS: JSON enrichment (or error / retry)
  LS->>PE: _merge_enrichment (merge into DiscoveredSkill)
  LS->>SG: generate_skills(skills, output_format)
  SG-->>LS: paths of generated files
  LS-->>CLI: summary (counts, files, next steps)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Remove learn and extract-skills commands' directly and clearly summarizes the primary change—removal of two CLI commands.
Description check ✅ Passed The description is directly related to the changeset. It explains why the commands were removed (core premise invalid, implementation issues, CI problems) and references the linked issue #395.
Linked Issues check ✅ Passed The PR fully implements the removal objectives from issue #395: removes the learn and extract-skills commands, the learners module, the continuous-learning workflow, and cleans up orphaned test files.
Out of Scope Changes check ✅ Passed All changes are in scope. The PR removes only the specified commands, modules, workflows, and associated tests—no unrelated functionality or additions are present.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-learn-extract-skills

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jwm4 jwm4 requested a review from kami619 May 7, 2026 12:56
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/agentready/cli/main.py`:
- Around line 95-99: The lazy_subcommands dict has a mis-indented entry
("submit": ("submit", "submit")) causing a syntax error at import; fix by
aligning the "submit" key/value with the other entries inside the
lazy_subcommands mapping (ensure it is indented to the same column as
"assess-batch" and "experiment" and that the dict commas/braces remain correct)
so the dict definition in main.py (symbol: lazy_subcommands) parses properly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: e9b3b981-b933-4d08-8cbe-122389a6dc82

📥 Commits

Reviewing files that changed from the base of the PR and between 4f99a69 and 3350fab.

📒 Files selected for processing (21)
  • .github/workflows/continuous-learning.yml
  • pyproject.toml
  • src/agentready/cli/extract_skills.py
  • src/agentready/cli/learn.py
  • src/agentready/cli/main.py
  • src/agentready/learners/__init__.py
  • src/agentready/learners/code_sampler.py
  • src/agentready/learners/llm_enricher.py
  • src/agentready/learners/pattern_extractor.py
  • src/agentready/learners/prompt_templates.py
  • src/agentready/learners/skill_generator.py
  • src/agentready/services/learning_service.py
  • tests/integration/test_eval_harness_e2e.py
  • tests/unit/learners/test_llm_enricher.py
  • tests/unit/learners/test_pattern_extractor.py
  • tests/unit/learners/test_skill_generator.py
  • tests/unit/test_cli_extract_skills.py
  • tests/unit/test_cli_learn.py
  • tests/unit/test_code_sampler.py
  • tests/unit/test_eval_harness_models.py
  • tests/unit/test_learning_service.py
💤 Files with no reviewable changes (19)
  • tests/unit/learners/test_skill_generator.py
  • tests/unit/test_cli_learn.py
  • .github/workflows/continuous-learning.yml
  • src/agentready/cli/extract_skills.py
  • tests/unit/test_learning_service.py
  • tests/unit/test_eval_harness_models.py
  • src/agentready/learners/init.py
  • tests/integration/test_eval_harness_e2e.py
  • src/agentready/learners/prompt_templates.py
  • tests/unit/learners/test_llm_enricher.py
  • src/agentready/learners/pattern_extractor.py
  • tests/unit/learners/test_pattern_extractor.py
  • src/agentready/learners/skill_generator.py
  • src/agentready/learners/llm_enricher.py
  • tests/unit/test_cli_extract_skills.py
  • src/agentready/learners/code_sampler.py
  • src/agentready/services/learning_service.py
  • tests/unit/test_code_sampler.py
  • src/agentready/cli/learn.py

Comment thread src/agentready/cli/main.py
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

📉 Test Coverage Report

Branch Coverage
This PR 72.3%
Main 75.4%
Diff ⚠️ -3.1%

Coverage calculated from unit tests only

@kami619 kami619 merged commit 2900a27 into main May 8, 2026
10 of 11 checks passed
@kami619 kami619 deleted the remove-learn-extract-skills branch May 8, 2026 02:35
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🎉 This PR is included in version 2.35.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the learn command

2 participants