Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ cd backend && pip install -r requirements.txt
cd backend && python manage.py migrate
cd backend && python manage.py createsuperuser
cd backend && python manage.py runserver
cd frontend && npm install
cd frontend && npm run dev
cd frontend && bun install
cd frontend && bun run dev
docker compose up -d
cd backend && python manage.py test
cd frontend && npm run test
cd frontend && bun run test
cd backend && ruff check .
cd frontend && npm run lint
cd frontend && bun run lint
cd backend && python manage.py check --deploy
cd frontend && npm run build
cd frontend && bun run build
```

## Architecture
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
python-version: "3.11"
- run: pip install -r requirements.txt 2>/dev/null || echo "No requirements"
- run: python manage.py check --deploy 2>/dev/null || true
- run: python -m pytest --tb=short 2>/dev/null || echo "No tests"
- run: python -m pytest --tb=short 2>/dev/null || echo "No tests"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not mask pytest failures.

Line 13 returns success after any non-zero pytest exit because echo succeeds. 2>/dev/null also hides failure details. Remove the fallback and stderr redirection. If an empty test suite is allowed, handle that case without accepting assertion or import failures.

Based on learnings, run the project’s relevant tests, lint checks, deployment checks, and frontend build before submitting changes.

Proposed fix
-python -m pytest --tb=short 2>/dev/null || echo "No tests"
+python -m pytest --tb=short
📝 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
- run: python -m pytest --tb=short 2>/dev/null || echo "No tests"
- run: python -m pytest --tb=short
🧰 Tools
🪛 zizmor (1.29.0)

[warning] 4-13: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)

🤖 Prompt for 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.

In @.github/workflows/ci.yml at line 13, Update the pytest step in the workflow
to run `python -m pytest --tb=short` directly, removing both the `|| echo "No
tests"` fallback and stderr suppression so assertion and import failures produce
a failing job with visible diagnostics. If empty test suites must remain
allowed, handle only pytest’s no-tests exit condition explicitly without masking
other failures; also run the relevant tests, lint, deployment checks, and
frontend build before submitting.

Source: Learnings

20 changes: 9 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@ jobs:
working-directory: ./frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: oven-sh/setup-bun@v2
with:
node-version: "22"
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run typecheck
cache: bun
- run: bun install --frozen-lockfile
- run: bun run lint
- run: bun run typecheck

