agentleFS
rakaarwakyrakaarwaky/agents-arwaky/skills/aes-architecture/aes-agent/SKILL.md

aes-agent

Skill0 starsChanged 26 days agoMITView on GitHub

AES agent orchestrator scaffolding for Python Rust TS. Use when creating agent files.

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every rule is machine-checked by lint-arwaky-cli scan <layer-path> (see each HOW-TO § Verify).

    line 71
  2. Distinctive:

    Ask these questions in order.

    line 133
  3. Very specific:

    Ensure an _aggregate contract exists — if missing, run aes-contract first.

    line 151
  4. Distinctive:

    Check imports, I/O, computation, error handling, and primitives against HOW-TO § Rules.

    line 154

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

aes-agent

Purpose: Scaffold AES agent orchestrators — orchestration only: call the aggregate, return shared VOs, zero I/O and zero computation. Audience: The agent creating or validating an agent orchestrator file. Scope: Python, Rust, and TypeScript agent_<domain>_orchestrator files — one aggregate, 3-block structure.

The layer decides which suffix, which imports, and which structure apply. Rules, templates, section contracts, and Verify blocks live in the language HOW-TUs under references/.

LanguageFocusBody ruleHOW-TO
PythonOrchestratorOne aggregate; 3-block; zero I/O/computationreferences/HOW-TO-MAKE-PYTHON-AGENT.md
RustOrchestratorOne aggregate; 3-block; zero I/O/computationreferences/HOW-TO-MAKE-RUST-AGENT.md
TypeScriptOrchestratorOne aggregate; 3-block; zero I/O/computationreferences/HOW-TO-MAKE-TYPESCRIPT-AGENT.md

The layer chain:

contract_*_aggregate (created via aes-contract) → agent implements → surface / root call the agent

Each file answers one layer's job. A method or import in the wrong layer is the defect this skill exists to prevent.


Invariants

Every rule is machine-checked by lint-arwaky-cli scan <layer-path> (see each HOW-TO § Verify). A rule cannot drift from the gate. Cite the linter, not this file, when pointing at a rule.

LayerRule
NamingFile agent_<domain>_orchestrator — _orchestrator is the only suffix (AES101/AES102).
Structure3-block order: Block 1 type+injected deps → Block 2 aggregate methods only → Block 3 factories/dunders/helpers. ≥1 aggregate, ≤3 types (AES405).
ImportsShared contracts/taxonomy/utility only — never capabilities, siblings, surface (AES201).
BehaviourNo I/O, no arithmetic/parsing/normalisation, no local domain data, no magic constants, no silently discarded errors.
DIInjected aggregate only (Arc<dyn Trait> in Rust); shared VOs in signatures.
RegisterShared barrel so the root can compose the agent.
Verifylint-arwaky-cli scan <layer-path> → 0. Language compile is fallback only.

Split details, templates, and Section Contract tables: read the language HOW-TO — do not restate them here.


Placement (AES702, AES703)

An agent_*_orchestrator file belongs in a feature folder — a subdirectory of a member directory (crates/, modules/, packages/) that is neither shared/ nor a surface folder:

crates/<feature_name>/src/agent_<domain>_orchestrator.rs    # Rust
modules/<feature_name>/src/agent_<domain>_orchestrator.py  # Python
packages/<feature_name>/src/agent_<domain>_orchestrator.ts # TypeScript

A feature folder is defined as a folder holding at least one agent_*_orchestrator and one capabilities_* file. If a folder holds only capabilities without an agent of its own it is an AES702 violation; if the agent sits in a surface-dominated folder it is also AES702 and the file should be moved out of the surface folder.

An orchestrator may sit at the member root (e.g. packages/agent_calculator_orchestrator.ts) when it routes across features rather than serving one. That makes it a routing aggregate over the features beneath it — it holds one orchestrator per feature and delegates to them. It does not satisfy AES702 for those folders: each feature still owes an orchestrator of its own, so a capabilities folder under a member-level orchestrator is still a split feature.

agent_*_orchestrator files are forbidden in shared/ — that is an AES701 violation and the file must be moved to a feature folder.

Feature folder documents

The feature folder holding this agent also carries two documents at its root, beside the source:

crates/<feature_name>/FRD.md       # what the feature does — requirements
crates/<feature_name>/BACKLOG.md   # where its work stands

The folder name matches the feature it serves. A folder named after a generic word (utils, common, core) describes no feature and cannot carry a meaningful FRD.

A feature folder carrying an agent but neither document is an AES702 violation — the linter names the missing file and you write it.


Diagnostic Tree

Ask these questions in order. The first "No" dictates your next action.

  1. Is this orchestration only — or does it compute / touch I/O / hold domain data?
    • Computes/I-O/data → move to capabilities / taxonomy / utility.
  2. Does an _aggregate contract exist?
    • No → create it first with aes-contract.
  3. Block 2 only aggregate methods? ≥1 aggregate? ≤3 types?
    • No → restructure to 1→2→3; extract free functions to utility.
  4. Any silently discarded errors or raw primitives in signatures?
    • Yes → propagate/Result; wrap primitives in VOs.
  5. Does lint-arwaky-cli scan <layer-path> exit 0?
    • No → fix findings, re-scan.

Workflow

  1. Confirm orchestration only — computation → capabilities, domain data → taxonomy, pure helpers → utility.
  2. Ensure an _aggregate contract exists — if missing, run aes-contract first.
  3. Resolve the feature agent dir. Run lint-arwaky-cli scan <layer-path> — findings are your work list.
  4. Implement the 3 blocks from the language HOW-TO § Template / § Section Contract; inject the aggregate via DI.
  5. Check imports, I/O, computation, error handling, and primitives against HOW-TO § Rules.
  6. Register in the shared barrel, verify with lint-arwaky-cli scan, then compose via aes-root / consume via aes-surface.

Verification

Machine Checks

lint-arwaky-cli scan <layer-path>   # AES101/102, AES201–205, AES401–406 → must be 0
# Fallback only: language compile (python -c import / cargo check / npx tsc --noEmit)

```text

A pass means naming, imports, primitives, and roles are clean. Structural judgement
(tier choice, block order, helper-vs-utility, "orchestration only") is **manual** — see HOW-TO § Rules.

### Human Checks

A machine pass does not mean the file is right. Layer purpose, structural order, and
"only what this layer may do" still need a reader (HOW-TO § Rules).

---

## Pre-flight Checklist

- [ ] `lint-arwaky-cli scan <layer-path>` exits 0.
- [ ] Every touched HOW-TO's `Verify` block was executed.
- [ ] File registered in `__init__.py` / `mod.rs` / `index.ts`.
- [ ] Language fallback compile clean if the HOW-TO lists it.
- [ ] Related skills considered for the next layer up/down.

---

## Common Mistakes (Anti-Patterns)

The linter covers naming, imports, and primitives. These need a reader (HOW-TO § Rules):

- **Computation or I/O in the agent**: arithmetic/parsing/FS/network belong below the agent layer.
- **Silently discarded errors**: no `or ""` / `unwrap_or_default()` / `?? ""` on results.
- **Agent implements protocol instead of aggregate (or both)**: exactly one aggregate, 3-block order.
- **Restating HOW-TO rules in SKILL.md**: delegate — this file only routes.

---

## Related Skills

- `aes-contract`
- `aes-capabilities`
- `aes-surface`

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

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.