opensilk-erp
Build an ERP (sales, purchasing, inventory, accounting, customers, POS, fixed assets) as connected apps on open-silk + open-ketoan + open-cake instead of one hand-written monolith. Use when the user wants an ERP, a back-office system, or several business apps that must share customers, items, documents and one ledger.
Why it scored this
named +4 · described +6 · substantial +6 · right length +4 · evals +5 · code-fences +3 · active +5 · unseen-before +8 · specific-vocabulary +8
The file
--- name: opensilk-erp description: Build an ERP (sales, purchasing, inventory, accounting, customers, POS, fixed assets) as connected apps on open-silk + open-ketoan + open-cake instead of one hand-written monolith. Use when the user wants an ERP, a back-office system, or several business apps that must share customers, items, documents and one ledger. --- # Build an ERP on OpenSilk `<kit>/opensilk.json` pins **open-silk** (core), **open-ketoan** (accounting kernel, item master, branches and warehouses) and **open-cake** (customers: `contact_id`, touch log, inbox). Anything not in that file is unverified. ## The ERP shape An OpenSilk ERP is several apps on one core, joined by identities, events and documents, never by reading each other's database: | Data | Owner | Others keep | | --- | --- | --- | | ledger, posting rules, items, units, branches, warehouses | open-ketoan | a projection keyed by `item_id` / codes | | customers and their touches | open-cake | a `contact_ref` | | till sales, payments, returns, store stock moves | open-kiot (planned, P0: no code yet); until then your POS module | the `sale` / `sale_return` document it sends to open-ketoan | | document infrastructure, identities, permissions, actions | open-silk | — (use it, do not copy it) | | your industry logic | your modules | — | Every business event has exactly one sender. If two modules could send the same document, pick one and write it down. **open-kiot** (https://github.com/hoanganh8389/open-kiot) is the planned retail POS for store chains, built on open-silk to work with open-ketoan and open-cake. It is at P0: research and proposed ADRs, no code yet, and it is not pinned in `opensilk.json`. Do not install it or call its APIs; say it is planned. Its proposed rules can guide a POS you build now, quoted as proposals: the till keeps selling when accounting is offline (sale, payment, stock move and outbox in one transaction, the document goes to open-ketoan after commit), one idempotency key per cashier action, a stable `docKey@version`, money never in floats. Read `docs/research/02-retail-business-canon.md` and `docs/adr/` there. ## 1. Understand the need (no writes) Map the request to needs in `<kit>/opensilk.json`: `sales`, `purchasing`, `inventory`, `accounting`, `customers`, `pos`, `fixed-assets`, `erp-shell`, `manufacturing`, `hrm`. Inspect the user's project and existing systems read-only. Check the jurisdiction: the accounting kernel ships Vietnamese rule packs only. ## 2. Plan ```bash node <kit>/tools/opensilk.mjs plan --project <app> --need <needs> ``` Present a one-page plan: which app owns which data (table above), which module sends which document, what is reused, `notYetAvailable`, `customWork`, `blockers`, and the order of delivery. Deliver in small usable steps (one flow end to end, e.g. purchase → stock → sale → cost → P&L) rather than all modules at once. **Wait for approval.** ## 3. Get the sources (after approval) `node <kit>/tools/opensilk.mjs fetch --project <app>` vendors all three read-only into `<app>/.opensilk/`; add `.opensilk/` to `.gitignore`. Running open-ketoan and open-cake as services follows each one's README in the vendored copy; do not start servers or create databases without approval. ## 4. Read only what the plan lists Each source's `AGENTS.md` first, then `readFirst`, then the plan's `read` files. For anything touching money or stock, `skills/open-ketoan-standard/SKILL.md` in the open-ketoan copy is mandatory. Docs are partly in Vietnamese; read them as they are and answer in the user's language. ## 5. Build the business part - ERP modules use `@bizcity/module-sdk`; they post accounting documents through the kernel's posting gate only. - Never create a second item, customer, branch or warehouse table; project the owner's data by its immutable id. - Never hard-code accounts, tax rates or costing in modules. - `customWork` (HRM, MRP, projects…) are your modules. Where a gate is closed (manufacturing costing), stop and tell the user. ## 6. Verify and report ```bash node <kit>/tools/opensilk.mjs verify --project <app> ``` Then run each source's checks named in the skills you read (e.g. the kernel's flow check over a real purchase → sale chain) and the project's tests. Report passed, failed and unverified items. Do not claim token or time savings without a measured, comparable benchmark. ## Never Invent packages, endpoints, account codes or commands; move to another commit without approval and a registry update; migrate, import or overwrite business data without approval; edit a vendored source.