본문으로 건너뛰기
cccskills
무료GitHub에 공개

mas-module-boundary

Define and enforce backend module boundaries for Python services. Use when adding or refactoring backend code under app/, reviewing dependency direction, deciding layer ownership, or preventing logic leakage across schema/api/core/services/task/utils modules.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

AUTO-MAS-Project/AUTO-MAS스타 757(GitHub 757 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(2)

  • SKILL.md6.4 KB
  • agents/openai.yaml249 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

MAS Module Boundary

Objective

Keep backend code maintainable by enforcing clear ownership, dependency direction, and placement rules across modules.

Layer Model

  1. models/schema: external API contract and typed data structure.
  2. api: request parsing, response shaping, transport concerns.
  3. core: orchestration, lifecycle, task scheduling, state coordination.
  4. task: script-domain execution flow.
  5. services: system/network/integration capabilities.
  6. utils: reusable low-level helpers with no business policy.

Current Dev Map

  1. API routes: app/api/*.py
  2. Runtime orchestration: app/core/*.py
  3. Schema/config/runtime models: app/models/schema.py, app/models/config.py, app/models/task.py, app/models/ConfigBase.py
  4. Script domains: app/task/MAA, app/task/general, app/task/SRC

Dependency Direction

  1. api -> core/services/models.schema
  2. core -> services/task/models/utils
  3. task -> core/services/models/utils
  4. services -> utils/models
  5. models -> none of api/core/services/task

Disallowed examples:

  1. models/schema importing core or services
  2. utils importing core or api
  3. services importing concrete api routers
  4. api embedding long-running workflow loops directly

Ownership Rules

  1. app/models/schema.py: naming, typing, field descriptions only. No filesystem, network, process, or business branching.
  2. app/api/*: accept *In, return *Out/OutBase, validate input, call core/services, shape response.
  3. app/core/*: own global coordination, lifecycle, config composition, task scheduling, and broadcast.
  4. app/task/*: own per-script execution lifecycle (check/prepare/run/final) and domain task decisions.
  5. app/services/*: wrap external integrations and provide stable capabilities to core/task.
  6. app/utils/*: generic helpers and low-level adapters only. No domain policy and no orchestrator imports.
  7. Script-config import/restore policy belongs to core/task orchestration, not api or schema: AUTO-MAS manages other scripts by swapping their config files/folders before and after task execution.
  8. Script success/failure heuristics based on log text, log timestamp, and process exit belong to orchestrators and log-monitor helpers, not to schema models or transport handlers.

Placement Decision Tree

  1. Request/response contract or DTO typing -> models/schema
  2. Endpoint parsing and response mapping -> api
  3. Cross-task orchestration or global runtime state -> core
  4. Script-domain run logic -> task/<domain>
  5. OS/network/third-party integration -> services
  6. Reusable, context-agnostic helper -> utils

Cross-Cutting Rules

  1. Avoid circular imports; if seen, extract interface/helper to a lower layer.
  2. Avoid direct config file IO in api; use a core facade.
  3. Keep business constants close to the owning domain layer.
  4. Shared schema semantics should align with mas-schema-naming.
  5. New config modes or raw-config capabilities must be end-to-end complete: model field, edit entry, persistence path, and runtime consumer must all exist before the feature is considered real.
  6. Do not leave placeholder config fields, fake detailed-mode branches, or dead save paths in one layer when no owning runtime path exists.
  7. Do not create standalone builder, loader, or helper-service modules for a feature that has no second call site and no real ownership boundary.
  8. If a domain can be expressed as one task class plus nearby local helpers, prefer that over creating a mini-subsystem inside the domain folder.
  9. When adding support for a new external script, preserve the product's config-copy plus log-monitor architecture instead of embedding script-specific state machines into shared layers.
  10. Script-specific adaptation is cross-layer by design: add the script config/user config in app/models/config.py, expose schema types in app/models/schema.py, add endpoints in app/api/scripts.py, extend global config orchestration in app/core/config.py, and add task dispatch in app/core/task_manager.py. app/api/scripts.py holds endpoints only: parse the request, call a function exposed by the owning app/task/<Xxx>/ module, shape the response model. Directory handling, import, update, validation, and group propagation belong in the script domain; do not define script-private helpers in the API layer. The MaaFW engine under app/task/MaaFW/ is the exception: its tools/core/ packages must stay host-agnostic and its worker subprocess must not import host modules — see app/task/MaaFW/AGENTS.md before touching it.
  11. For a new script domain, start from the closest existing task folder shape, commonly app/task/general, then rename and adapt domain-specific config, run, manual-review, and manager code in place.

Anti-Patterns

  1. Business rules inside schema definitions.
  2. Route handlers containing workflow loops or retry engines.
  3. Utility modules importing orchestrators for convenience.
  4. Duplicated policy checks spread across api/core/task without an owner.
  5. A new domain folder that introduces multiple thin modules without actual reuse or boundary pressure.
  6. Route handlers or module-private helpers in app/api/ that carry script-specific business (directory layout, import/update flows, config migration) instead of calling the owning app/task/<Xxx>/ module.

PR Boundary Checklist

  1. Each changed file belongs to the right layer by responsibility.
  2. New imports follow allowed dependency direction.
  3. No new circular dependency is introduced.
  4. Schema changes do not add business execution logic.
  5. API changes keep the thin-controller pattern.
  6. Core/task/services boundaries remain explicit and testable.
  7. New configuration concepts are complete across model, UI, and runtime, or they are not introduced yet.
  8. New helper modules justify their existence with reuse or a real dependency boundary, not just naming neatness.
  9. New script support is complete across config templates, schema, API, task manager dispatch, task folder, and frontend entry points before it is treated as implemented.
  10. Searches for the source template domain, such as GeneralConfig/GeneralUserConfig, were used to find all required registry and branch updates.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

从固定点(commit、branch、tag 或 merge-base)开始,沿两条轴线审查变更——规范(代码是否遵循仓库文档化的编码规范?)和规格(代码是否与原始 issue/PRD 的要求一致?)。两条审查线在并行子 agent 中运行,并以并排方式报告结果。当用户想审查一个分支、PR、进行中的变更,或要求"从 X 开始审查"时使用。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

AUTO-MAS-Project/AUTO-MAS7572026년 10월 26일 업데이트

grill-me

무료

一场无休止的盘问,用来打磨你的计划或设计。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

AUTO-MAS-Project/AUTO-MAS7572026년 10월 26일 업데이트

grilling

무료

对用户的计划、决策或想法进行层层盘问。当用户想要压力测试自己的思考,或使用任何 'grill' 触发短语时使用。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

AUTO-MAS-Project/AUTO-MAS7572026년 10월 26일 업데이트

Define backend API contract standards for FastAPI services. Use when adding or refactoring HTTP/WebSocket endpoints in app/api, designing request/response schemas in app/models/schema.py, standardizing status/error contracts, and maintaining backward compatibility for clients.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

AUTO-MAS-Project/AUTO-MAS7572026년 10월 26일 업데이트

Use when an AUTO-MAS PR is red in CI, when reproducing a dev-PR gate locally before pushing, when a workflow needs a skip-changelog or changelog-maintenance label, or when editing .github/workflows, .github/actions, scripts/changelog.py or scripts/check_reverts.py. Covers every gate that runs on a PR to dev and the exact local command for each.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

AUTO-MAS-Project/AUTO-MAS7572026년 10월 26일 업데이트

Use when implementing, fixing, refactoring, or reviewing non-generated AUTO-MAS code, or when preparing code-style guidance, comments, docstrings, version notes, or Conventional Commit wording. Skip read-only diagnosis, explanation, exploration, and planning unless code conventions are requested.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

AUTO-MAS-Project/AUTO-MAS7572026년 10월 26일 업데이트

AUTO-MAS-Project의 스킬 모두 보기

이 스킬의 문제 신고