# FEAT — Yonexus Feature List ## Existing Features ### Core Model & Storage - Organization / Department / Team / Agent / Identity / Supervisor data model - In-memory runtime with JSON persistence (`data/org.json`) - Import/export of structure data ### Authorization - Role model: `org_admin`, `dept_admin`, `team_lead`, `agent` - `authorize(action, actor, scope)` permission check - Registrar whitelist (`registrars`) and bootstrap registration support ### Core APIs - `createOrganization(actor, name)` - `createDepartment(actor, name, orgId)` - `createTeam(actor, name, deptId)` - `registerAgent(actor, agentId, name, roles?)` - `assignIdentity(actor, agentId, deptId, teamId, meta)` - `setSupervisor(actor, agentId, supervisorId, deptId?)` - `whoami(agentId)` - `queryAgents(actor, scope, query)` ### Query & Search - Query ops: `eq`, `contains`, `regex` - Schema `queryable` whitelist enforcement - Pagination (`limit`, `offset`) - Basic query performance optimization (regex cache + ordered filter eval) ### Management & Audit - `renameDepartment`, `renameTeam`, `migrateTeam`, `deleteDepartment`, `deleteTeam` - Structured errors via `YonexusError` - In-memory audit log (`listAuditLogs`) ### Scope Memory - Scope memory adapter: - `scope_memory.put(scopeId, text, metadata)` - `scope_memory.search(scopeId, query, limit)` ### Developer Experience - `README.md` + `README.zh.md` - Example data (`examples/sample-data.json`) - Demo script (`scripts/demo.ts`) - Smoke test (`tests/smoke.ts`) --- ## New Features (from NEW_FEAT) ### 1) Filesystem Resource Layout Data-only filesystem tree under: - `${openclaw dir}/yonexus/organizations//...` Auto-create (idempotent): - On `createOrganization`: - `teams/`, `docs/`, `notes/`, `knowledge/`, `rules/`, `lessons/`, `workflows/` - On `createTeam`: - `teams//agents/`, `docs/`, `notes/`, `knowledge/`, `rules/`, `lessons/`, `workflows/` - On `assignIdentity`: - `teams//agents//docs|notes|knowledge|rules|lessons|workflows` ### 2) Document Query Tool New API: - `getDocs(scope, topic, keyword)` Parameters: - `scope`: `organization | department | team | agent` - `topic`: `docs | notes | knowledge | rules | lessons | workflows` - `keyword`: regex string Behavior: - Read-only search by filename regex under filesystem resources - Structured output: - `----ORG` - `----DEPT` - `----TEAM` - `----AGENT` - Invalid regex returns structured error (`YonexusError: VALIDATION_ERROR`) ## Notes - `${openclaw dir}` resolution order: 1. `YonexusOptions.openclawDir` 2. `OPENCLAW_DIR` env 3. `${HOME}/.openclaw` - Plugin code is not written into `${openclaw dir}/yonexus`; only data folders/files are used there.