메뉴
HN
Hacker News 46일 전

에이전트·인간 협업 최적화 풀스택 파이썬 프레임워크 'Plain' 공개

IMP
8/10
핵심 요약

개발자와 AI 코딩 에이전트(Claude, Codex 등)가 함께 사용할 수 있도록 설계된 새로운 풀스택 파이썬 프레임워크 'Plain'이 공개되었습니다. 이 프레임워크는 명시적이고 타입 기반의 구조를 채택하여 인간과 에이전트 모두가 코드를 쉽게 이해하고 다룰 수 있도록 돕습니다. 또한 자체 문서 탐색, 성능 최적화, 버그 리포팅 등 에이전트가 자동으로 수행할 수 있는 내장 툴링과 스킬(Skill)을 제공하는 것이 핵심입니다.

번역된 본문

Plain 인간과 에이전트를 위해 설계된 풀스택 파이썬 프레임워크.

시작하기 mkdir my-app && cd my-app && claude "$(curl -sSf https://plainframework.com/start.md)" Claude뿐만 아니라 Codex, Amp, OpenCode 또는 원하는 에이전트와도 함께 작동합니다.

왜 Plain인가? 명시적이고(Explicit), 타입 기반이며(typed), 예측 가능합니다(predictable). 인간에게 좋은 것은 에이전트에게도 좋습니다.

Plain 코드는 다음과 같이 생겼습니다:

# app/users/models.py
from plain import postgres
from plain.postgres import types
from plain.passwords.models import PasswordField

@postgres.register_model
class User(postgres.Model):
    email: str = types.EmailField()
    password: str = PasswordField()
    display_name: str = types.CharField(max_length=100)
    is_admin: bool = types.BooleanField(default=False)
    created_at: datetime = types.DateTimeField(auto_now_add=True)

    query: postgres.QuerySet[User] = postgres.QuerySet()

    model_options = postgres.Options(
        constraints=[
            postgres.UniqueConstraint(fields=["email"], name="unique_email"),
        ],
    )

뷰(Views)는 클래스 기반입니다:

# app/users/views.py
from plain.views import DetailView
from .models import User

class UserDetail(DetailView):
    template_name = "users/detail.html"

    def get_object(self):
        return User.query.get(pk=self.url_kwargs["pk"])

URL은 Router 클래스를 사용합니다:

# app/users/urls.py
from plain.urls import Router, path
from . import views

class UsersRouter(Router):
    namespace = "users"
    urls = [
        path("<int:pk>/", views.UserDetail),
    ]

에이전트 툴링(Agent tooling) Plain 프로젝트는 에이전트가 자동으로 사용하는 내장 툴링을 포함합니다.

  • 규칙(Rules) — 프로젝트 규칙 파일(예: Claude Code의 경우 .claude/rules/)에 저장되는 항상 활성화된 가드레일(guardrails). 가장 흔한 실수를 방지하는 짧은 파일(~50줄)입니다.
  • 문서(Docs) — 커맨드라인에서 요청 시 액세스할 수 있는 전체 프레임워크 문서:
    • plain docs models # 전체 문서
    • plain docs models --section querying # 특정 섹션만
    • plain docs models --api # 타입이 지정된 시그니처만
    • plain docs --search "queryset" # 모든 패키지에서 검색
  • 스킬(Skills) — 슬래시 명령어로 트리거되는 엔드투엔드 워크플로우:
    • /plain-install — 새 패키지를 추가하고 설정 과정을 안내
    • /plain-upgrade — 버전을 올리고, 변경 로그를 읽고, 호환성 깨짐(Breaking changes)을 적용하며, 검사를 실행
    • /plain-optimize — 성능 추적을 캡처하고, 느린 쿼리 및 N+1 문제를 식별하여 수정 사항을 적용
    • /plain-bug — 컨텍스트를 수집하고 GitHub 이슈로 버그 리포트를 제출

CLI 모든 명령어는 uv run과 함께 실행됩니다 (예: uv run plain dev).

  • plain dev — 자동 새로고침 및 HTTPS가 지원되는 개발 서버 시작
  • plain fix — 하나의 명령어로 Python, CSS, JS 포맷 및 린트(Lint) 수행
  • plain check — 린팅, 사전 확인(Preflight), 마이그레이션 및 테스트 검증
  • plain test — 테스트 실행(pytest)
  • plain docs --api — LLM을 위해 포맷팅된 공개 API 표면

기술 스택(Stack) Plain은 독자적인 철학을 가지고 있으며(Opinionated), 다음 기술들을 기반으로 구축되었습니다:

  • Python: 3.13+
  • Database: Postgres
  • Templates: Jinja2
  • Frontend: htmx, Tailwind CSS
  • Python tooling: uv(패키지), ruff(린트/포맷), ty(타입 검사) — 모두 Astral에서 제공
  • JavaScript tooling: oxc(린트/포맷), esbuild(번들링)
  • Testing: pytest

