agentleFS
TairitsuaTairitsua/Monica/skills/monica-development/SKILL.md

monica-development

Skill18 starsChanged 7 months agoMITView on GitHub

Implement or refactor Monica framework modules, registration, discovery, diagnostics, Facades, result envelopes, and hosted services. Use for module internals; application consumers use the matching monica-infra skill.

The file

Files
SKILL.md

Monica Framework Development

Apply $monica-coding-standards during implementation and review; use $monica-architecture for layer and public-boundary decisions. This skill owns the framework module lifecycle and deliberate Result boundaries. A module strategy derives from MonicaModule<TOptions>; its public IMonicaBuilder entry returns a host-bound ModuleRegistration<TModule,TOptions> inside builder.AddMonica(...). The concrete module Type is graph identity. ModuleKey is diagnostic only. First-party strategies and registration extensions live in Monica.Modules; independently published packages use $monica-third-party-module-development.

Declare hard dependencies with Require<TModule>(), optional ordering with AfterIfPresent<TModule>(), and baseline feature requirements in Describe(ModuleDescriptor). Keep graph shape independent of options. A provider or optional capability can call SatisfyFeature(...); a selected capability that requires the web host calls RequireWebHost(reason). Keep baseline behavior in the module so direct and transitive registration behave alike. Options hold developer configuration, not mutable runtime registries. See registration-runtime.md for typed option contributions, lifecycle, state, discovery, and diagnostics contracts.

IUIModule, IWebModule, and IWebHostRequiredModule express separate facts. Implement IWebModule for actual endpoint or middleware contributions, and use named ModuleWebStage boundaries. A UI-only composition module can be IUIModule without a web marker. An opt-in web feature should add its requirement through registration rather than make the entire module web-host-only.

Facades at a deliberate host/UI boundary use Result or Result<T>; internal services return normal .NET types and throw exceptions. Construct outcomes explicitly: Result.Success(data) always carries data, messages use WithMessage, and failures use Failure<T> or FromFailure<T>. There are no result conversion operators. IsSuccess() classifies 200 or 201 without promising non-null Data. For payload handling, error projection, and remote-call contracts, read result-type-guide.md. For background work using MoBackgroundService or CoordinatedLeaderService, read hosted-service-guide.md.

When module code consumes an existing capability, consult the relevant $monica-infra-persistence, $monica-infra-messaging, $monica-infra-jobs, $monica-infra-configuration, $monica-infra-hosting, $monica-infra-observability, $monica-infra-ai, $monica-infra-web, or $monica-infra-ui skill for its public setup contract. This skill remains the authority for authoring framework modules. Read the C# contracts when writing developer-facing APIs, options, or registration extensions.

For the pure ChangeEntry / ChangeChain model, deterministic replay, and generated typed change data, read change tracking. Persistence, aggregate concurrency, and side effects remain application responsibilities.

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.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.