frontend-test:
runs-on: ubuntu-latest
Expand All @@ -79,9 +78,8 @@ jobs:
working-directory: ./frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: oven-sh/setup-bun@v2
with:
node-version: "22"
cache: npm
- run: npm ci
- run: npm test
cache: bun
- run: bun install --frozen-lockfile
- run: bun run test
4 changes: 4 additions & 0 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"MD013": false,
"MD040": false
}
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-json
- id: check-toml
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ __pycache__/
.mypy_cache/
.ruff_cache/
.pytest_cache/
**/templates/**/*.html
**/*.html
*.lock
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"singleQuote": false,
"trailingComma": "all",
"printWidth": 120,
"tabWidth": 2
}
29 changes: 29 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Ruff configuration — auto-generated by python-quality MCP server
target-version = "py311"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

rg -n 'target-version|python-version|requires-python|Python 3\.(10|11|12)' .

Repository: rhixecompany/rhixecompany-comics

Length of output: 684


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '.ruff.toml:\n'
cat -n .ruff.toml

printf '\nPython version declarations and Ruff mentions:\n'
rg -n '\b(REQUIRES-PYTHON|requires-python|python_requires|Python 3\.|target-version|ruff)' . -g '!**/.git/**' -g '!**/node_modules/**'

Repository: rhixecompany/rhixecompany-comics

Length of output: 2301


🌐 Web query:

Ruff target-version setting version-specific lint and formatting behavior documentation

💡 Result:

In Ruff, the target-version setting serves as the authoritative indicator of the minimum Python version your project supports [1]. It influences both linting and formatting behaviors to ensure compatibility with your specified environment [2]. Core Behavior and Influence - Linting: Ruff uses target-version to determine which Python features are available [1]. It will avoid suggesting fixes or lint errors that require features newer than your specified version [1]. For example, if target-version is set to py38, Ruff will not suggest modern syntax (such as union types like int | str) that requires Python 3.10+ [1]. - Formatting: The formatter uses this setting to adjust version-specific formatting choices [2]. An example is the parenthesizing of context managers, which may be handled differently depending on the Python version [2]. Configuration and Precedence - Setting target-version: You can define it in your configuration file (e.g., pyproject.toml or ruff.toml) under the [tool.ruff] section using the target-version key (e.g., target-version = "py310") [1][3]. Valid values range from py37 through py315 [3]. - Precedence over requires-python: While Ruff can infer the Python version from the project.requires-python field in your pyproject.toml, an explicit target-version setting will always take precedence if both are present [1]. - Per-file Overrides: If you need to target different versions for specific files (e.g., legacy scripts vs. modern source code), you can use the per-file-target-version setting to map glob-style patterns to specific Python versions [2]. - Inference: When target-version is not explicitly set, Ruff attempts to infer the version by searching for the nearest pyproject.toml and reading the project.requires-python field [3][4]. For projects already using pyproject.toml, it is recommended to use project.requires-python as it adheres to standard Python packaging conventions and is respected by other tools in the ecosystem [1]. [1][3][2][4]

Citations:


Align Ruff’s target-version with the declared Python minimum.

Repository docs state Python 3.10+, but .ruff.toml:2 sets target-version = "py311". Ruff uses this setting as the minimum supported Python version for lint and formatting behavior, so it can miss Python 3.10 incompatibilities. Set this to target-version = "py310", or update the supported runtime to Python 3.11+.

🤖 Prompt for 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.

In @.ruff.toml at line 2, Align the Ruff target-version setting with the
repository’s declared Python 3.10 minimum by changing the target version from
py311 to py310; do not alter the runtime support policy.

line-length = 120

# Enable rules
select = [
"E", # pycodestyle errors
"F", # pyflakes (undefined names, syntax)
"I", # isort (import sorting)
"N", # pep8-naming
"W", # pycodestyle warnings
"UP", # pyupgrade (modern Python)
"B", # flake8-bugbear (bug detection)
"SIM", # flake8-simplify (simplification)
"ARG", # flake8-unused-arguments
"RUF", # ruff-specific rules
]

# Ignore rules
ignore = [
"E501", # line too long (formatter handles this)
"N818", # exception name convention
]

# Format
[format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ celery -A config worker -l info

# Frontend
cd frontend
npm install
npm run dev
npm test
bun install
bun run dev
bun run test
```

## Conventions
Expand Down
58 changes: 58 additions & 0 deletions PLAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: rhixecompany-comics
title: "rhixecompany-comics — Plan"
description: "Plan for rhixecompany-comics generated by repo-plan-spec.py"
version: 1.0.0
status: in_progress
created: 2026-08-01
tags: [plan, repo]
---
# rhixecompany-comics — Plan

## Overview

- **Type:** Dual-stack web platform (Django backend + Next.js frontend)

## Stack

- Languages: mixed/unknown
- Frameworks/libraries: (none auto-detected)
- Entrypoints: none detected

## Repository Notes

- **Type:** Dual-stack web platform (Django backend + Next.js frontend)
- **Pattern:** Two independent stacks sharing a PostgreSQL database, with Celery for async tasks
- **Reference:** [Workflow Analysis](docs/Project_Architecture/Workflow_Analysis.md), [Exemplars](docs/Project_Architecture/exemplars.md)
- **Backend:** Django 4.x + Django REST Framework, Python 3.10+
- **Frontend:** Next.js 16 App Router, TypeScript (strict)
- **Async:** Celery + Redis
Comment on lines +18 to +29

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

rg -n 'mixed/unknown|none auto-detected|none detected|Django 4|requirements: \[\]|acceptance_criteria: \[\]|^-\s+R[0-9]+:|^-\s+AC[0-9]+:' \
  PLAN.md SPEC.md RESEARCH_REPORT.md TECHNOLOGY_STACK.md backend/requirements.txt

Repository: rhixecompany/rhixecompany-comics

Length of output: 1106


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '--- Git tracked relevant files ---\n'
git ls-files | rg '(^|/)(PLAN\.md|SPEC\.md|RESEARCH_REPORT\.md|TECHNOLOGY_STACK\.md|requirements.*\.txt|pyproject\.toml|package\.json|package-lock\.json|yarn\.lock|pnpm-lock\.yaml|pip.*\.txt|setup.*\.py|manage\.py)$|(^|/)docs/Project_Architecture/(Workflow_Analysis|exemplars)\.md$|(^|/)backend/|(^|/)frontend/|(^|/)app/' | sed -n '1,200p'

printf '\n--- PLAN.md top sections ---\n'
sed -n '1,50p' PLAN.md

printf '\n--- SPEC.md front matter and requirements/AC ---\n'
sed -n '1,45p' SPEC.md

printf '\n--- Dependency/version mentions ---\n'
rg -n 'Django|django|djangorestframework|djangorestframework|next|`@next`|typescript|celery|redis|python_requires|Requires-Python|Programming Language :: Python ::|name: .*python|uses: .*python' -S --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' | sed -n '1,240p'

printf '\n--- Dependency files ---\n'
for f in backend/requirements.txt requirements.txt pyproject.toml package.json frontend/package.json app/package.json; do
  if [ -f "$f" ]; then
    echo "===== $f ====="
    sed -n '1,220p' "$f"
  fi
done

Repository: rhixecompany/rhixecompany-comics

Length of output: 261


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- Git tracked relevant files ---'
git ls-files | rg -E '(^|/)(PLAN\.md|SPEC\.md|RESEARCH_REPORT\.md|TECHNOLOGY_STACK\.md|requirements.*\.txt|pyproject\.toml|package\.json|package-lock\.json|yarn\.lock|pnpm-lock\.yaml|pip.*\.txt|setup.*\.py|manage\.py)$|(^|/)docs/Project_Architecture/(Workflow_Analysis|exemplars)\.md$|(^|/)backend/|(^|/)frontend/|(^|/)app/' | sed -n '1,200p' || true

printf '%s\n' ''
printf '%s\n' '--- PLAN.md top sections ---'
sed -n '1,50p' PLAN.md

printf '%s\n' ''
printf '%s\n' '--- SPEC.md front matter and requirements/AC ---'
sed -n '1,60p' SPEC.md

printf '%s\n' ''
printf '%s\n' '--- Dependency/version mentions ---'
rg -n -S 'Django|django|djangorestframework|djangorestframework|next|`@next`|typescript|celery|redis|python_requires|Requires-Python|Programming Language :: Python ::|name: .*python|uses: .*python' --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' | sed -n '1,240p' || true

printf '%s\n' ''
printf '%s\n' '--- Dependency files ---'
for f in backend/requirements.txt requirements.txt pyproject.toml package.json frontend/package.json app/package.json; do
  if [ -f "$f" ]; then
    echo "===== $f ====="
    sed -n '1,220p' "$f"
  fi
done

Repository: rhixecompany/rhixecompany-comics

Length of output: 3985


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- Relevant files summary ---'
git ls-files 'README.md' 'requirements*.txt' 'backend/requirements*.txt' 'pyproject.toml' 'package.json' 'package-lock.json' 'yarn.lock' 'pnpm-lock.yaml' 'setup.py' 'manage.py' '.github/workflows' '*.prompt.md' 'RESEARCH_REPORT.md' 'TECHNOLOGY_STACK.md' 'docs/Project_Architecture' 2>/dev/null | sed -n '1,200p' || true

printf '%s\n' ''
printf '%s\n' '--- Search dependency/version/config/tooling mentions ---'
rg -n -S --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' \
  'Django|django|djangorestframework|Next\.js|next\.js|`@next`|TypeScript|typescript|CELERY|Celery|celery|Redis|redis|requirements|pyproject|eslint|prettier|ruff|cspell|markdownlint|pre-commit|git-cliff|migrations|docker|compose|Python|python' \
  . | sed -n '1,260p' || true

printf '%s\n' ''
printf '%s\n' '--- Dependency/config files (if present) ---'
for f in README.md requirements.txt backend/requirements.txt backend/requirements-dev.txt pyproject.toml package.json package-lock.json yarn.lock pnpm-lock.yaml setup.py manage.py .pre-commit-config.yaml .cspell.json .eslintrc* eslint.config.* pyproject.toml; do
  if [ -f "$f" ]; then
    echo "===== $f ====="
    sed -n '1,240p' "$f"
  fi
done

Repository: rhixecompany/rhixecompany-comics

Length of output: 27198


Regenerate planning metadata from one source of truth.

The generated inventory and SPEC.md front matter disagree with the repository files. PLAN.md says Django 4.x in the notes, but backend/requirements.txt pins Django>=5.0,<5.2, while SPEC.md front matter declares empty requirements and acceptance criteria. Populate those front matter fields from R1-R4 and AC1-AC4, update SPEC.md R1’s detected stack text, and synchronize PLAN.md with the actual dependency values.

📍 Affects 2 files
  • PLAN.md#L18-L29 (this comment)
  • SPEC.md#L9-L10
  • SPEC.md#L20-L23
🤖 Prompt for 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.

In `@PLAN.md` around lines 18 - 29, Regenerate the planning metadata from the
repository source of truth: in PLAN.md, replace the Django 4.x note with the
dependency values from backend/requirements.txt, including Django>=5.0,<5.2; in
SPEC.md, populate the front matter requirements and acceptance criteria from
R1-R4 and AC1-AC4, and update R1’s detected-stack text to match the actual
repository. Apply the requested synchronization at PLAN.md lines 18-29 and
SPEC.md lines 9-10 and 20-23.


## Phases

1. **Inventory** — confirm live config matrix, repo state, and git submodule status on disk.
2. **Research** — per `repo-research-pipeline.prompt.md`: verify RESEARCH_REPORT.md current, links live,
cross-references symmetric.
3. **Planning** — per `repo-management.prompt.md` outputs: branch normalization
(`development` + `production`), ignore-file audit, dependency audit, CI workflow.
4. **Tooling** — apply python-quality / tooling-lint / tooling-config stacks (ruff, pyright, eslint,
prettier, cspell, markdownlint, pre-commit, git-cliff) where applicable. Never overwrite
customized configs — only create missing.
5. **Check** — run every applicable checker via `tooling_full_check.py`; record findings with
exit-code classification (exit 2 = TOOLING FAIL blocker).
6. **Fix** — apply safe auto-fixes only (ruff --fix, prettier --write on code globs, F821, broken
hook imports); flag curated debt as REPORT scope.
7. **Validate** — re-run checkers; write verification summary into the master plan.

## Acceptance

- [ ] RESEARCH_REPORT.md current (or created) with live links
- [ ] Branch structure: development + production only
- [ ] All applicable checkers run without tooling-level failure
- [ ] Findings triaged (FIX vs REPORT)
- [ ] Verification recorded

## Status

Tracked in SPEC.md acceptance criteria. See `.hermes/plans/2026-08-01_async-script-tooling-master.md`
for the master plan.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ celery -A config worker -l info

```bash
cd frontend
npm install
npm run dev
npm test
bun install
bun run dev
bun run test
```

### Docker
Expand Down
13 changes: 8 additions & 5 deletions REPOSITORY_SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Django 4.x + DRF (backend API) + Next.js 16 App Router (frontend) + Celery + Red
## Technology Stack

### Backend

| Layer | Technology |
|-------|------------|
| **Framework** | Django 4.x + Django REST Framework |
Expand All @@ -33,6 +34,7 @@ Django 4.x + DRF (backend API) + Next.js 16 App Router (frontend) + Celery + Red
| **Infra** | Docker Compose, Gunicorn |

### Frontend

| Layer | Technology |
|-------|------------|
| **Framework** | Next.js 16 App Router |
Expand Down Expand Up @@ -88,10 +90,10 @@ celery -A config worker -l info

# Frontend
cd frontend
npm install
npm run dev
npm run build
npm test
bun install
bun run dev
bun run build
bun run test
```

---
Expand All @@ -111,6 +113,7 @@ npm test
## Consolidation Target (P1)

Receives scraping logic from:

- `Django-Scrapy-Selenium` — Scrapy spiders, Selenium utils, Celery tasks
- `selenium_webdriver` — Node.js Selenium scripts (rewrite in Python)
- `comicwise` — Feature overlap (comic reader)
Expand All @@ -120,4 +123,4 @@ Receives scraping logic from:
## CI/CD

**Workflow:** `.github/workflows/rhixecompany-comics-ci.yml`
**Jobs:** Backend (Python: ruff, mypy, pytest) + Frontend (TypeScript, ESLint, Next.js build)
**Jobs:** Backend (Python: ruff, mypy, pytest) + Frontend (TypeScript, ESLint, Next.js build)
4 changes: 4 additions & 0 deletions RESEARCH_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,21 @@
## Key Findings

### Django + Next.js Dual-Stack (2026)

- **Biggest risk:** API field drift — maintain OpenAPI spec; generate TS types from DRF
- **Django at `/api/`** — CORS via `django-cors-headers` 4.9+ with explicit origins
- **Server Actions** — eliminate boilerplate API routes in Next.js
- **Build Adapters API (16.2 stable)** — OpenNext, Cloudflare, Amplify supported
- **`proxy.ts` replaces `middleware.ts`** — explicit boundary for auth and redirects

### Next.js 16 + React 19 (2026)

- **Turbopack default** — 2–5× faster builds, ~400% faster dev startup
- **`"use cache"` directive** — explicit caching replaces implicit magic
- **React Compiler, Server Actions, `use()` hook** — all production-stable

### Celery + Redis Production (2026)

- **Critical config:** `task_acks_late=True`, `task_reject_on_worker_lost=True`
- **Queue separation** — dedicated queues for scraping vs content processing
- **`worker_prefetch_multiplier=1`** — prevent workers from hoarding tasks
Expand Down Expand Up @@ -115,5 +118,6 @@
| Tailwind CSS 4 | <https://tailwindcss.com/docs> |

### Research Methodology

- **Web search:** Tavily search (2026 Django+Next.js dual-stack, Celery, Scrapy patterns)
- **Last verified:** 2026-07-28
36 changes: 36 additions & 0 deletions SPEC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: rhixecompany-comics
title: "rhixecompany-comics — Spec"
description: "Spec for rhixecompany-comics generated by repo-plan-spec.py"
version: 1.0.0
status: in_progress
created: 2026-08-01
tags: [spec, repo]
requirements: []
acceptance_criteria: []
---
# rhixecompany-comics — Spec

## Purpose

- **Type:** Dual-stack web platform (Django backend + Next.js frontend)

## Requirements

- R1: Repo tooling configs present and valid for its stack (mixed/unknown; (none auto-detected)).
- R2: All applicable checkers pass or findings are triaged FIX/REPORT.
- R3: RESEARCH_REPORT.md exists with ≥9 sections and live links.
- R4: PLAN.md and SPEC.md stay in sync with the master plan.

## Acceptance Criteria

- AC1: Config matrix verified on disk (no missing configs for detected stack).
- AC2: Tooling full check completes with zero tooling-level failures.
- AC3: Research report verified (links live, cross-references symmetric).
- AC4: Per-repo verification recorded in the final report.

## Dependencies

- Master plan: `.hermes/plans/2026-08-01_async-script-tooling-master.md`
- Prompts: `.github/prompts/repo-*.prompt.md` family
- Skills: repo-planning, prompt-management, tooling-implementation
Loading
Loading