Skip to content

feat(lint): enforce package architecture boundaries #917

@hansjm10

Description

@hansjm10

Sequence

Order: 9 of 12
Phase: Phase 3 - Mechanical Architecture Guardrails
Design: docs/agent-first-workflow-design.md
Tracker: #908
Depends on: #916

Agent Role

Architecture Guard Agent

Scope

  • Add mechanical package/domain boundary checks for the monorepo.
  • Prefer ESLint rules or structural tests with remediation messages agents can act on.
  • Document allowed and disallowed dependency edges before making checks blocking.

Context Packet

  • docs/agent-first-workflow-design.md
  • docs/agent-map.md if present
  • packages/config-eslint/index.js
  • eslint.config.mjs
  • Package-level eslint.config.js files
  • packages/core/README.md
  • packages/shell-desktop/README.md

Acceptance Criteria

  • The check prevents packages/core from importing shell, renderer implementations, docs, or tool packages.
  • The check prevents renderer-contract from importing renderer implementations.
  • The check prevents content schema/compiler packages from importing shell-desktop.
  • Game/app-facing packages continue to avoid accidental @idle-engine/core/internals usage.
  • Legitimate shell-desktop integration paths are documented and covered by tests or examples.
  • Failure messages explain the preferred dependency direction or import surface.

Validation

  • pnpm lint
  • pnpm test:ci --filter @idle-engine/config-eslint if tests are added
  • pnpm fast:check

Notes

  • If current violations exist, either fix them in small scoped commits or start the rule in report/warn mode with explicit follow-up issues.

Refs #906

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions