Scaffold lecodeur as a full CLI/PyPI AgentCulture sibling#2
Conversation
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>
Review Summary by QodoScaffold lecodeur as a full CLI/PyPI AgentCulture sibling with vendored skills and CI workflows
WalkthroughsDescription• 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 Diagramflowchart 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"]
File Changes1. .claude/skills/communicate/SKILL.md
|
Code Review by Qodo
1. test_cli.py violates naming
|
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>
|



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.yamldeclaresbackend: 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) — themodel:string names the family; the exact quant repo is pinned at serve time.AGENTS.mdis the runtime system prompt;CLAUDE.mdis dev guidance for a Claude residing here to help.Acceptance criteria
uv sync && uv run pytest -n auto -vpasses locally (12 tests).lecodeur --version,whoami,whoami --json,learn,explain backendall work.black --check,isort --check-only,flake8,bandit -r lecodeurclean.tests.yml+publish.ymlpresent;version-checkjob in place.AGENTS.md(runtime) +CLAUDE.md(dev guidance) present;culture.yamldeclaresbackend: acp+ avllm-local/...model..claude/skills/(cicd,communicate,version-bump,run-tests,sonarclaude,doc-test-alignment), each withSKILL.md+scripts/;.claude/skills.local.yaml.examplecommitted..flake8+.markdownlint-cli2.yamlpresent;CHANGELOG.mdstarted.lecodeurtodocs/skill-sources.md's "Downstream copies" column (must be filed on steward, not from here).Notes
whoami'sculture.yamlwalk-up parser is modeled ontelek. Skills + CI workflows are vendored/copied from steward and renamed.--applyto commit) is documented and reserved for future write verbs.version-checkno-ops on this PR (nopyproject.tomlonmainyet — initial scaffold).🤖 Generated with Claude Code