Skip to content

Add Python project standards to setuplab skill and docs#2945

Merged
mabry1985 merged 2 commits intodevfrom
feature/add-python-project-standards-to
Mar 19, 2026
Merged

Add Python project standards to setuplab skill and docs#2945
mabry1985 merged 2 commits intodevfrom
feature/add-python-project-standards-to

Conversation

@mabry1985
Copy link
Contributor

@mabry1985 mabry1985 commented Mar 19, 2026

Summary

setuplab currently only defines a TypeScript/Node.js gold standard. Add Python project support.

setuplab skill update (packages/mcp-server/plugins/automaker/commands/setuplab.md)

Add a Python Gold Standard table alongside the existing one:

Layer Standard
Package config pyproject.toml (PEP 621), no requirements.txt
Linting ruff (replaces black+flake8+isort)
Testing pytest + pytest-cov, tests outside container with mocks
Type checking Pylance in editor, ...

Recovered automatically by Automaker post-agent hook

Summary by CodeRabbit

  • Documentation
    • Added a Python development standards guide covering package config, linting/formatting, testing conventions, type-checking guidance, containerization, and CI/CD practices.
    • Provided CI and Docker guidance and example workflows for linting, testing, and build pipelines.
    • Introduced project type detection and gap-detection rules to automatically classify Python projects and flag missing components for review.

@mabry1985 mabry1985 enabled auto-merge (squash) March 19, 2026 10:13
@coderabbitai
Copy link

coderabbitai bot commented Mar 19, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 71f480fe-6e4d-4d94-928e-4f67ee21a9f3

📥 Commits

Reviewing files that changed from the base of the PR and between 31a3017 and cf24c75.

📒 Files selected for processing (1)
  • docs/internal/dev/python-standards.md

📝 Walkthrough

Walkthrough

Adds a new Python standards document for velocity stack projects and updates automaker's setuplab guidance to detect Python projects and apply those standards based on presence of .py files and Dockerfile (with mixed-stack handling when package.json is present).

Changes

Cohort / File(s) Summary
Python Standards Documentation
docs/internal/dev/python-standards.md
Adds a new blueprint describing PEP 621 (pyproject.toml) package config, ruff lint/format rules, pytest testing and coverage guidance, incremental type-checking approach (Pylance → mypy/pyright), Docker/Docker Compose templates, GitHub Actions CI template, and gap-detection signals.
Project Type Detection & Guidance
packages/mcp-server/plugins/automaker/commands/setuplab.md
Introduces a Python section under “Our Gold Standard” and project type detection rules: choose Python standard when .py and Dockerfile exist without package.json; choose TypeScript when package.json exists; apply per-layer standards for mixed stacks and flag for human review.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐇 I dug a code-lined burrow deep,
I nibbled ruff and tests while others sleep.
Pyproject snug, pytest in sight,
CI hops in on main at night.
Hop—standards set, the stack feels right. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding Python project standards to both setuplab and documentation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/add-python-project-standards-to
📝 Coding Plan
  • Generate coding plan for human review comments

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

Copy link

@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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/internal/dev/python-standards.md`:
- Around line 84-92: The fenced code block showing the test directory tree (the
block starting with "tests/" and containing unit/ integration/ and conftest.py)
is missing a language tag which triggers MD040; update the opening fence from
``` to ```text to mark it as plain text so the linter recognizes it (i.e., add
the "text" language identifier to the code fence surrounding that tree snippet).

In `@packages/mcp-server/plugins/automaker/commands/setuplab.md`:
- Around line 78-80: The current classifier logic in the "Python project" rule
(the bullet line that checks for `.py` files, `Dockerfile`, and absence of
`package.json`) wrongly requires a Dockerfile to identify a Python repo; change
the detection to treat presence of `.py` files or `pyproject.toml` as sufficient
to classify a layer as Python (i.e., evaluate `.py`/`pyproject.toml` first), and
then separately add a check that emits a "missing Dockerfile" gap if no
Dockerfile is present rather than preventing Python classification; keep the
existing TypeScript/Node.js rule (presence of `package.json`) and the Mixed rule
behavior unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cb5ca40e-67f6-4c0d-ad8d-184e76200276

📥 Commits

Reviewing files that changed from the base of the PR and between 65520f7 and 31a3017.

📒 Files selected for processing (2)
  • docs/internal/dev/python-standards.md
  • packages/mcp-server/plugins/automaker/commands/setuplab.md

Comment on lines +84 to +92
```
tests/
unit/
test_classifier.py
test_parser.py
integration/
test_pipeline.py
conftest.py
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add language identifier to fenced code block

The tree snippet fence is missing a language tag, which triggers MD040.

Proposed fix
-```
+```text
 tests/
   unit/
     test_classifier.py
     test_parser.py
   integration/
     test_pipeline.py
 conftest.py
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 84-84: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/internal/dev/python-standards.md` around lines 84 - 92, The fenced code
block showing the test directory tree (the block starting with "tests/" and
containing unit/ integration/ and conftest.py) is missing a language tag which
triggers MD040; update the opening fence from ``` to ```text to mark it as plain
text so the linter recognizes it (i.e., add the "text" language identifier to
the code fence surrounding that tree snippet).

Comment on lines +78 to +80
- **Python project** — presence of `.py` files, `Dockerfile`, and no `package.json` → apply Python standard
- **TypeScript/Node.js project** — presence of `package.json` → apply TypeScript/Node.js standard
- **Mixed** — both present → apply TypeScript standard for JS/TS layers, Python standard for Python layers; flag for human review
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Python detection currently misses valid Python repos without Dockerfile

Requiring Dockerfile in the classifier means Python repos that should be flagged as missing containerization won’t be treated as Python at all. Consider classifying Python by .py (and/or pyproject.toml) first, then reporting missing Dockerfile as a gap.

Proposed adjustment
-- **Python project** — presence of `.py` files, `Dockerfile`, and no `package.json` → apply Python standard
+- **Python project** — presence of `.py` files (or `pyproject.toml`) and no `package.json` → apply Python standard
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Python project** — presence of `.py` files, `Dockerfile`, and no `package.json` → apply Python standard
- **TypeScript/Node.js project** — presence of `package.json` → apply TypeScript/Node.js standard
- **Mixed** — both present → apply TypeScript standard for JS/TS layers, Python standard for Python layers; flag for human review
- **Python project** — presence of `.py` files (or `pyproject.toml`) and no `package.json` → apply Python standard
- **TypeScript/Node.js project** — presence of `package.json` → apply TypeScript/Node.js standard
- **Mixed** — both present → apply TypeScript standard for JS/TS layers, Python standard for Python layers; flag for human review
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/mcp-server/plugins/automaker/commands/setuplab.md` around lines 78 -
80, The current classifier logic in the "Python project" rule (the bullet line
that checks for `.py` files, `Dockerfile`, and absence of `package.json`)
wrongly requires a Dockerfile to identify a Python repo; change the detection to
treat presence of `.py` files or `pyproject.toml` as sufficient to classify a
layer as Python (i.e., evaluate `.py`/`pyproject.toml` first), and then
separately add a check that emits a "missing Dockerfile" gap if no Dockerfile is
present rather than preventing Python classification; keep the existing
TypeScript/Node.js rule (presence of `package.json`) and the Mixed rule behavior
unchanged.

@mabry1985 mabry1985 merged commit 13c364b into dev Mar 19, 2026
2 of 4 checks passed
@mabry1985 mabry1985 deleted the feature/add-python-project-standards-to branch March 19, 2026 11:03
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