Skip to content

Agent instructions: AGENTS.md, per-area rules and /new-feature skill - #124

Open
amaury901130 wants to merge 3 commits into
mainfrom
feat/agent-rules
Open

amaury901130 wants to merge 3 commits into
mainfrom
feat/agent-rules

Conversation

@amaury901130

Copy link
Copy Markdown
Collaborator

Description

Sets up the instructions AI coding agents follow in this repository, describing the code as it is today.

  • AGENTS.md (was CLAUDE.md) is the single source for every agent: architecture, commands, hard rules, definition of done, plus an index of the detailed rules. CLAUDE.md now imports it and adds Claude Code specifics. Cursor, Copilot and Codex read AGENTS.md natively.
  • .claude/rules/: one rule file per area, each scoped to the files it applies to (Claude Code loads them automatically):
    • architecture: layers, dependency direction, GetIt DI and startup order
    • new-feature: planning, the files to create in build order, done criteria
    • state-management: Cubits, BaseCubit/Resource, global vs screen cubits, BlocBuilder/BlocListener
    • domain, data: models, repository interfaces, services; Dio, DTOs, Failure mapping, Preferences
    • presentation, theme: page structure, material_ui imports, reusable widgets; where the palettes, color roles and text styles are defined and how to use them
    • localization: .arb → flutter gen-l10n → S.of(context), placeholders, adding a language
    • navigation, testing, workspace: go_router, bloc_test + mocktail, FVM/Melos/workspace/initializer/platforms
  • /new-feature skill (.claude/skills/new-feature/): builds a feature end to end following those rules.
  • Outdated rules replaced: .cursor/rules/*.mdc and .github/instructions/* prescribed conventions the code doesn't follow (PascalCase service file names, ALL_CAPS constants, a parseFlexibleNumber helper that doesn't exist). They are replaced by .cursor/rules/project.mdc and .github/copilot-instructions.md, which point to AGENTS.md.
  • README documentation section and known-issues Network Image Managament #14/Add Tech Guides in the Company Repo #15 updated; .claude/settings.local.json is git-ignored.

Documentation only; no code changes. Every claim in the rules was checked against the current code, and all relative links resolve. melos run verify passes.

Issue

N/A

Preview

N/A (documentation only)

Notes:

Translations are generated by Flutter's gen-l10n (since the Flutter 3.50 upgrade, #123), not intl_utils; the rules describe it that way.

🤖 Generated with Claude Code

amaury901130 and others added 3 commits December 4, 2026 10:38
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Path-scoped rules in .claude/rules/ (architecture, new feature, Cubits,
domain, data, presentation, theme, localization, navigation, testing,
workspace) and a Claude Code skill that builds a feature end to end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The old rules contradicted the code. They now point to AGENTS.md and
.claude/rules/. README and known-issues reflect the change; personal
Claude Code settings are git-ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant