Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# AGENTS.md

C# source loader for the Hosihikari Framework. It compiles `.cs` files with Roslyn at load and runs
the result in a collectible assembly load context.

## Repository map

- `src/` — loader implementation and cache.
- `host/` — assertion host for compilation, caching, isolation, and unload.
- `test/` — fixture packages and private dependencies.
- `pack.ps1` — build the `hosihikari-csharp` lip package.
- `tooth.json` — lip package metadata.

## Build and verify

```bash
dotnet run --project host/Hosihikari.PluginLoader.CSharp.Host.csproj -c Release --nologo
pwsh ./pack.ps1 -Version 1.0.0 -OutputRoot artifacts
```

The host expects sibling `PluginManager`, `Plugin.Abstractions`, and
`Hosihikari.McMaster.NETCore.Plugins` checkouts. `pack.ps1` calls the core packer and needs the same
`PluginManager` checkout.

## Invariants

- The loader package is named `hosihikari-csharp`; it routes on `extraInfo.loader: assembly` with
entry `Hosihikari.PluginLoader.CSharp.dll`. Source packages it handles use
`extraInfo.loader: csharp` and entry `main.cs`.
- Compile-time references follow the runtime order: framework shared layer, package-local DLLs,
then trusted platform assemblies.
- Cache keys cover source text, package-local DLLs, Roslyn version, and runtime version. Keep the
checksum check in sync.
- A failed load releases its ALC; one package exposes exactly one `IPlugin` type.
- Public default branches are protected. Work on a branch, open a pull request, and squash merge.

## Context

- [Design record](https://github.com/HosihikariFramework/Design) — GLOSSARY and ADRs.
- [C# plugin guide](https://hf.srcz.one/authoring-csharp/).
Loading