패키지(Packages) 30개의 자체(First-party) 패키지가 하나의 프레임워크를 이룹니다. 모두 내장 문서를 제공합니다.

  • Foundation(기반): plain(코어 프레임워크), plain.postgres(데이터베이스 ORM), plain.auth(인증), plain.sessions(세션 스토리지)
  • Backend(백엔드): plain.api(REST API), plain.jobs(백그라운드 작업), plain.email(이메일 발송), plain.cache(캐싱 레이어), plain.redirection(URL 리다이렉트), plain.vendor(벤더링된 종속성)
  • Frontend(프론트엔드): plain.htmx(동적 UI), plain.tailwind(CSS 프레임워크), plain.elements(HTML 컴포넌트), plain.pages(정적 페이지), plain.esbuild(JS 번들링)
  • Development(개발): plain.dev(로컬 서버), plain.pytest(테스트 헬퍼), plain.toolbar(디버그 툴바), plain.code(코드 포맷팅), plain.portal(원격 쉘 및 파일 전송), plain.tunnel(개발 터널링), plain.start(프로젝트 시작)
  • Production(프로덕션): plain.admin(데이터베이스 관리), plain.observer(요청 추적), plain.flags(기능 플래그), plain.scan(보안 스캐닝), plain.pageviews(분석), plain.support(지원 티켓)
  • Users(사용자): plain.passwords(비밀번호 관리) 외
원문 보기
원문 보기 (영어)
Plain The full-stack Python framework designed for humans and agents. Get started mkdir my-app && cd my-app && claude "$(curl -sSf https://plainframework.com/start.md)" Also works with Codex, Amp, OpenCode, or your agent of choice. Why Plain? Explicit, typed, and predictable. What's good for humans is good for agents. Here's what Plain code looks like: # app/users/models.py from plain import postgres from plain . postgres import types from plain . passwords . models import PasswordField @ postgres . register_model class User ( postgres . Model ): email : str = types . EmailField () password : str = PasswordField () display_name : str = types . CharField ( max_length = 100 ) is_admin : bool = types . BooleanField ( default = False ) created_at : datetime = types . DateTimeField ( auto_now_add = True ) query : postgres . QuerySet [ User ] = postgres . QuerySet () model_options = postgres . Options ( constraints = [ postgres . UniqueConstraint ( fields = [ "email" ], name = "unique_email" ), ], ) Views are class-based: # app/users/views.py from plain . views import DetailView from . models import User class UserDetail ( DetailView ): template_name = "users/detail.html" def get_object ( self ): return User . query . get ( pk = self . url_kwargs [ "pk" ]) URLs use a Router class: # app/users/urls.py from plain . urls import Router , path from . import views class UsersRouter ( Router ): namespace = "users" urls = [ path ( "<int:pk>/" , views . UserDetail ), ] Agent tooling Plain projects include built-in tooling that agents use automatically. Rules — Always-on guardrails stored in project rules files (e.g. .claude/rules/ for Claude Code). Short files (~50 lines) that prevent the most common mistakes. Docs — Full framework documentation, accessible on demand from the command line: plain docs models # full docs plain docs models --section querying # one section plain docs models --api # typed signatures only plain docs --search "queryset" # search across all packages Skills — End-to-end workflows triggered by slash commands: /plain-install — add a new package and walk through setup /plain-upgrade — bump versions, read changelogs, apply breaking changes, run checks /plain-optimize — capture performance traces, identify slow queries and N+1 problems, apply fixes /plain-bug — collect context and submit a bug report as a GitHub issue CLI All commands run with uv run (e.g. uv run plain dev ). plain dev — start dev server with auto-reload and HTTPS plain fix — format and lint Python, CSS, and JS in one command plain check — linting, preflight, migration, and test validation plain test — run tests (pytest) plain docs --api — public API surface, formatted for LLMs Stack Plain is opinionated. These are the technologies it's built on: Python: 3.13+ Database: Postgres Templates: Jinja2 Frontend: htmx, Tailwind CSS Python tooling: uv (packages), ruff (lint/format), ty (type checking) — all from Astral JavaScript tooling: oxc (lint/format), esbuild (bundling) Testing: pytest Packages 30 first-party packages, one framework. All with built-in docs. Foundation: plain — core framework plain.postgres — database ORM plain.auth — authentication plain.sessions — session storage Backend: plain.api — REST APIs plain.jobs — background jobs plain.email — sending email plain.cache — caching layer plain.redirection — URL redirects plain.vendor — vendored dependencies Frontend: plain.htmx — dynamic UI plain.tailwind — CSS framework plain.elements — HTML components plain.pages — static pages plain.esbuild — JS bundling Development: plain.dev — local server plain.pytest — testing helpers plain.toolbar — debug toolbar plain.code — code formatting plain.portal — remote shell and file transfer plain.tunnel — dev tunneling plain.start — project starter Production: plain.admin — database admin plain.observer — request tracing plain.flags — feature flags plain.scan — security scanning plain.pageviews — analytics plain.support — support tickets Users: plain.passwords — password auth plain.oauth — social login plain.loginlink — magic links About Plain is a fork of Django , driven by ongoing development at PullApprove — with the freedom to reimagine it for the agentic era. Docs: https://plainframework.com/docs/ Source: https://github.com/dropseed/plain Getting started: https://plainframework.com/start/ License: BSD-3