service-agent
Skill48 starsChanged 6 months agoApache-2.0View on GitHub
Maintains services, domain logic, application layer, policies, ports, and service-local distributed semantics in services/<name>/model.yaml. Owns services/**, fixtures/**, verification/** (service-level). Services are pure libraries — no main.rs, no HTTP server, no message consumer loops. Use when changing services/**, service-owned commands/events/queries, domain rules, ports, policies, service-local tests, or service-local declared semantics. Never implements infrastructure adapters or process entry points.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- backend-engineeringSkill
- contract-agentSkill
- harness-architecture-reviewSkill
- harness-diagnoseSkill
- harness-grillSkill
- harness-tddSkill
- harness-zoom-outSkill
- plannerSkill
- platform-ops-agentSkill
- server-agentSkill
- skill-authoringSkill
- worker-agentSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Ensure domain logic accesses the external world only through ports
- Very specific: line 25
Ensure services are pure libraries (no main.rs, no HTTP server, no consumer loops)
- Distinctive: line 90
Every service model must declare:
- Distinctive: line 108
When adding a new service, prefer copying the nearest matching reference pattern instead of inventing a new structure.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Service Agent
You maintain business capability libraries and their service-local distributed semantics.
Responsibility
- Own all
services/*/directories — domain service libraries - Maintain domain logic, use cases, policies, port definitions
- Maintain
services/<name>/model.yamlas the declared index for service-local distributed semantics - Ensure domain logic accesses the external world only through ports
- Ensure services are pure libraries (no
main.rs, no HTTP server, no consumer loops) - Coordinate with contract-agent when service interfaces change protocol
Read Before Editing
AGENTS.md → global protocol
agent/codemap.yml → module constraints (services layer)
.agents/skills/backend-engineering/SKILL.md → backend quality kernel
platform/model/README.md → platform vs service boundary
services/<name>/model.yaml → service-local declared semantics index
Individual service Cargo.toml and README.mdWritable Directories
| Directory | Scope |
services/** | Service source code and model.yaml |
fixtures/** | Test data and seed data |
verification/** | Service-level validation tests |
packages/contracts/** | When service interfaces change need protocol updates |
Forbidden Directories
| Directory | Reason |
infra/** | Owned by platform-ops-agent |
platform/model/** | Platform-level model owned by platform-ops-agent |
packages/**/adapters/** | Concrete adapter implementations |
servers/** | Owned by server-agent |
workers/** | Owned by worker-agent |
| Another service's directory | Services must not import each other |
Gate Candidates
Select gates from agent/manifests/gate-matrix.yml based on changed paths, risk, and evidence level. Common service signals include:
| Gate | Command |
| Service build check | cargo check -p <service-package> |
| Service tests | cargo test -p <service-package> |
| Typecheck | just typecheck |
| Boundary check | just boundary-check |
Hard Rules
Workflow skills, including backend-engineering, may guide process; this skill's ownership boundaries still apply.
- Services are libraries — no
main.rs, no HTTP server, no consumer loops - Services must NOT import other services (
services/*) - Services must NOT import concrete adapters (
packages/**/adapters/**) - Services must NOT import
infra/**orops/** - External access only through
ports/ - Service-local distributed semantics belong in
services/<name>/model.yaml - Every service model must declare:
owns_entitiesaccepted_commandspublished_eventsserved_queriescross_service_readsspec_completeness
- Non-owner direct writes are forbidden; cross-service mutation must go through command or workflow
Reference Modules
These services are the reference set and should be treated as learning templates:
counter-service→ minimal end-to-end chain, CAS, event publicationtenant-service→ multi-tenant, multi-entity, workflow, compensation
When adding a new service, prefer copying the nearest matching reference pattern instead of inventing a new structure.
Service Structure Convention
Each service should have:
model.yamlCargo.toml,src/lib.rssrc/domain/,src/application/,src/policies/,src/ports/src/events/,src/contracts/tests/,migrations/,README.md
When to Escalate
- Service needs to import another service (extract to shared package or change model)
- Service needs concrete adapter (must go through ports → adapters pattern)
- Service contains
main.rsor process entry point - Service change breaks contracts used by servers/workers/apps
- A service requires workflow semantics but no workflow model exists yet
- A cross-service read cannot be expressed as
query-api,projection, orforbidden
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

