/accordo:build-custom-domain-packagefrom Accordo — agent-native CRM framework
Create or extend a domain package in an Accordo repository - a bounded domain with its own resources, actions, policies, capabilities and schema metadata, registered statically and removable without touching the kernel. Use for "add a custom package", package contract, package dependency/capability, package validation or new-domain work, including customer-specific packages. Do not use for a single custom object (create-crm-module) or one lifecycle step on an existing record (create-crm-workflow).
Ships in Accordo — agent-native CRM framework. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
npm run crm -- app inspect --json
Read valid, then problems[], then limitations[], in that order. Every problem is fixed or reported before anything is built on top of it, and every limitation is a hard boundary on what you may claim. Then read packages[], capabilities[], resources[], actions[], policies[] and providers[]: that list is what exists. A capability absent from the report does not exist, whatever a record name, a label or a document suggests.
If the repository documents this skill names are absent, you are in a project built from this framework rather than in the framework itself. The inspection report is then the source of truth and those documents are optional background — do not guess at their contents, and do not assume a path exists because this skill names it.
The package contract itself is enforced by a command, not by a document: npm run crm -- package validate <dir> runs the same validator startup runs, and its problems are the authority on whether a package is well-formed.
Background, where they exist: docs/PACKAGE_AUTHORING.md and DECISIONS.md (ADR-018 and its addenda). The reference packages, where the project carries them, are examples/custom-packages/partner-scorecard (smallest, customer-authored), packages/delivery (depends on another package) and packages/contracts (offers a capability). They are the deeper source for the rules below, not a prerequisite for them — the rules stand on their own.
npm run crm -- package scaffold <name> prints a plan and writes nothing; --apply writes exactly two files, src/index.js and README.md, with an identity and five empty declarations. That output already passes package validate, package inspect and package test — start from it rather than from a copy of somebody else's domain.PACKAGE_NAME_INVALID, ask for the canonical name explicitly rather than assuming the suggestion.--into <dir> places the package outside packages/; --json gives you the plan, its per-file hashes and a fingerprint. Exit 0 planned or applied, exit 1 refused — so read modeReason, not the exit code, to know whether anything was written; an explicit --dry-run beats --apply and still exits 0.--apply re-checks the target and answers TARGET_CLAIMED if another process got there first. An interrupted earlier run blocks nothing: its staging is reported as staleStaging for you to remove, never deleted automatically and never treated as a lock.crm app inspect --json.packageContract: 1, a canonical name (^[a-z][a-z0-9-]*$), a positive integer version, a bounded label and description.resources — the record modules you own. Two packages claiming one resource is a startup failure, and declaring them is what makes that detectable.packages/core/index.js. Anything under packages/core/src/* is private; package validate fails a package that reaches into it. If something you need is not exported, that is a missing public export or a missing runtime capability — raise it, do not deep-import."writable": "managed" throughout, so they are get/list publicly and exist only through your actions.config so the ADR-015 fingerprint covers them; handlers stay deterministic, synchronous and total.metadata() returns plain data only — no function, credential or path. Include a notModeled list: the limits are part of the contract.requires: [{package, capability, version}], opened with domains.capability({consumer, capability, version, context: {modules, actor, now}}).If your package sends to an external channel (WhatsApp, Instagram, SMS, email), it follows the outbound-send rule in AGENTS.md («Invii verso canali esterni»): queue every send through the existing channels outbox under a deterministic idempotent key, never call the provider before the persistent claim, carry an actor on every send, re-read the row fresh before queueing, confirm idempotently per message key, and record terminal refusals on the row. Prove it with tests/helpers/outbound-send-conformance.js — the same three concurrency cases the appointment reminder suite runs — with your own driver.
packages/domains/generated/index.js. No dynamic import, no eval, no remote install, no marketplace, no hot loading.crm package scaffold <name> an empty package that already conforms
crm package inspect <dir> what does it declare, own, offer and need?
crm package validate <dir> is that declaration structurally valid?
crm package test <dir> does it hold up when a real application composes it?
npm test -- <your suite> does it do the right thing? ← only your tests answer this
npm run verify does the whole project still hold?
crm package test (DX4) composes your package into a throwaway copy of the project and boots it twice — with it and without it. It proves the declaration, the boundaries, every composition refusal, module manifests and migration identity, attach and detach, and that app inspect describes the same package you declared. Generic conformance is not domain correctness: no action is executed, no policy is evaluated and no state transition is driven. Every such gap is a named limitation in the report, starting with DOMAIN_CORRECTNESS_NOT_PROVEN. Your business JTBDs still need package-specific tests.test also boots it, so your code runs with the CLI's authority. The harness does not intentionally mutate the caller project, and test imports your package from a throwaway copy rather than from your tree — but process isolation protects the invoking process from crashes, global-state changes and hangs, and is not a filesystem, network or OS sandbox. Never describe it as one.docs/architecture/LEGACY_ALIGNMENT_MATRIX.md, not through a local fix.requires. Without it, package test fails you with UNDECLARED_PACKAGE_RECORD_DEPENDENCY and names what the owner offers — because your package cannot be composed into any project that lacks the owner, and nothing in your declaration says so. Records no package owns are different: they belong to the host application, every package here acts on order, and depending on them needs no declaration. If no capability of the owner expresses what you do, that is a real seam gap: say so in the PR rather than working around it.tests/helpers/package-conformance.js in this repository); otherwise write the same assertions yourself. Then add an end-to-end test that drives your action over the real HTTP/SDK path in a clean project.Where the project carries a jobs matrix (docs/benchmarks/CRM_JTBD_MATRIX.md in this repository), update it conservatively — a row moves only with linked evidence, and a data model is not a completed job. Where it carries none, the rule still holds against whatever the project claims in its README and its package metadata. Never describe a stored reference as access, permission or an account.
A package registry, npm publication, remote install, auto-update, cryptographic signing, a marketplace, hot loading, or any kernel patch. The scaffold (DX3) exists and stops at an identity on purpose — do not extend it to generate domain semantics, to edit packages/domains/generated/index.js, or to run a migration. See docs/plans/dx3-package-scaffold.md.
Finish with npm run verify, the starter (node examples/starters/b2b-lead-qualification/install.mjs) and docs/QUALITY_GATES.md; leave the PR open for adversarial review.
domains.get(name) returns a frozen public summary — never a definition, never another package's create() or policy handlers. Do not look for a second route to an interface: there isn't one, and adding one is a kernel change.metadata() may add to your schema block but may never restate what the registry computes — version, label, description, resources, requires, provides, actions, policies. Those keys are refused at startup. It must return plain, function-free, JSON-safe data.name is bounded (64 characters), lowercase-canonical, and Map-keyed.crm package validate imports and executes your src/index.js; your actions and policies run in-process with full authority; and the consumer name passed when opening a capability is asserted by the caller. Never describe any of this as isolation.What SKILL.md sets; muted values are Claude Code's defaults
11 skills in this plugin
/build-commercial-operationsAdd or extend Commercial Operations in an Accordo project - catalog providers, products and price books, quotes with server-priced lines, immutable quote versions, and versioned discount policies with human approval. Use for catalog/quote/discount/CPQ work. Do not use for CRUD module changes (create-crm-module) or lead scoring/routing (build-lead-intelligence)./build-contract-activationAdd or extend contract activation and renewal/amendment execution in an Accordo project - turning a signed immutable Order into a Commercial Contract, Contract Version and Lines, a Subscription with its lines and pending delivery/service obligations through a versioned Order Activation Policy, and executing a governed SUCCESSOR agreement from a later signed Order with immutable lineage. Use for contract, subscription, obligation, activation-policy, renewal, amendment, successor or contract-lineage work, and for building a new optional domain package. Do not use for signature/order work (build-signature-order), catalog/quote/discount work (build-commercial-operations), billing or cancellation (neither exists) or CRUD module changes (create-crm-module)./build-delivery-handoverAdd or extend delivery handover, delivery execution, delivery economics and delivery change, deliverables and acceptance evidence in an Accordo project - turning the pending delivery obligations of an activated contract into a planned delivery project with work packages, milestones and an optional third-party partner engagement through a versioned handover policy, running that project through bounded human-driven state transitions, and recording governed change requests, plan revisions, deliverables and customer acceptance evidence. Use for delivery project/commessa, work package, delivery milestone, partner engagement, handover, starting/blocking/resuming/completing delivery work, change requests, deliverables or recorded customer acceptance. Do not use for invoicing or billing (neither exists), renewal or amendment execution (build-contract-activation), contract activation (build-contract-activation), signature/order work (build-signature-order) or a single custom object (create-crm-module)./build-lead-intelligenceAdd or extend Lead Intelligence in an Accordo project - enrichment providers, versioned explainable scoring models, versioned routing policies and routing targets. Use for enrich/score/route work on leads. Do not use for CRUD module changes (create-crm-module) or approval processes (create-crm-workflow)./build-service-operationsAdd or extend service operations in an Accordo project - activating the pending service obligations of an activated contract into an operational Service Coverage with immutable Entitlements through a versioned activation policy, and recording support cases over an explicit transition table with elapsed-time SLA evidence and manually recorded escalation. Use for service coverage, support entitlement, support case/ticket, first response, SLA target or evaluation, case escalation, ending coverage, or the Service Admin section. Do not use for a second legal contract, billing, invoicing or an authenticated customer portal (none of which exist), renewal or amendment execution (build-contract-activation), contract activation (build-contract-activation), delivery work (build-delivery-handover) or a single custom object (create-crm-module)./build-signature-orderAdd or extend Signature and Order in an Accordo project - signature providers, envelope/signer/event state, verified webhooks, signed-artifact evidence, reconciliation and immutable Orders built from an approved Quote Version. Use for signature, envelope, webhook or order work. Do not use for catalog/quote/discount work (build-commercial-operations) or CRUD module changes (create-crm-module).npx claudepluginhub khaoss85/agent-crm --plugin accordo