Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues

Agent Rules

Forkable modular agent rules with 1-step assembly for local AI coding assistants.

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Installation
  3. Usage
  4. Contributing
  5. Contact

About The Project

Canonical forkable agent rules and profiles for coding assistants under Dev-Centr. Content is meant to be read by agents (from disk) or pasted into an app's rules field.

Fork this repository to your own org or user when you need a private or personalized copy. Upstream portable improvements with pull requests here.

Docs: https://docs.devcentr.org/agent-rules/

Dev-Centr product behavior (when the app acts on behalf of the user) does not live here. It belongs in dev-centr/devcentr-agent-rules.

Architecture

flowchart TB
  subgraph forkable [agent-rules forkable]
    G[general/]
    P[profiles/]
    R[RULES.md]
    M[README.md]
  end
  subgraph product [devcentr-agent-rules]
    X[Dev-Centr product rules]
  end
  subgraph personal [Optional local only]
    Z[CODE_ROOT shortcut or symlink]
  end
  subgraph other [dev-centr/templates]
    W[workspaces payloads docs]
  end
  M --> P
  R --> P
  R --> G
  Z -.-> forkable
  other -->|README links| forkable
  product -.->|used by Dev-Centr app| other
Loading
  • agent-rules (this repository): shared forkable end-user instructions and profiles.
  • devcentr-agent-rules: rules for when the Dev-Centr app acts on behalf of the user (separate repository).
  • templates: project templates; README there links to forkable agent rules, not to personal copies.

Built With

  • Rules format — Markdown modules under general/ and profiles/
  • Assembly — paste RULES.md, or compose via rules-manager
  • Optional template blanksreadme-template

(back to top)

Installation

  1. Clone into your code hive, for example $CODE_ROOT/github.com/<your-username>/agent-rules (see general/folder-schema.md).
  2. Optional path convenience: on Windows, a directory junction can point at this clone (for example mklink /J …\agent-rules <path-to-this-repo>). Junctions are temporary. Prefer configuring dev-centr/rules-manager (rules_repo_path) to compose and watch global + machine sections into $CODE_ROOT/agent-rules.composed.md.
  3. Copy profiles/my-desktop.md or profiles/my-laptop.md to a name you like, set constants (CODE_ROOT, GITHUB_USER, ISSUES_REPO, ENVIRONMENT …). Set ENVIRONMENT to windows, mac, or linux so the agent loads the matching general/windows.md, general/mac.md, or general/linux.md.
  4. RULES.md is written for the agent. It serves as a preamble that commands the AI to assemble its context in one step.
  5. In your AI agent's system prompt or custom instructions field, paste the contents of RULES.md (or the composed file from rules-manager). Before saving, fill in the Dev Configuration section at the top of the pasted block with your actual CODE_ROOT and AGENT_RULES_PATH.

Profile constants (your profiles/*.md)

Constant Required? Purpose
CODE_ROOT Yes Root directory where you clone Git repos (see general/folder-schema.md).
ENVIRONMENT Yes windows, mac, or linux — selects general/windows.md, general/mac.md, or general/linux.md.
GITHUB_USER No Your username for path examples and org layouts.
ISSUES_REPO No Path to your .issues repo if you use that workflow.

(back to top)

Usage

Pointing the agent at this repository

This repository uses a 1-step assembly architecture optimized for local AI harnesses (e.g., Cursor, Windsurf, VSCode, Antigravity) that have filesystem access.

When you paste RULES.md into your agent and define $AGENT_RULES_PATH, you are commanding the AI to perform a batched semantic read of all foundational modules simultaneously using its native tools (e.g., view_file, read_file). This prevents multi-turn ping-pong delays and avoids the common truncation issues associated with traditional CLI cat output.

The agent will automatically pull:

  1. profiles/<infer-profile-name>.md
  2. general/global.md
  3. general/environment.md
  4. general/<windows|mac|linux>.md
  5. general/creator.md
  6. general/folder-schema.md (and general/documentation.md / general/app-architecture.md selectively).

Create $CODE_ROOT/MEMORIES.md for workstation facts (see Machine-local memories below). Do not commit per-repo MEMORIES.md.

For Dev-Centr automation acting on behalf of the user, the product should load rules from devcentr-agent-rules, not from this repository.

Machine-local memories

Canonical file: $CODE_ROOT/MEMORIES.md. Workstation-only; never commit.

Committed template / format: MEMORIES.example.md.

MEMORIES.md inside this agent-rules clone remains gitignored for backwards compatibility; prefer $CODE_ROOT/MEMORIES.md.

Do not commit per-repo MEMORIES.md. Project facts → AGENTS.md + docs.

Example line:

Flutter SDK: `C:\flutter-sdk\flutter\bin` — refresh PATH if `flutter` missing (counter: 1)

Relation to Dev-Centr templates

Project templates (workspaces, payloads, template docs) live in dev-centr/templates. That repo links to agent rules here; it should not embed a second copy of personal rules.

Public README blanks live in dev-centr/readme-template.

(back to top)

Contributing

Add a license file if you want this repository to be reusable by others. Pull requests with portable rule improvements are welcome.

Top contributors

contributors

(back to top)

Contact

DevCentr.org - support@devcentr.org

Project Link: https://github.com/dev-centr/agent-rules

Site: https://devcentr.org

(back to top)

About

Forkable modular agent rules with 1-step assembly for local AI coding assistants.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors