Skip to content

Add CLAUDE.md and AGENTS.md for AI-assisted development#146

Open
JAVGan wants to merge 2 commits into
mainfrom
agents
Open

Add CLAUDE.md and AGENTS.md for AI-assisted development#146
JAVGan wants to merge 2 commits into
mainfrom
agents

Conversation

@JAVGan
Copy link
Copy Markdown
Collaborator

@JAVGan JAVGan commented May 8, 2026

CLAUDE.md provides guidance to Claude Code and other AI coding assistants working in this repository. It documents build/test/lint commands, code style rules, the task/mixin/step-decorator architecture, cloud provider patterns, and testing conventions (100% coverage, requests-mock, CommandTester, auto-use fixtures).

AGENTS.md is a symlink to CLAUDE.md so that other AI tools that look for AGENTS.md find the same content.

Refers to SPSTRAT-736

Summary by Sourcery

Add repository-level guidance for AI coding assistants and expose it under a conventional filename for other tools to consume.

Documentation:

  • Document project architecture, commands, coding standards, and testing conventions for AI coding assistants in CLAUDE.md.

Chores:

  • Add AGENTS.md as an alias pointing to CLAUDE.md so other AI tools can discover the same guidance.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 8, 2026

Reviewer's Guide

Adds repository-local guidance for AI coding assistants via CLAUDE.md, documenting project commands, architecture, and testing conventions, plus an AGENTS.md shim that points other AI tools to the same guidance.

Class diagram for task system and cloud providers

classDiagram
    class MarketplacesVMTask {
        +run()
        +parse_args()
        +logger
    }

    class CombinedVMPush {
        +run()
    }

    class MarketplacesVMPush {
        +run()
    }

    class CommunityVMPush {
        +run()
    }

    class VMDelete {
        +run()
    }

    class CloudService {
        +add_cloud_args(parser)
        +get_cloud_provider(item)
    }

    class CollectorService {
        +add_collector_args(parser)
        +get_collector()
    }

    class StarmapService {
        +add_starmap_args(parser)
        +get_starmap_client()
    }

    class AwsRHSMClientService {
        +add_rhsm_args(parser)
        +get_rhsm_client()
    }

    class CloudCredentials {
        <<frozen_attrs>>
        +access_key
        +secret_key
        +subscription_id
        +tenant_id
    }

    class CloudProvider {
        <<abstract, generic T C>>
        +publish_image(item)
        +delete_image(item)
        +credentials : CloudCredentials
    }

    class AWSProvider {
        +publish_image(item)
        +delete_image(item)
    }

    class AzureProvider {
        +publish_image(item)
        +delete_image(item)
    }

    MarketplacesVMTask <|-- CombinedVMPush
    MarketplacesVMTask <|-- MarketplacesVMPush
    MarketplacesVMTask <|-- CommunityVMPush
    MarketplacesVMTask <|-- VMDelete

    MarketplacesVMTask *-- CloudService
    MarketplacesVMTask *-- CollectorService
    MarketplacesVMTask *-- StarmapService
    MarketplacesVMTask *-- AwsRHSMClientService

    CloudProvider o-- CloudCredentials
    CloudProvider <|-- AWSProvider
    CloudProvider <|-- AzureProvider
Loading

File-Level Changes

Change Details Files
Document AI-assistant usage, project workflows, and architecture in a new CLAUDE.md guide.
  • Describe how to run tests, single test files, and individual tests using tox environments for multiple Python versions
  • Document linting, formatting, type-checking, documentation, security, and coverage tox environments and their intended use
  • Capture code style rules including line length and specific black, isort, and flake8 configurations and ignores
  • Explain the task/mixin-based CLI architecture, including task classes, entry points, and the four main CLI commands
  • Describe the step-decorator pattern, cloud provider abstraction (base/implementations/factory), and key external dependencies
  • Specify testing expectations such as 100% coverage, use of requests-mock, auto-use fixtures in conftest, CommandTester usage, and test data location
CLAUDE.md
Provide an AGENTS.md file that redirects other AI tools to the CLAUDE.md guidance.
  • Create AGENTS.md whose contents reference CLAUDE.md so AI tools expecting AGENTS.md read the same guide
AGENTS.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@JAVGan
Copy link
Copy Markdown
Collaborator Author

JAVGan commented May 8, 2026

@lslebodn @ashwgit PTAL

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • AGENTS.md is currently added as a regular file containing the string CLAUDE.md; if the intention is to have an actual symlink for tools that expect one, this should be committed as a filesystem symlink rather than a one-line text file.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- AGENTS.md is currently added as a regular file containing the string `CLAUDE.md`; if the intention is to have an actual symlink for tools that expect one, this should be committed as a filesystem symlink rather than a one-line text file.

## Individual Comments

### Comment 1
<location path="CLAUDE.md" line_range="80" />
<code_context>
+
+- 100% code coverage is enforced (`.coveragerc` `fail_under = 100`)
+- Tests use `requests-mock` for HTTP mocking, not live services
+- `tests/conftest.py` has session-scoped auto-use fixtures that set `PYTHONHASHSEED`, mock HOME, reset pushsource, and inject a `FakeCollector`
+- `CommandTester` (in `tests/command.py`) simulates CLI invocations by calling `entry_point()` directly
+- Test data fixtures live in `tests/data/`
</code_context>
<issue_to_address>
**suggestion (typo):** Consider changing "auto-use fixtures" to "autouse fixtures" to match pytest terminology.

Using pytest’s standard term "autouse fixtures" (without a hyphen) will be clearer to readers familiar with pytest.

```suggestion
- `tests/conftest.py` has session-scoped autouse fixtures that set `PYTHONHASHSEED`, mock HOME, reset pushsource, and inject a `FakeCollector`
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread CLAUDE.md Outdated
@JAVGan
Copy link
Copy Markdown
Collaborator Author

JAVGan commented May 8, 2026

NOTE: depends on #147 to fix the CI

JAVGan and others added 2 commits May 29, 2026 15:43
CLAUDE.md provides guidance to Claude Code and other AI coding
assistants working in this repository. It documents build/test/lint
commands, code style rules, the task/mixin/step-decorator architecture,
cloud provider patterns, and testing conventions (100% coverage,
requests-mock, CommandTester, auto-use fixtures).

AGENTS.md is a symlink to CLAUDE.md so that other AI tools that look
for AGENTS.md find the same content.

Refers to SPSTRAT-736

Signed-off-by: Jonathan Gangi <jgangi@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
suggestion (typo): Consider changing "auto-use fixtures" to "autouse fixtures" to match pytest terminology.

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant