You've already forked tribes-plugin-trust
40310b26ea
CI / Test (push) Failing after 20s
Introduce the Trust plugin as the federation provider for tribe identity and hello handshakes, with synced Ash resources for remote tribes and tribe relationships plus an admin LiveView for trust management.
2.4 KiB
2.4 KiB
Tribes Plugin Agent Guide
This repository is a Tribes plugin. Preserve generated names unless a task explicitly asks to rename the plugin.
Required Workflow
- Use
pluginfor plugin-aware commands in the devenv shell:plugin validate,plugin test,plugin precommit, andplugin smoke. Outside the devenv shell, use the localscripts/pluginwrapper. - Use
devenv shell -- <command>when installing or building Node assets from outside the devenv shell. Do not run rawnpm installdirectly. - Do not use raw
mix testfor host-backed plugin suites unless you are deliberately recreating theplugin testhost environment by hand; usemix raw_testonly for that low-level debugging path. - For AshPostgres resource changes, generate migrations with
plugin ash.codegen <name>. Useplugin ecto.migration <name>only for rare manual schema migrations that are not derived from Ash resources. - Do not edit an existing migration after it may have run; add a new migration instead.
- Run
scripts/plugin smokeafter changingmix.exs,manifest.json, entry modules, or host-facing dependency setup. - Keep commits semantic, for example
feat: add plugin smoke checks, and include a body except for minimal patches.
Plugin Contract
manifest.jsonentry_modulemust point at the plugin entry module.- The dev
:tribesdependency is compile-only so host plugin loading can build_build/devbeams without starting a nested host app. - The test
:tribesdependency is runtime-enabled so host-backed tests can startTribes.Repoand related services. - If the plugin adds cluster-synced Ash resources, use
AshNostrSyncdeliberately and document replication semantics indocs/plugin-contract.md.
Frontend
- Default pages should render inside host chrome with
Tribes.Plugin.Layouts.app; keeporg.tribe-one.caps.ui@1inmanifest.jsonrequiresfor host chrome or directTribes.UIusage. - Prefer TypeScript in
assets/tsfor browser code. The default build emits browser-ready files topriv/static. - Register plugin LiveView hooks from
manifest.jsonassets.global_jsbundles viawindow.TribesPluginHooks. The host does not auto-import external pluginphoenix-colocated/<otp_app>modules into itsapp.jsbundle. - Keep CSS selectors plugin-scoped to avoid collisions with the host or other plugins.
- Use the package scripts in
assets/package.json; do not bypass them with ad-hoc asset commands.