Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/syntaxarc/archipy-plugin/architecture-for-appsgit clone --depth 1 https://github.com/SyntaxArc/archipy-pluginWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00691 | $0.00691 |
| Opus 5 | $0.00345 | $0.00345 |
| Sonnet 5 | $0.00138 | $0.00138 |
| Haiku 4.5 | $0.00069 | $0.00069 |
Grade A, and why
architecture-for-apps scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Architecture for ArchiPy Apps
Use this when building applications that depend on the archipy package (not when maintaining ArchiPy itself).
Live concepts: https://syntaxarc.github.io/ArchiPy/getting-started/concepts/
Layer Map
your_app/
├── configs/ # BaseConfig subclasses, DI containers
├── models/ # Entities, DTOs, errors, types — data structures only
│ └── dtos/{domain}/
│ ├── domain/v{n}/ # Versioned — cross service boundary
│ └── repository/ # Internal — never versioned
├── repositories/
│ └── {domain}/
│ ├── adapters/ # Domain wrappers around ArchiPy adapters
│ └── {domain}_repository.py # Orchestrate adapters; map to DTOs
├── logics/
│ └── {domain}/ # Use-case / unit-of-work boundaries
└── services/
└── {domain}/v{n}/ # Transport (HTTP/gRPC routers), versioned
Optional app-local helpers (prefer archipy.helpers first): helpers/{utils,decorators,interceptors}/.
Call Flow
services → logics (atomic UoW) → repositories → adapters → ArchiPy
Plugin shorthand
@atomicmeans a real*_sqlalchemy_atomic_decorator— there is no decorator namedatomic.
Layer Rules
Layer details live in the matching using-archipy-*.mdc / config-and-di.mdc / testing-bdd-for-apps.mdc rules when
those files are open. This always-on rule keeps only the global map:
- models/ — data only (no I/O, no business rules).
- repositories/ — domain data access; adapters under
repositories/{domain}/adapters/; no cross-domain repo calls; map driver errors withraise ... from e. - logics/ — business rules + UoW (
*_sqlalchemy_atomic_decorator); may call other logics; never other domains' repositories; no FastAPI/gRPC. - services/ — thin transport; versioned
v{n}/; no UoW / business rules. - helpers/ — pure only; prefer ArchiPy; no adapter construction at module level.
- configs/ — extend
BaseConfig;set_globalonce; no secrets in code.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 70 lines · 691 tokens per session scan A 8e459e7af121
architecture-for-apps is a cursor rule published in the GitHub repository SyntaxArc/archipy-plugin (2 stars, last pushed 8d ago), licensed MIT. It adds 691 tokens to every session, about $0.0035 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
python
Cursor rule "python" from jhl-labs/vibe-project, covering python rules, style guide, naming, imports and order: stdlib → third-party → local.
typescript
TypeScript/JavaScript specific rules.
architecture
Clean Architecture rules.
cursorrules
Cursor rule "cursorrules" from jhl-labs/vibe-project, covering cursor ai rules, ⚠️ deprecation notice, this .cursorrules file format is deprecated, please migrate to the new project rules system and 📁 .cursor/rules/.mdc.
general
General coding rules for all files.
architect
Winston — System Architect agent.