feat(detector): add Django detection (#24)#87
Open
mvanhorn wants to merge 1 commit intosmorchj:mainfrom
Open
Conversation
Closes smorchj#24 Adds Django to TOOL_SIGNATURES using `manage.py` as the canonical root signal. File patterns cover the conventional Django app layout: `**/models.py`, `**/views.py`, `**/urls.py`, `**/settings.py`. Pattern follows the prior framework entries (Express, Next.js, Nuxt) - single `TOOL_SIGNATURES` entry, no version extraction since Python projects don't use package.json.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Django to
TOOL_SIGNATURESinpackages/core/src/analyzer/tool-detector.ts. Same shape as the existing framework entries (Next.js, Nuxt, Astro, Express).Closes #24
Why this matters
Issue #24 lists Django as one of the framework gaps. The detector already covers Node-side frameworks (Next.js / Nuxt / Astro) and a handful of runtimes, but Django projects scanned by Klonode don't currently surface a framework hint in CONTEXT.md. With this entry, the standard Django layout (
manage.pyat root,models.py/views.py/urls.pyper app) gets flagged so Klonode can include it intoolsSummary()output.Changes
packages/core/src/analyzer/tool-detector.ts(+6 lines):Placed after
expressand before// Runtimes, grouped with the other web frameworks.Signal choice
The issue body lists three signals (
manage.py,settings.py,wsgi.py/asgi.py). The existingTOOL_SIGNATURES.signalsarray is checked literally againstexistsSync(join(repoRoot, signal)), so multi-subdir signals like**/settings.pydon't fit the current detector shape.manage.pyat root is the canonical Django marker (django-admin startprojectalways creates it) and is the strongest single signal — it's whatpyprojectandtox.iniecosystem tools use to identify Django projects too. The other Django files are kept infilePatternsso they show up in the watched-files list once Django is detected.Testing
pnpm install --frozen-lockfile-> okpnpm --filter @klonode/core build->Build success in 16ms/dist/index.js 89.04 KBpnpm --filter @klonode/core test->13 passedThis contribution was developed with AI assistance (Claude Code).