Back to blog
Architecture 12 min read

OpenSpec for auto-parts WMS/CRM: specify first, then let the agent code

How OpenSpec’s spec-driven loop keeps an AI agent inside warehouse and CRM domain rules. A concrete change: soft-reserve stock when creating an order.

OpenSpec for auto-parts WMS/CRM: specify first, then let the agent code

Why OpenSpec if you already use Cursor

Auto-parts commerce is unforgiving: SKU, fitment, supplier offer, bin location, order reserve, cancel, return. Ask an AI to “add reservation” in one chat paragraph and you often get a neat service plus three silent bugs: double reserve, immortal soft-holds, and CRM/WMS drift.

OpenSpec (Fission-AI) is a lightweight spec-driven workflow around your coding assistant: capture behavior in markdown, correct the plan, then let the agent implement a checklist. Specs live in the repo next to the code.

idea → propose → review → apply → archive

The loop

After openspec init:

openspec/
├── specs/           # current system behavior
├── changes/         # in-flight changes (+ archive/)
└── config.yaml

In Cursor: /opsx-propose, /opsx-apply, /opsx-archive. Artifacts are plain markdown.

Where it hits auto-parts

Typical flow: storefront/CRM → offer → reserve on own warehouse or buy from supplier → pick/ship → CRM status. Pain is state consistency, not CRUD. Useful spec domains: catalog, offers, inventory, orders, fulfillment.

Concrete example: soft-reserve on order create

Manager creates a CRM order for a Bosch SKU from own warehouse. Need soft-reserve, hide qty from other orders, release on cancel/TTL, promote to hard-reserve when picking starts.

Propose produces a delta spec with WHEN/THEN scenarios (success, insufficient stock, TTL expiry, promote on pick). Review is where domain edges land: partial multi-source carts, idempotency keys, inventory freezes. Apply walks tasks.md; archive merges requirements into openspec/specs/inventory/.

Practical payoff

  • Less AI sprawl across services
  • Onboarding via specs, not tribal memory
  • Smaller change scope, clearer regressions

Anti-patterns

  • One mega-spec for the whole CRM
  • Design diagrams without scenarios
  • Apply without review
  • Never committing openspec/

Start small

Install the CLI, run openspec init --tools cursor, pick one painful slice (reserve, putaway, supplier swap on a line), and run a full cycle to archive. Soft-reserve is a good first change if you already have a supplier/WMS service.