Skip to content

Scaffold lecodeur as a full CLI/PyPI AgentCulture sibling#2

Merged
OriNachum merged 3 commits into
mainfrom
feat/scaffold-sibling-pattern
May 22, 2026
Merged

Scaffold lecodeur as a full CLI/PyPI AgentCulture sibling#2
OriNachum merged 3 commits into
mainfrom
feat/scaffold-sibling-pattern

Conversation

@OriNachum
Copy link
Copy Markdown
Contributor

Closes #1.

Scaffolds lecodeur ("le codeur") — the local coding agent of the Culture mesh — to the AgentCulture sibling pattern. lecodeur is the doer of a matched pair: lepenseur (the thinker) reasons and plans; lecodeur executes. daria (awareness) is the next-closest sibling. daria notices, lepenseur reasons, lecodeur builds.

Runtime

culture.yaml declares backend: acp + model: vllm-local/Qwen/Qwen3-Coder-Next (80B-total / 3B-active MoE). Note: the official BF16 weights (~160GB) do not fit a 128GB DGX Spark, so the local deployment serves a quantized variant (FP8 ≈ ~80GB, or a community quant) — the model: string names the family; the exact quant repo is pinned at serve time. AGENTS.md is the runtime system prompt; CLAUDE.md is dev guidance for a Claude residing here to help.

Acceptance criteria

  • uv sync && uv run pytest -n auto -v passes locally (12 tests).
  • lecodeur --version, whoami, whoami --json, learn, explain backend all work.
  • black --check, isort --check-only, flake8, bandit -r lecodeur clean.
  • tests.yml + publish.yml present; version-check job in place.
  • AGENTS.md (runtime) + CLAUDE.md (dev guidance) present; culture.yaml declares backend: acp + a vllm-local/... model.
  • All six skills vendored under .claude/skills/ (cicd, communicate, version-bump, run-tests, sonarclaude, doc-test-alignment), each with SKILL.md + scripts/; .claude/skills.local.yaml.example committed.
  • .flake8 + .markdownlint-cli2.yaml present; CHANGELOG.md started.
  • Follow-up: a steward PR adds lecodeur to docs/skill-sources.md's "Downstream copies" column (must be filed on steward, not from here).

Notes

  • CLI chassis follows the afi-cli pattern (canonical); whoami's culture.yaml walk-up parser is modeled on telek. Skills + CI workflows are vendored/copied from steward and renamed.
  • Verbs are read-only; mutation safety (dry-run default, --apply to commit) is documented and reserved for future write verbs.
  • version-check no-ops on this PR (no pyproject.toml on main yet — initial scaffold).

🤖 Generated with Claude Code

  • lecodeur (Claude)

Scaffolds lecodeur ("le codeur"), the local coding agent of the Culture
mesh, to the AgentCulture sibling pattern (issue #1). lecodeur is the
doer of a matched pair — lepenseur reasons and plans, lecodeur executes;
daria is the next-closest sibling.

- lecodeur-cli package (afi-cli chassis): cli/__init__.py argparse with
  _LecodeurArgumentParser, _errors.py (LecodeurError + exit-code policy),
  _output.py (strict stdout/stderr split).
- Agent-first read-only verbs: whoami (reads culture.yaml), learn,
  explain (markdown catalog incl. `explain backend`); all --json-aware.
- Runtime: culture.yaml declares backend: acp +
  vllm-local/Qwen/Qwen3-Coder-Next (80B/3B-active MoE; serve a quantized
  variant — BF16 ~160GB won't fit a 128GB Spark). AGENTS.md runtime prompt.
- CI: tests.yml (test + lint + version-check) and publish.yml
  (PyPI/TestPyPI Trusted Publishing).
- Six skills vendored from steward (cicd, communicate, version-bump,
  run-tests, sonarclaude, doc-test-alignment) + skills.local.yaml.example.
- Lint configs (.flake8, .markdownlint-cli2.yaml), CHANGELOG, CLAUDE.md.

12 tests pass; black/isort/flake8/bandit/markdownlint/portability-lint clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Scaffold lecodeur as a full CLI/PyPI AgentCulture sibling with vendored skills and CI workflows

✨ Enhancement 🧪 Tests 📝 Documentation

Grey Divider

Walkthroughs

Description
• Scaffolds lecodeur as a full CLI/PyPI AgentCulture sibling following the afi-cli pattern
• Implements three agent-first verbs: whoami (identity probe reading culture.yaml), learn
  (self-teaching prompt), and explain (markdown catalog lookup)
• Establishes structured error handling with LecodeurError contract and exit-code policy
  (0=success, 1=user error, 2=environment error)
• Provides strict stdout/stderr separation via _output.py helpers for results and diagnostics
• Includes comprehensive CI/CD workflows: tests.yml (pytest, linting, SonarCloud, version-check)
  and publish.yml (PyPI/TestPyPI with Trusted Publishing)
• Vendors six skills under .claude/skills/ with full documentation and scripts: cicd,
  communicate, version-bump, run-tests, sonarclaude, doc-test-alignment
• Declares runtime configuration in culture.yaml: acp backend with
  vllm-local/Qwen/Qwen3-Coder-Next model (quantized FP8 variant for 128GB DGX Spark)
• Includes AGENTS.md (runtime system prompt) and CLAUDE.md (dev guidance) for agent and
  developer orientation
• Adds lint configurations (.flake8, .markdownlint-cli2.yaml) and project metadata
  (pyproject.toml, CHANGELOG.md)
• All acceptance criteria met: 12 passing tests, CLI commands functional, linting clean, skills
  vendored with documentation
Diagram
flowchart LR
  A["lecodeur CLI<br/>afi-cli pattern"] -->|"whoami"| B["culture.yaml<br/>identity probe"]
  A -->|"learn"| C["Self-teaching<br/>prompt"]
  A -->|"explain"| D["Markdown<br/>catalog"]
  A -->|"structured errors"| E["LecodeurError<br/>exit codes"]
  F["Six vendored<br/>skills"] -->|"cicd, communicate,<br/>version-bump, run-tests,<br/>sonarclaude, doc-test"| G["Scripts +<br/>documentation"]
  H["CI workflows<br/>tests.yml, publish.yml"] -->|"pytest, lint,<br/>SonarCloud,<br/>PyPI publish"| I["GitHub Actions<br/>automation"]
  J["culture.yaml<br/>acp + vLLM"] -->|"Qwen3-Coder-Next<br/>quantized FP8"| K["Runtime<br/>configuration"]

Loading

File Changes

1. .claude/skills/communicate/SKILL.md 📝 Documentation +335/-0

Cross-repo communication skill documentation and usage guide

• Comprehensive skill documentation for cross-repo + mesh communication from steward
• Covers four distinct channels: tracked async hand-offs, follow-up on threads, inbound state reads,
 and ephemeral coordination
• Documents when to use each communication mode (issue, broadcast, mesh, comment, fetch) with
 concrete examples
• Includes red flags, conventions, and script entry points for post-issue.sh, post-comment.sh,
 fetch-issues.sh, and mesh-message.sh

.claude/skills/communicate/SKILL.md


2. .claude/skills/sonarclaude/scripts/sonar.sh ✨ Enhancement +263/-0

SonarCloud API client for code quality queries

• SonarCloud API client script supporting five commands: status, issues, metrics, hotspots,
 accept
• Implements filtering by severity and type, raw JSON output mode, and issue acceptance with
 rationale comments
• Converts SonarCloud numeric ratings to letter grades and formats output for human readability
• Requires SONAR_TOKEN environment variable and curl/jq dependencies

.claude/skills/sonarclaude/scripts/sonar.sh


3. .claude/skills/cicd/scripts/pr-status.sh ✨ Enhancement +163/-0

Comprehensive PR status aggregation and display script

• One-shot PR status overview combining five data sources: PR state, CI checks, review-bot pipeline,
 SonarCloud gate, and inline threads
• Queries GitHub API for PR metadata, checks, review threads, and comments; fetches SonarCloud
 quality gate and issue counts
• Displays formatted output with emoji indicators for check states and unresolved thread breakdown
• Supports --repo and --sonar-key flags with auto-detection fallbacks

.claude/skills/cicd/scripts/pr-status.sh


View more (41)
4. CLAUDE.md 📝 Documentation +158/-0

Developer guidance for lecodeur repository maintenance

• Dev guidance for Claude Code working on lecodeur repository
• Explains project purpose (local coding agent, matched pair with lepenseur, sibling to daria)
• Documents runtime shape (acp backend, vLLM Qwen3-Coder-Next model), project structure (afi-cli
 pattern), and build/test/publish commands
• Covers skills convention, lane discipline, and mutation safety requirements

CLAUDE.md


5. .claude/skills/cicd/SKILL.md 📝 Documentation +167/-0

CI/CD workflow skill documentation and PR lifecycle

• Steward's CI/CD skill documentation layered on agex pr with two steward-specific extensions
• Documents five core PR-lifecycle verbs delegated to agex: lint, open, read, reply, delta
• Covers steward extensions status (SonarCloud gate + hotspots) and await (readiness polling
 with gating)
• Includes triage rules, alignment-delta rule, and reply etiquette conventions

.claude/skills/cicd/SKILL.md


6. .claude/skills/cicd/scripts/workflow.sh ✨ Enhancement +157/-0

Steward CI/CD workflow orchestration script

• Thin wrapper layer over agex pr with two steward-specific extensions (status, await)
• Routes subcommands to agex verbs: lint, open, read, reply, delta
• Implements status for SonarCloud gating and await for readiness polling with quality-gate exit
 codes
• Supports configurable wait times via STEWARD_PR_AWAIT_WAIT and legacy STEWARD_PR_AWAIT_SECONDS

.claude/skills/cicd/scripts/workflow.sh


7. .claude/skills/version-bump/scripts/bump.py ✨ Enhancement +178/-0

Semver version bumping and changelog management script

• Python script to bump semver version in pyproject.toml and prepend CHANGELOG.md entries
• Supports major, minor, patch bump types and show read-only mode
• Reads changelog entries from stdin as JSON and formats Keep-a-Changelog compliant output
• Updates __init__.py __version__ literal if present; walks up from cwd to find pyproject.toml

.claude/skills/version-bump/scripts/bump.py


8. .github/workflows/tests.yml ⚙️ Configuration changes +128/-0

Comprehensive CI testing and linting workflow

• GitHub Actions workflow for testing, linting, and SonarCloud scanning on PR and push to main
• Test job runs pytest with coverage reporting; lint job checks black, isort, flake8, bandit,
 markdownlint
• Version-check job enforces semver bump on every PR (AgentCulture rule, no exceptions for
 docs/config)
• SonarCloud scan runs conditionally when SONAR_TOKEN secret is available

.github/workflows/tests.yml


9. lecodeur/cli/__init__.py ✨ Enhancement +124/-0

CLI entry point with structured error handling

• Unified CLI entry point with custom _LecodeurArgumentParser routing errors through structured
 output
• Implements main() entry point with argparse setup, JSON mode detection, and exception handling
• Registers three agent-first verbs: whoami, learn, explain via _commands submodules
• Enforces LecodeurError contract so no Python tracebacks leak to stderr

lecodeur/cli/init.py


10. lecodeur/explain/catalog.py 📝 Documentation +128/-0

Markdown documentation catalog for explain command

• Markdown catalog for lecodeur explain  with entries for root, backend, whoami, learn, and
 explain topics
• Each entry is self-contained markdown; keys are topic-path tuples with root aliased to
 ("lecodeur",)
• Covers lecodeur's purpose, matched pair with lepenseur, backend (acp/vLLM), and CLI affordances
• Provides context for agents reading single entries without chaining reads

lecodeur/explain/catalog.py


11. .claude/skills/communicate/scripts/templates/skill-update-brief.md 📝 Documentation +101/-0

Skill update announcement brief template

• Markdown template for announce-skill-update verb rendering six-section skill update briefs
• Sections: what's stale, cite locations, upstream state, recipe, acceptance criteria, references
• Includes placeholder syntax {{NAME}} for dynamic substitution and step-by-step resync
 instructions
• Documents identifier-only adaptation pattern and signature literal handling for downstream vendors

.claude/skills/communicate/scripts/templates/skill-update-brief.md


12. tests/test_cli.py 🧪 Tests +128/-0

CLI smoke tests for all verbs and output modes

• Smoke tests for lecodeur CLI entry point covering all three verbs: whoami, learn, explain
• Tests both text and JSON output modes; validates version flag, help output, and error handling
• Verifies whoami reads culture.yaml correctly and reports nick, backend, model
• Ensures every catalog path in explain resolves successfully

tests/test_cli.py


13. lecodeur/cli/_commands/whoami.py ✨ Enhancement +103/-0

Identity probe command reading culture.yaml

lecodeur whoami command implementation: smallest identity probe reading culture.yaml
• Walks up from module to find repo's culture.yaml; parses without YAML dependency (regex-based)
• Reports nick (suffix), version, backend, and served model; supports --json structured output
• Falls back to literal defaults when no culture.yaml found (wheel install scenario)

lecodeur/cli/_commands/whoami.py


14. lecodeur/cli/_commands/learn.py ✨ Enhancement +101/-0

Self-teaching prompt command for agent orientation

lecodeur learn command: structured self-teaching prompt for agent consumers
• Provides purpose, command map, mutation safety, JSON contract, and exit-code policy
• Supports both text prose and --json structured output with sibling framing (lepenseur, daria)
• Enough shape for agents to author usage skills without scraping --help

lecodeur/cli/_commands/learn.py


15. .claude/skills/sonarclaude/SKILL.md 📝 Documentation +84/-0

SonarCloud query skill documentation

• SonarClaude skill documentation for querying SonarCloud API
• Covers five commands: status, issues, metrics, hotspots, accept with usage examples
• Documents filtering options (severity, type, limit) and raw JSON output mode
• Explains when to use accept for won't-fix issues with rationale comments

.claude/skills/sonarclaude/SKILL.md


16. .github/workflows/publish.yml ⚙️ Configuration changes +88/-0

PyPI publication workflow with Trusted Publishing

• GitHub Actions workflow for building and publishing lecodeur-cli to PyPI and TestPyPI
• Test job runs pytest; test-publish publishes .dev to TestPyPI on PR (skips fork PRs)
• Publish job runs on push to main, using Trusted Publishing (OIDC, no API tokens)
• Sets dev version dynamically for PR builds and prints install commands

.github/workflows/publish.yml


17. .claude/skills/communicate/scripts/post-issue.sh ✨ Enhancement +71/-0

Cross-repo issue posting wrapper script

• Thin wrapper around agtag issue post for cross-repo issue creation
• Accepts --repo OWNER/REPO, --title TITLE, and optional --body-file PATH or stdin
• Spools stdin to tempfile when no --body-file provided; delegates signing to agtag
• Requires agtag (>=0.1) on PATH; exits with usage on missing arguments

.claude/skills/communicate/scripts/post-issue.sh


18. .claude/skills/version-bump/SKILL.md 📝 Documentation +66/-0

Version bumping skill documentation

• Version-bump skill documentation for semver bumping and changelog management
• Covers three bump types (major, minor, patch) and show read-only mode
• Documents JSON changelog format and files touched (pyproject.toml, CHANGELOG.md)
• Explains AgentCulture workflow and version-check CI job enforcement

.claude/skills/version-bump/SKILL.md


19. .claude/skills/doc-test-alignment/SKILL.md 📝 Documentation +55/-0

Doc-test-alignment stub skill contract

• Stub skill documentation for doc-test-alignment verification (not yet implemented)
• Defines contract for four alignment checks: README examples, CLAUDE.md commands, SKILL.md
 descriptions, test names
• Explains why shipped as stub: each check is non-trivial; partial implementation would
 false-positive
• Guarantees skill directory exists and entry-point script present for steward verification

.claude/skills/doc-test-alignment/SKILL.md


20. .claude/skills/cicd/scripts/portability-lint.sh ✨ Enhancement +57/-0

Portability linting for path leaks and user config dependencies

• New bash script that lints committed files for hard-coded /home// paths and per-user dotfile
 config references
• Supports two modes: --all to check all tracked files, or default diff mode to check only
 modified files
• Implements carve-outs for allowed patterns like ~/.claude/skills/.../scripts/ and ~/.culture/
• Exits with 0 if clean, 1 if leaks are found, providing actionable remediation messages

.claude/skills/cicd/scripts/portability-lint.sh


21. .claude/skills/cicd/scripts/pr-reply.sh ✨ Enhancement +77/-0

GitHub PR review comment reply automation with thread resolution

• New bash script to reply to GitHub PR review comments with optional thread resolution
• Automatically signs replies with the agent's nick resolved from culture.yaml suffix or repo
 basename
• Supports --repo, --resolve, and --print-body flags for flexible invocation
• Uses GitHub CLI (gh) to post replies and resolve review threads via GraphQL

.claude/skills/cicd/scripts/pr-reply.sh


22. .claude/skills/communicate/scripts/mesh-message.sh ✨ Enhancement +74/-0

Culture mesh channel messaging wrapper script

• New bash script to send messages to Culture mesh channels via culture channel message
• Accepts message body via --body flag, --body-file path, or stdin
• Validates that culture CLI is available and enforces non-empty message bodies
• Provides clear usage guidance and error handling for missing arguments

.claude/skills/communicate/scripts/mesh-message.sh


23. .claude/skills/communicate/scripts/post-comment.sh ✨ Enhancement +65/-0

Cross-repo GitHub issue commenting via agtag integration

• New bash script to comment on cross-repo GitHub issues using agtag issue reply
• Accepts message body via --body-file or stdin, with TTY detection to prevent hanging
• Mirrors post-issue.sh ergonomics and uses temporary file with EXIT trap for cleanup
• Validates required arguments (--repo, --number) and checks for agtag availability

.claude/skills/communicate/scripts/post-comment.sh


24. .claude/skills/communicate/scripts/fetch-issues.sh ✨ Enhancement +59/-0

GitHub issue fetching with range and list expansion support

• New bash script to fetch GitHub issues with full body and comments using agtag issue fetch
• Supports range syntax (e.g., 191-197), single issues, and lists of issue numbers
• Allows explicit --repo specification or resolves from git remote
• Iterates through numbers and formats output with separators for readability

.claude/skills/communicate/scripts/fetch-issues.sh


25. .claude/skills/run-tests/SKILL.md 📝 Documentation +50/-0

Run-tests skill documentation with usage patterns and modes

• New documentation for the run-tests skill describing pytest execution with parallelism and
 coverage
• Documents usage patterns: default parallel mode, quick checks, CI mode, and specific test files
• Explains options table with --parallel, --coverage, --ci, and --quick flags
• Provides guidance on when to use each mode (post-changes, sanity checks, pre-PR, debugging)

.claude/skills/run-tests/SKILL.md


26. lecodeur/cli/_output.py ✨ Enhancement +56/-0

CLI output helpers with strict stdout/stderr split

• New module implementing stdout/stderr helpers with strict separation: results to stdout,
 diagnostics to stderr
• Provides emit_result() for command results with text or JSON mode support
• Provides emit_error() for structured LecodeurError output with optional remediation hints
• Provides emit_diagnostic() for progress and summary messages to stderr

lecodeur/cli/_output.py


27. pyproject.toml ⚙️ Configuration changes +71/-0

Project metadata and build configuration for lecodeur-cli

• New project configuration declaring lecodeur-cli package version 0.1.0 with Python >=3.12
 requirement
• Defines CLI entry point lecodeur = "lecodeur.cli:main" and build system using hatchling
• Specifies dev dependencies: pytest, pytest-xdist, pytest-cov, bandit, flake8, isort, black
• Configures coverage (60% minimum), isort, black, bandit, and pytest settings

pyproject.toml


28. .claude/skills/run-tests/scripts/test.sh ✨ Enhancement +52/-0

Pytest runner script with parallelism and coverage options

• New bash script to run pytest with optional parallelism (-n auto), coverage, and CI modes
• Supports flags: --parallel/-p, --coverage/-c, --ci, --quick/-q with pass-through of extra
 pytest args
• Uses uv run pytest and resolves coverage source from pyproject.toml [tool.coverage.run]
 section
• Provides flexible invocation for development, quick checks, and full CI matching

.claude/skills/run-tests/scripts/test.sh


29. .claude/skills/cicd/scripts/_resolve-nick.sh ✨ Enhancement +43/-0

Agent nick resolution from culture.yaml for message signing

• New bash script to resolve the agent's nick for GitHub message signing
• Attempts to extract suffix: from /culture.yaml via Python regex parsing
• Falls back to git repo basename if manifest is missing or suffix cannot be parsed
• Always exits 0 but emits stderr warnings if manifest exists but suffix extraction fails

.claude/skills/cicd/scripts/_resolve-nick.sh


30. CHANGELOG.md 📝 Documentation +29/-0

Initial changelog documenting version 0.1.0 scaffold

• New changelog file following Keep a Changelog format and Semantic Versioning
• Documents version 0.1.0 (2026-05-22) with initial scaffold to AgentCulture sibling pattern
• Lists additions: CLI chassis, agent-first verbs, culture.yaml, pytest suite, CI workflows,
 vendored skills, and lint configs
• Provides structured entry point for tracking future changes

CHANGELOG.md


31. AGENTS.md 📝 Documentation +33/-0

Runtime system prompt and work principles for lecodeur agent

• New runtime system prompt for lecodeur agent describing its role as the "doer" of the Culture
 mesh
• Establishes division of labor: daria notices, lepenseur reasons, lecodeur builds
• Documents work principles: read before write, minimal diffs, test verification, dry-run defaults,
 focused questions
• Notes runtime environment: locally-hosted vLLM Qwen3-Coder-Next model over acp backend

AGENTS.md


32. lecodeur/cli/_errors.py Error handling +42/-0

Structured error handling with exit-code policy

• New module defining LecodeurError dataclass with structured error contract: code, message,
 remediation
• Establishes exit-code policy: 0 (success), 1 (user error), 2 (environment error), 3+ (reserved)
• Provides to_dict() method for JSON serialization of errors
• Centralizes error handling so no Python tracebacks leak to stderr

lecodeur/cli/_errors.py


33. lecodeur/cli/_commands/explain.py ✨ Enhancement +38/-0

Explain command for markdown topic catalog lookup

• New command module implementing lecodeur explain ... for markdown catalog lookup
• Resolves topic paths via lecodeur.explain.resolve() and raises LecodeurError on unknown paths
• Supports both text and JSON output modes via --json flag
• Registers subcommand with argparse and provides help text

lecodeur/cli/_commands/explain.py


34. culture.yaml ⚙️ Configuration changes +22/-0

Culture mesh agent manifest with backend and model configuration

• New Culture mesh manifest declaring lecodeur agent with acp backend and
 vllm-local/Qwen/Qwen3-Coder-Next model
• Embeds system prompt describing lecodeur's role, work principles, and relationship to sibling
 agents
• Notes that official BF16 weights (~160GB) don't fit 128GB DGX Spark; quantized variant (FP8 ~80GB)
 is served
• Specifies acp_command: [opencode, acp] for agent invocation

culture.yaml


35. .claude/skills/doc-test-alignment/scripts/check.sh Miscellaneous +24/-0

Doc-test-alignment skill stub entry point script

• New stub bash script for doc-test-alignment skill entry point
• Exits with code 2 to signal "not yet implemented" (distinguishable from success/failure)
• Provides clear stderr message explaining the stub status and referencing SKILL.md contract
• Placeholder until real implementation lands; satisfies steward skills convention

.claude/skills/doc-test-alignment/scripts/check.sh


36. lecodeur/explain/__init__.py ✨ Enhancement +27/-0

Explain catalog resolution with error handling

• New module implementing explain catalog resolution via resolve() function
• Looks up topic paths in ENTRIES dict from lecodeur.explain.catalog
• Raises LecodeurError with remediation hint on unknown paths
• Provides known_paths() utility for test discovery of all catalog entries

lecodeur/explain/init.py


37. .markdownlint-cli2.yaml ⚙️ Configuration changes +19/-0

Markdown linting configuration with Keep a Changelog support

• New markdownlint-cli2 configuration file for consistent markdown linting across the repo
• Disables MD013 (line length) and MD060 (table pipe spacing) for flexibility
• Enables MD024 siblings_only to allow duplicate headings under different parents (Keep a
 Changelog pattern)
• Ignores node_modules/ and .local/ directories

.markdownlint-cli2.yaml


38. .claude/skills.local.yaml.example ⚙️ Configuration changes +14/-0

Per-machine skills configuration example template

• New example configuration file for per-machine skills settings (git-ignored when copied to
 .claude/skills.local.yaml)
• Documents workspace_root setting for sibling Culture project paths (defaults to .. for
 shared-workspace layout)
• Documents nick setting for Culture mesh posting identity (resolved from culture.yaml suffix or
 repo basename)
• Provides clear instructions for local setup

.claude/skills.local.yaml.example


39. lecodeur/__init__.py ✨ Enhancement +11/-0

Package initialization with version detection

• New package initialization module exporting __version__ string
• Attempts to read version from package metadata via importlib.metadata.version()
• Falls back to "0.0.0+local" for editable installs without metadata
• Provides __all__ export list for public API

lecodeur/init.py


40. .flake8 ⚙️ Configuration changes +7/-0

Flake8 configuration aligned with black formatter

• New flake8 configuration file setting max line length to 100 (matching black)
• Disables E203 (whitespace before ':') to avoid conflicts with black's slice formatting
• Disables W503 (line break before binary operator) since black uses W504-style formatting
• Ensures linter and formatter agreement on code style

.flake8


41. lecodeur/__main__.py ✨ Enhancement +8/-0

Module entry point for python -m invocation

• New module enabling python -m lecodeur invocation pattern
• Imports and calls main() from lecodeur.cli module
• Exits with the return code from main() for proper shell integration

lecodeur/main.py


42. README.md 📝 Documentation +2/-1

README formatting and description refinement

• Updated README with improved formatting: added blank line after heading
• Changed description from "A local coding agent for Culture ecosystem" to "A local coding agent for
 the Culture ecosystem" (added article "the")
• Maintains minimal, focused project description

README.md


43. lecodeur/cli/_commands/__init__.py Additional files +0/-0

...

lecodeur/cli/_commands/init.py


44. tests/__init__.py Additional files +0/-0

...

tests/init.py


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented May 22, 2026

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0) 📎 Requirement gaps (1)

Grey Divider


Remediation recommended

1. test_cli.py violates naming 📎 Requirement gap ⚙ Maintainability
Description
The test file is named tests/test_cli.py, but the checklist requires tests to be under
tests/test_cli_*.py. This naming mismatch can break tooling or expectations that rely on that
convention.
Code

tests/test_cli.py[1]

Evidence
PR Compliance ID 7 requires CLI tests to exist as tests/test_cli_*.py. The PR introduces
tests/test_cli.py, which does not match the required filename pattern.

Test suite exists and passes with uv + pytest-xdist + coverage
tests/test_cli.py[1-1]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Compliance requires CLI tests to be located under `tests/test_cli_*.py`, but this PR adds `tests/test_cli.py` which does not match that pattern.

## Issue Context
Some CI/scripts/conventions may glob for `tests/test_cli_*.py` specifically; `test_cli.py` will not match that glob.

## Fix Focus Areas
- tests/test_cli.py[1-1]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Wrong manifest selected 🐞 Bug ≡ Correctness
Description
_find_culture_yaml() walks all parents of __file__ and returns the first culture.yaml, which
can be an unrelated file outside this repo in some installs (e.g., site-packages under a home
directory). This can make lecodeur whoami report the wrong nick/backend/model because
_read_agent_fields() trusts that file.
Code

lecodeur/cli/_commands/whoami.py[R19-33]

Evidence
The manifest discovery returns the first culture.yaml found anywhere in the ancestor chain, and
the parsed values from that file directly drive the whoami report.

lecodeur/cli/_commands/whoami.py[19-33]
lecodeur/cli/_commands/whoami.py[36-63]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`lecodeur whoami` should only read *this project’s* `culture.yaml` (repo root in editable installs). The current search walks to filesystem root and will accept any `culture.yaml` found in an ancestor directory, which can produce incorrect identity output.

### Issue Context
The intent (per docstring) is:
- editable/source install: find repo root `culture.yaml`
- wheel install: no bundled `culture.yaml` → fall back to defaults

### Fix Focus Areas
- Add a repository-root sentinel check (e.g., require `pyproject.toml` or `.git` to exist in the same directory as the candidate `culture.yaml`) before accepting it.
- Alternatively, stop the upward walk once you leave the package/project boundary (e.g., once you hit `site-packages`).

- lecodeur/cli/_commands/whoami.py[19-33]
- lecodeur/cli/_commands/whoami.py[36-63]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Missing issues permission 🐞 Bug ☼ Reliability
Description
The version-check job calls GitHub Issues Comments endpoints (/issues/.../comments and
/issues/comments/{id}) but only grants contents: read and pull-requests: write. If the token
cannot access issue-comment APIs under these permissions, the gh api calls can fail and prevent
creating/updating the helpful marker comment.
Code

.github/workflows/tests.yml[R80-120]

Evidence
The workflow declares only contents and pull-requests permissions, yet uses gh api to call
Issues Comments REST endpoints to list and patch comments.

.github/workflows/tests.yml[80-83]
.github/workflows/tests.yml[114-121]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`version-check` uses `gh api` against Issues Comment APIs, but the job permissions do not explicitly include `issues: read/write`. This can cause the comment read/patch step to be denied, breaking the intended UX (and potentially failing earlier than expected in the mismatch branch).

### Issue Context
The job uses:
- `gh api repos/<repo>/issues/<pr>/comments` (list)
- `gh api repos/<repo>/issues/comments/<id> -X PATCH` (update)

### Fix Focus Areas
- Add explicit permissions for issue comments (typically `issues: write`; add `issues: read` if you want to be conservative/explicit).
- Optionally make the comment update best-effort (`|| true`) so a permission hiccup doesn’t mask the real error message.

- .github/workflows/tests.yml[80-83]
- .github/workflows/tests.yml[114-121]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (1)
4. Nonportable xargs option 🐞 Bug ☼ Reliability
Description
portability-lint.sh uses xargs -r, which is a GNU-specific flag and is not supported by
BSD/macOS xargs. This makes the skill fail outright on common developer machines, undermining the
intended portability of the vendored skill scripts.
Code

.claude/skills/cicd/scripts/portability-lint.sh[R23-35]

Evidence
The script invokes xargs -r twice; this option is not universally supported and will cause runtime
failures on systems without GNU xargs.

.claude/skills/cicd/scripts/portability-lint.sh[23-35]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The script relies on `xargs -r` to avoid running `grep` on empty input. BSD/macOS `xargs` doesn’t support `-r`, so the script will error on those systems.

### Issue Context
This script is intended to be run by contributors locally as a portability guard.

### Fix Focus Areas
- Replace `xargs -r grep ...` with a portable loop over files (also fixes filenames-with-spaces), or guard empties with explicit checks before invoking `xargs`.
- Keep the current behavior of returning cleanly when there are no files to check.

- .claude/skills/cicd/scripts/portability-lint.sh[23-35]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Two CI fixes:

- SonarCloud Scan failed with "must define sonar.projectKey,
  sonar.organization" — add sonar-project.properties pointing at the
  agentculture_lecodeur project (org agentculture), sources=lecodeur.
- TestPyPI publish failed with a project-name mismatch (400). The
  registered PyPI project / CLI is `lecodeur`, not `lecodeur-cli` —
  rename the distribution name to `lecodeur` (dist + import + binary all
  `lecodeur`, no -cli suffix) so the Trusted Publisher metadata matches.

12 tests pass; build produces lecodeur-0.1.0; black/flake8/markdownlint clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
whoami.py:54 — SonarCloud python:S8513 (MAJOR): replace
`s.startswith(a) or s.startswith(b)` with `s.startswith((a, b))`.
Behavior unchanged; 12 tests still pass and whoami parses culture.yaml
identically.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@OriNachum OriNachum merged commit 87662ab into main May 22, 2026
8 checks passed
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.

Scaffold lecodeur as a full CLI/PyPI AgentCulture sibling (acp/vLLM agent)

1 participant